From c28f99abe9b2c5e37c6017518ce391dc013f126a Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Thu, 2 Dec 2021 17:02:00 -0800 Subject: [PATCH 1/2] python3Packages.yaspin: init at 2.1.0 --- .../python-modules/yaspin/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/yaspin/default.nix diff --git a/pkgs/development/python-modules/yaspin/default.nix b/pkgs/development/python-modules/yaspin/default.nix new file mode 100644 index 000000000000..012ee677ae0e --- /dev/null +++ b/pkgs/development/python-modules/yaspin/default.nix @@ -0,0 +1,32 @@ +{ buildPythonPackage +, fetchFromGitHub +, lib +, poetry-core +, termcolor +}: + +buildPythonPackage rec { + pname = "yaspin"; + version = "2.1.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "pavdmyt"; + repo = pname; + rev = "v${version}"; + sha256 = "0vhh4mp706kz5fba8nvr9jm51jsd32xj97m3law6ixw3lj91sh1a"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ termcolor ]; + + pythonImportsCheck = [ "yaspin" ]; + + meta = with lib; { + description = "Yet Another Terminal Spinner"; + homepage = "https://github.com/pavdmyt/yaspin"; + license = licenses.mit; + maintainers = with maintainers; [ samuela ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2f415e50f96f..c30ec5911672 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10229,6 +10229,8 @@ in { yarl = callPackage ../development/python-modules/yarl { }; + yaspin = callPackage ../development/python-modules/yaspin { }; + yaswfp = callPackage ../development/python-modules/yaswfp { }; yattag = callPackage ../development/python-modules/yattag { }; From 114470d28e7fe1681fa74a7ebd50ad1e931babdd Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Thu, 2 Dec 2021 17:02:28 -0800 Subject: [PATCH 2/2] python3Packages.wandb: init at 0.12.7 --- .../python-modules/wandb/default.nix | 138 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 140 insertions(+) create mode 100644 pkgs/development/python-modules/wandb/default.nix diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix new file mode 100644 index 000000000000..528e39878be6 --- /dev/null +++ b/pkgs/development/python-modules/wandb/default.nix @@ -0,0 +1,138 @@ +{ bokeh +, buildPythonPackage +, click +, configparser +, docker_pycreds +, fetchFromGitHub +, flask +, git +, GitPython +, jsonref +, jsonschema +, lib +, matplotlib +, pandas +, pathtools +, promise +, protobuf +, psutil +, pydantic +, pytest-mock +, pytest-xdist +, pytestCheckHook +, python +, python-dateutil +, pyyaml +, requests +, scikit-learn +, sentry-sdk +, setuptools +, shortuuid +, stdenv +, tqdm +, yaspin +}: + +buildPythonPackage rec { + pname = "wandb"; + version = "0.12.7"; + + src = fetchFromGitHub { + owner = pname; + repo = "client"; + rev = "v${version}"; + sha256 = "sha256-YG0BSIENnmF9n+oNIBcbpTh7obYx+Lpuak8pJzvjuJ8="; + }; + + # The wandb requirements.txt does not distinguish python2/3 dependencies. We + # need to drop the subprocess32 dependency when building for python3. + patchPhase = '' + substituteInPlace requirements.txt --replace "subprocess32>=3.5.3" "" + ''; + + # git is not a setup.py dependency of wandb, but wandb does expect git to be + # in PATH. See https://gist.github.com/samuela/57aeee710e41ab2bf361b7ed8fbbeabf + # for the error message, and an example usage here: https://github.com/wandb/client/blob/master/wandb/sdk/internal/meta.py#L139-L141. + # setuptools is necessary since pkg_resources is required at runtime. + propagatedBuildInputs = [ + click + configparser + docker_pycreds + git + GitPython + pathtools + promise + protobuf + psutil + python-dateutil + pyyaml + requests + sentry-sdk + setuptools + shortuuid + yaspin + ]; + + disabledTestPaths = [ + # Tests that require docker access, not possible in the nix build environment. + "tests/launch/test_launch.py" + "tests/launch/test_launch_cli.py" + + # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. + "tests/test_cli.py" + "tests/test_data_types.py" + "tests/test_file_stream.py" + "tests/test_file_upload.py" + "tests/test_footer.py" + "tests/test_internal_api.py" + "tests/test_label_full.py" + "tests/test_login.py" + "tests/test_meta.py" + "tests/test_metric_full.py" + "tests/test_metric_internal.py" + "tests/test_mode_disabled.py" + "tests/test_mp_full.py" + "tests/test_notebooks.py" + "tests/test_public_api.py" + "tests/test_redir.py" + "tests/test_runtime.py" + "tests/test_sender.py" + "tests/test_start_method.py" + "tests/test_tb_watcher.py" + "tests/test_telemetry_full.py" + "tests/wandb_agent_test.py" + "tests/wandb_artifacts_test.py" + "tests/wandb_history_test.py" + "tests/wandb_integration_test.py" + "tests/wandb_run_test.py" + "tests/wandb_settings_test.py" + "tests/wandb_sweep_test.py" + + # Fails and borks the pytest runner as well. + "tests/wandb_test.py" + ]; + + checkInputs = [ + bokeh + flask + jsonref + jsonschema + matplotlib + pandas + pydantic + pytest-mock + pytest-xdist + pytestCheckHook + scikit-learn + tqdm + ]; + + pythonImportsCheck = [ "wandb" ]; + + meta = with lib; { + description = "A CLI and library for interacting with the Weights and Biases API"; + homepage = "https://github.com/wandb/client"; + license = licenses.mit; + maintainers = with maintainers; [ samuela ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c30ec5911672..787ade3c6826 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9923,6 +9923,8 @@ in { Wand = callPackage ../development/python-modules/Wand { }; + wandb = callPackage ../development/python-modules/wandb { }; + warlock = callPackage ../development/python-modules/warlock { }; warrant = callPackage ../development/python-modules/warrant { };