From 6a99dc64983c320fa2aff49cfddd6fce902198d1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 27 May 2022 21:19:04 +0200 Subject: [PATCH 1/4] python310Packages.pytest-test-utils: init at 0.0.6 --- .../pytest-test-utils/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-test-utils/default.nix diff --git a/pkgs/development/python-modules/pytest-test-utils/default.nix b/pkgs/development/python-modules/pytest-test-utils/default.nix new file mode 100644 index 000000000000..e1fa22f79d3f --- /dev/null +++ b/pkgs/development/python-modules/pytest-test-utils/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pytest +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pytest-test-utils"; + version = "0.0.6"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "iterative"; + repo = pname; + rev = version; + hash = "sha256-0lShdMNP2suN+JO0uKWwjsGQxFCRnCZEQp2h9hQNrrA="; + }; + + buildInputs = [ + pytest + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pytest_test_utils" + ]; + + meta = with lib; { + description = "Pytest utilities for tests"; + homepage = "https://github.com/iterative/pytest-test-utils"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6a814bf7f284..61736ee55a83 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8289,6 +8289,8 @@ in { pytest-sugar = callPackage ../development/python-modules/pytest-sugar { }; + pytest-test-utils = callPackage ../development/python-modules/pytest-test-utils { }; + pytest-testmon = callPackage ../development/python-modules/pytest-testmon { }; pytest-timeout = callPackage ../development/python-modules/pytest-timeout { }; From 5ea241396e9703dff1d086368d79b40688b5f950 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 27 May 2022 21:22:04 +0200 Subject: [PATCH 2/4] python310Packages.dvc-render: init at 0.0.5 --- .../python-modules/dvc-render/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/dvc-render/default.nix diff --git a/pkgs/development/python-modules/dvc-render/default.nix b/pkgs/development/python-modules/dvc-render/default.nix new file mode 100644 index 000000000000..461cab639279 --- /dev/null +++ b/pkgs/development/python-modules/dvc-render/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, funcy +, pytestCheckHook +, pytest-mock +, pytest-test-utils +, pythonOlder +, tabulate +}: + +buildPythonPackage rec { + pname = "dvc-render"; + version = "0.0.5"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "iterative"; + repo = pname; + rev = "v${version}"; + hash = "sha256-dL+ampYgcC77G89rnh7t6lVp7WoIR85gjP0eg89ci3g="; + }; + + propagatedBuildInputs = [ + funcy + tabulate + ]; + + checkInputs = [ + pytestCheckHook + pytest-mock + pytest-test-utils + ]; + + pythonImportsCheck = [ + "dvc_render" + ]; + + meta = with lib; { + description = "Library for rendering DVC plots"; + homepage = "https://github.com/iterative/dvclive"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 61736ee55a83..4804ef682300 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2594,6 +2594,8 @@ in { durus = callPackage ../development/python-modules/durus { }; + dvc-render = callPackage ../development/python-modules/dvc-render { }; + dwdwfsapi = callPackage ../development/python-modules/dwdwfsapi { }; dyn = callPackage ../development/python-modules/dyn { }; From e45d512ec56c34ab4c61ce8928b6394202d8efd2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 27 May 2022 21:27:55 +0200 Subject: [PATCH 3/4] python310Packages.dvclive: init at 0.8.2 --- .../python-modules/dvclive/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/dvclive/default.nix diff --git a/pkgs/development/python-modules/dvclive/default.nix b/pkgs/development/python-modules/dvclive/default.nix new file mode 100644 index 000000000000..5c8aed38d9a7 --- /dev/null +++ b/pkgs/development/python-modules/dvclive/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, dvc-render +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "dvclive"; + version = "0.8.2"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "iterative"; + repo = pname; + rev = version; + hash = "sha256-ditc4WWTEuO4ACqL87BNgjm1B6Aj6PPWrFX+OoF5jOI="; + }; + + propagatedBuildInputs = [ + dvc-render + ]; + + # Circular dependency with dvc + doCheck = false; + + pythonImportsCheck = [ + "dvclive" + ]; + + meta = with lib; { + description = "Library for logging machine learning metrics and other metadata in simple file formats"; + homepage = "https://github.com/iterative/dvclive"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4804ef682300..da649ced2c6f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2594,6 +2594,8 @@ in { durus = callPackage ../development/python-modules/durus { }; + dvclive = callPackage ../development/python-modules/dvclive { }; + dvc-render = callPackage ../development/python-modules/dvc-render { }; dwdwfsapi = callPackage ../development/python-modules/dwdwfsapi { }; From 958cf873dcfe6e6c9d57491dec732fd2906cdd84 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 27 May 2022 21:29:48 +0200 Subject: [PATCH 4/4] dvc: 2.9.5 -> 2.10.2 --- .../version-management/dvc/default.nix | 39 +++++++------------ 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/version-management/dvc/default.nix b/pkgs/applications/version-management/dvc/default.nix index 936661e4e105..d28774b88b42 100644 --- a/pkgs/applications/version-management/dvc/default.nix +++ b/pkgs/applications/version-management/dvc/default.nix @@ -10,46 +10,24 @@ python3.pkgs.buildPythonApplication rec { pname = "dvc"; - version = "2.9.5"; + version = "2.10.2"; format = "setuptools"; src = fetchFromGitHub { owner = "iterative"; repo = pname; rev = version; - hash = "sha256-MviiA0ja1IaxMPlqu2dhIGBcdEXiEvBYnK9731dihMg="; + hash = "sha256-boaQSg0jajWQZKB5wvcP2musVR2/pifT4pU64Y5hiQ0="; }; - # make the patch apply - prePatch = '' - substituteInPlace setup.cfg \ - --replace "scmrepo==0.0.7" "scmrepo==0.0.10" - ''; - - patches = [ - ./dvc-daemon.patch - (fetchpatch { - url = "https://github.com/iterative/dvc/commit/ab54b5bdfcef3576b455a17670b8df27beb504ce.patch"; - sha256 = "sha256-wzMK6Br7/+d3EEGpfPuQ6Trj8IPfehdUvOvX3HZlS+o="; - }) - ]; - - postPatch = '' - substituteInPlace setup.cfg \ - --replace "grandalf==0.6" "grandalf>=0.6" \ - --replace "scmrepo==0.0.13" "scmrepo" - substituteInPlace dvc/daemon.py \ - --subst-var-by dvc "$out/bin/dcv" - ''; - nativeBuildInputs = with python3.pkgs; [ setuptools-scm setuptools-scm-git-archive ]; propagatedBuildInputs = with python3.pkgs; [ - appdirs aiohttp-retry + appdirs colorama configobj configobj @@ -57,12 +35,15 @@ python3.pkgs.buildPythonApplication rec { diskcache distro dpath + dvclive + dvc-render flatten-dict flufl_lock funcy grandalf nanotime networkx + packaging pathspec ply psutil @@ -96,6 +77,14 @@ python3.pkgs.buildPythonApplication rec { importlib-resources ]; + postPatch = '' + substituteInPlace setup.cfg \ + --replace "grandalf==0.6" "grandalf>=0.6" \ + --replace "scmrepo==0.0.19" "scmrepo" + substituteInPlace dvc/daemon.py \ + --subst-var-by dvc "$out/bin/dcv" + ''; + # Tests require access to real cloud services doCheck = false;