From 40785b6dd06ad5627733f4d0bcfec87044ff5db3 Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Fri, 27 Jun 2025 18:15:02 -0400 Subject: [PATCH 1/3] python3Packages.hatch-docstring-description: init at 1.1.1 --- .../hatch-docstring-description/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/hatch-docstring-description/default.nix diff --git a/pkgs/development/python-modules/hatch-docstring-description/default.nix b/pkgs/development/python-modules/hatch-docstring-description/default.nix new file mode 100644 index 000000000000..b591db9cd797 --- /dev/null +++ b/pkgs/development/python-modules/hatch-docstring-description/default.nix @@ -0,0 +1,45 @@ +{ + buildPythonPackage, + fetchFromGitHub, + hatch-vcs, + hatchling, + lib, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "hatch-docstring-description"; + version = "1.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "flying-sheep"; + repo = "hatch-docstring-description"; + tag = "v${version}"; + hash = "sha256-ouor0FV3qdXYJx5EWFUWSKp8Cc/EuD1WXrtLvbYG+XI="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + disabledTests = [ + # See https://github.com/flying-sheep/hatch-docstring-description/issues/107 + "test_e2e[.]" + "test_e2e[src]" + ]; + + pythonImportsCheck = [ "hatch_docstring_description" ]; + + meta = { + description = "Derive PyPI package description from Python package docstring"; + homepage = "https://github.com/flying-sheep/hatch-docstring-description"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ + samuela + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 56ce5f4d779d..98f26f4200dc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6355,6 +6355,10 @@ self: super: with self; { hatch-babel = callPackage ../development/python-modules/hatch-babel { }; + hatch-docstring-description = + callPackage ../development/python-modules/hatch-docstring-description + { }; + hatch-fancy-pypi-readme = callPackage ../development/python-modules/hatch-fancy-pypi-readme { }; hatch-jupyter-builder = callPackage ../development/python-modules/hatch-jupyter-builder { }; From baee59130a67e422998afa2fe3679c656ee472fb Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Fri, 27 Jun 2025 18:15:13 -0400 Subject: [PATCH 2/3] python3Packages.hatch-min-requirements: init at 0.1.0 --- .../hatch-min-requirements/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/hatch-min-requirements/default.nix diff --git a/pkgs/development/python-modules/hatch-min-requirements/default.nix b/pkgs/development/python-modules/hatch-min-requirements/default.nix new file mode 100644 index 000000000000..57a4d3dcb248 --- /dev/null +++ b/pkgs/development/python-modules/hatch-min-requirements/default.nix @@ -0,0 +1,39 @@ +{ + buildPythonPackage, + fetchFromGitHub, + hatch-vcs, + hatchling, + lib, +}: + +buildPythonPackage rec { + pname = "hatch-min-requirements"; + version = "0.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tlambert03"; + repo = "hatch-min-requirements"; + tag = "v${version}"; + hash = "sha256-7/6Es0DHDJ8jZ76kVbWkQjWFd8hWuB+PwCbOmIjzK5o="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + # As of v0.1.0 all tests attempt to use the network + doCheck = false; + + pythonImportsCheck = [ "hatch_min_requirements" ]; + + meta = { + description = "Hatchling plugin to create optional-dependencies pinned to minimum versions"; + homepage = "https://github.com/tlambert03/hatch-min-requirements"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ + samuela + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98f26f4200dc..2c545f9d9fa2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6363,6 +6363,8 @@ self: super: with self; { hatch-jupyter-builder = callPackage ../development/python-modules/hatch-jupyter-builder { }; + hatch-min-requirements = callPackage ../development/python-modules/hatch-min-requirements { }; + hatch-nodejs-version = callPackage ../development/python-modules/hatch-nodejs-version { }; hatch-odoo = callPackage ../development/python-modules/hatch-odoo { }; From 6c71eef5ff15ed8f2bea48b707808ba43e320fb6 Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Fri, 27 Jun 2025 18:15:36 -0400 Subject: [PATCH 3/3] python3Packages.fast-array-utils: init at 1.2.1 --- .../fast-array-utils/default.nix | 70 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/python-modules/fast-array-utils/default.nix diff --git a/pkgs/development/python-modules/fast-array-utils/default.nix b/pkgs/development/python-modules/fast-array-utils/default.nix new file mode 100644 index 000000000000..fb541592bcdc --- /dev/null +++ b/pkgs/development/python-modules/fast-array-utils/default.nix @@ -0,0 +1,70 @@ +{ + buildPythonPackage, + dask, + fetchFromGitHub, + hatch-docstring-description, + hatch-fancy-pypi-readme, + hatch-min-requirements, + hatch-vcs, + hatchling, + lib, + numba, + numpy, + pytest-codspeed, + pytest-doctestplus, + pytestCheckHook, + scipy, +}: + +buildPythonPackage rec { + pname = "fast-array-utils"; + version = "1.2.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "scverse"; + repo = "fast-array-utils"; + tag = "v${version}"; + hash = "sha256-SQaumXgjFn2+/MqllEs0zRnl2t7m2JZyOd+39vZPU2U="; + }; + + # hatch-min-requirements tries to talk to PyPI by default. See https://github.com/tlambert03/hatch-min-requirements?tab=readme-ov-file#environment-variables. + env.MIN_REQS_OFFLINE = "1"; + + build-system = [ + hatch-docstring-description + hatch-fancy-pypi-readme + hatch-min-requirements + hatch-vcs + hatchling + ]; + + dependencies = [ + numpy + ]; + + nativeCheckInputs = [ + dask + numba + pytest-codspeed + pytest-doctestplus + pytestCheckHook + scipy + ]; + + pythonImportsCheck = [ + "fast_array_utils.conv" + "fast_array_utils.types" + "fast_array_utils.typing" + "fast_array_utils" + ]; + + meta = { + description = "Fast array utilities"; + homepage = "https://icb-fast-array-utils.readthedocs-hosted.com"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ + samuela + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2c545f9d9fa2..ffcb5598eb9f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4882,6 +4882,8 @@ self: super: with self; { farama-notifications = callPackage ../development/python-modules/farama-notifications { }; + fast-array-utils = callPackage ../development/python-modules/fast-array-utils { }; + fast-histogram = callPackage ../development/python-modules/fast-histogram { }; fastai = callPackage ../development/python-modules/fastai { };