From 1924bb8b148458d7252bd72d46bf3c1839c35079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 24 Jan 2021 05:14:01 +0100 Subject: [PATCH 1/3] python3.pkgs.pynndescent: init at 0.5.1 --- .../python-modules/pynndescent/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/pynndescent/default.nix diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix new file mode 100644 index 000000000000..fd0aa18de14a --- /dev/null +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, nose +, scikitlearn +, scipy +, numba +, llvmlite +, joblib +}: + +buildPythonPackage rec { + pname = "pynndescent"; + version = "0.5.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "74a05a54d13573a38878781d44812ac6df97d8762a56f9bb5dd87a99911820fe"; + }; + + patches = [ + # fixes tests, included in next version + (fetchpatch { + url = "https://github.com/lmcinnes/pynndescent/commit/ef5d8c3c3bfe976063b6621e3e0734c0c22d813b.patch"; + sha256 = "sha256-49n3kevs3wpzd4FfZVKmNpF2o1V8pJs4KOx8zCAhR3s="; + }) + ]; + + checkInputs = [ + nose + ]; + + propagatedBuildInputs = [ + scikitlearn + scipy + numba + llvmlite + joblib + ]; + + checkPhase = '' + nosetests + ''; + + meta = with lib; { + description = "Nearest Neighbor Descent"; + homepage = "https://github.com/lmcinnes/pynndescent"; + license = licenses.bsd2; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 070e855b0c41..20ce58f5bc57 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4849,6 +4849,8 @@ in { pkuseg = callPackage ../development/python-modules/pkuseg { }; + pynndescent = callPackage ../development/python-modules/pynndescent { }; + pysbd = callPackage ../development/python-modules/pysbd { }; python-codon-tables = callPackage ../development/python-modules/python-codon-tables { }; From a1e458ccdbb22cdd1333de0d1a9c5e84df3659c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 24 Jan 2021 05:14:28 +0100 Subject: [PATCH 2/3] python3.pkgs.umap-learn: 0.4.5 -> 0.5.0 --- .../python-modules/umap-learn/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/umap-learn/default.nix b/pkgs/development/python-modules/umap-learn/default.nix index f471fbef4c8c..b9abe2bb7682 100644 --- a/pkgs/development/python-modules/umap-learn/default.nix +++ b/pkgs/development/python-modules/umap-learn/default.nix @@ -6,22 +6,25 @@ , scikitlearn , scipy , numba +, pynndescent +, tensorflow , pytestCheckHook }: buildPythonPackage rec { pname = "umap-learn"; - version = "0.4.5"; + version = "0.5.0"; src = fetchFromGitHub { owner = "lmcinnes"; repo = "umap"; rev = version; - sha256 = "080by8h4rxr5ijx8vp8kn952chiqz029j26c04k4js4g9s7201bq"; + sha256 = "sha256-2Z5RDi4bz8hh8zMwkcCQY9NrGaVd1DJEBOmrCl2oSvM="; }; checkInputs = [ nose + tensorflow pytestCheckHook ]; @@ -30,8 +33,13 @@ buildPythonPackage rec { scikitlearn scipy numba + pynndescent ]; + preCheck = '' + export HOME=$TMPDIR + ''; + disabledTests = [ # Plot functionality requires additional packages. # These test also fail with 'RuntimeError: cannot cache function' error. From 3012c1c8844294c61f3cb68729d6f8c3a5849af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 24 Jan 2021 21:20:00 +0000 Subject: [PATCH 3/3] Update pkgs/development/python-modules/pynndescent/default.nix Co-authored-by: Sandro --- pkgs/development/python-modules/pynndescent/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix index fd0aa18de14a..aab8f4e743a2 100644 --- a/pkgs/development/python-modules/pynndescent/default.nix +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { }; patches = [ - # fixes tests, included in next version + # fixes tests, included in 0.5.2 (fetchpatch { url = "https://github.com/lmcinnes/pynndescent/commit/ef5d8c3c3bfe976063b6621e3e0734c0c22d813b.patch"; sha256 = "sha256-49n3kevs3wpzd4FfZVKmNpF2o1V8pJs4KOx8zCAhR3s=";