From 8278f5c3b03c3992078ecc9b768c0606fc2e42a9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 May 2022 19:13:10 +0200 Subject: [PATCH 01/11] python39Packages.numba-scipy: update stale substituteInPlace --- .../python-modules/numba-scipy/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/numba-scipy/default.nix b/pkgs/development/python-modules/numba-scipy/default.nix index c8f84cbf43f5..525624eb05de 100644 --- a/pkgs/development/python-modules/numba-scipy/default.nix +++ b/pkgs/development/python-modules/numba-scipy/default.nix @@ -4,15 +4,19 @@ , scipy , numba , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "numba-scipy"; version = "0.3.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-qJeoWiG1LdtFB9cME1d8xVaC0BXGDJEYjCOEdHvSkmQ="; + hash = "sha256-qJeoWiG1LdtFB9cME1d8xVaC0BXGDJEYjCOEdHvSkmQ="; }; propagatedBuildInputs = [ @@ -21,14 +25,18 @@ buildPythonPackage rec { ]; postPatch = '' - substituteInPlace setup.py --replace "scipy>=0.16,<=1.6.2" "scipy>=0.16,<=1.7.3" + # https://github.com/numba/numba-scipy/pull/76 + substituteInPlace setup.py \ + --replace "scipy>=0.16,<=1.6.2" "scipy>=0.16" ''; checkInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "numba" ]; + pythonImportsCheck = [ + "numba_scipy" + ]; meta = with lib; { description = "Extends Numba to make it aware of SciPy"; From 2e32938d54c380289eb9d19e61d3da793821daa8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 May 2022 13:09:45 +0200 Subject: [PATCH 02/11] python310Packages.numba: update disable --- .../python-modules/numba/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index d656a56e3c17..23921959f596 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -24,11 +24,11 @@ let in buildPythonPackage rec { version = "0.55.1"; pname = "numba"; - disabled = pythonOlder "3.6" || pythonAtLeast "3.10"; + disabled = pythonOlder "3.6" || pythonAtLeast "3.11"; src = fetchPypi { inherit pname version; - sha256 = "sha256-A+kGmiZm0chPk7ANvXFvuP7d6Lssbvr6LwSEKkZELqM="; + hash = "sha256-A+kGmiZm0chPk7ANvXFvuP7d6Lssbvr6LwSEKkZELqM="; }; postPatch = '' @@ -42,9 +42,18 @@ in buildPythonPackage rec { NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; - propagatedBuildInputs = [ numpy llvmlite setuptools ] ++ lib.optionals cudaSupport [ cudatoolkit cudatoolkit.lib ]; + propagatedBuildInputs = [ + numpy + llvmlite + setuptools + ] ++ lib.optionals cudaSupport [ + cudatoolkit + cudatoolkit.lib + ]; - nativeBuildInputs = lib.optional cudaSupport [ addOpenGLRunpath ]; + nativeBuildInputs = lib.optional cudaSupport [ + addOpenGLRunpath + ]; patches = lib.optionals cudaSupport [ (substituteAll { @@ -69,12 +78,14 @@ in buildPythonPackage rec { # ImportError: cannot import name '_typeconv' doCheck = false; - pythonImportsCheck = [ "numba" ]; + pythonImportsCheck = [ + "numba" + ]; meta = with lib; { + description = "Compiling Python code using LLVM"; homepage = "https://numba.pydata.org/"; license = licenses.bsd2; - description = "Compiling Python code using LLVM"; maintainers = with maintainers; [ fridh ]; }; } From b7874eee051c6a194935e8b18745a7b9455df419 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 11:44:25 +0200 Subject: [PATCH 03/11] python39Packages.aesara: 2.5.3 -> 2.6.6 --- .../python-modules/aesara/default.nix | 54 ++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/aesara/default.nix b/pkgs/development/python-modules/aesara/default.nix index 58a39422a3a3..d34a0fb0770f 100644 --- a/pkgs/development/python-modules/aesara/default.nix +++ b/pkgs/development/python-modules/aesara/default.nix @@ -1,30 +1,33 @@ { lib , buildPythonPackage -, fetchFromGitHub -, numpy -, scipy -, filelock +, cons +, cython , etuples +, fetchFromGitHub +, filelock , logical-unification , minikanren -, cons , numba , numba-scipy -, libgpuarray -, sympy -, cython +, numpy , pytestCheckHook +, pythonOlder +, scipy +, typing-extensions }: buildPythonPackage rec { pname = "aesara"; - version = "2.5.3"; + version = "2.6.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "aesara-devs"; repo = "aesara"; rev = "refs/tags/rel-${version}"; - sha256 = "sha256-20nc70gNdcGjtGxv2WxmYxmswNH8v7yGLkToP2iazjc="; + hash = "sha256-ChLMQCXw9EBR0hnNYGdkUbiLF+4oCqOxzsKsnsf22Jk="; }; nativeBuildInputs = [ @@ -32,28 +35,41 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - numpy - scipy - filelock + cons etuples + filelock logical-unification minikanren - cons - numba - numba-scipy - libgpuarray - sympy + numpy + scipy + typing-extensions ]; checkInputs = [ + numba + numba-scipy pytestCheckHook ]; + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--durations=50" "" + ''; + preBuild = '' export HOME=$(mktemp -d) ''; - pythonImportsCheck = [ "aesara" ]; + pythonImportsCheck = [ + "aesara" + ]; + + disabledTestPaths = [ + # Don't run the most compute-intense tests + "tests/scan/" + "tests/tensor/" + "tests/sandbox/" + ]; meta = with lib; { description = "Python library to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays"; From d69a2ffcea2fec72eb24c8ce202151cb3adfc992 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 12:32:14 +0200 Subject: [PATCH 04/11] python310Packages.persim: disable failing tests on Python 3.10 --- .../python-modules/persim/default.nix | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/persim/default.nix b/pkgs/development/python-modules/persim/default.nix index 4ac21159d956..4e3717dec07e 100644 --- a/pkgs/development/python-modules/persim/default.nix +++ b/pkgs/development/python-modules/persim/default.nix @@ -9,15 +9,20 @@ , scikit-learn , scipy , pytestCheckHook +, pythonAtLeast +, pythonOlder }: buildPythonPackage rec { pname = "persim"; version = "0.3.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "ef0f0a247adcf6104ecac14117db0b24581710ea8a8d964816805395700b4975"; + sha256 = "sha256-7w8KJHrc9hBOysFBF9sLJFgXEOqKjZZIFoBTlXALSXU="; }; propagatedBuildInputs = [ @@ -41,10 +46,26 @@ buildPythonPackage rec { echo "backend: ps" > $HOME/.matplotlib/matplotlibrc ''; + pythonImportsCheck = [ + "persim" + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + # AttributeError: module 'collections' has no attribute 'Iterable' + "test_empyt_diagram_list" + "test_empty_diagram_list" + "test_fit_diagram" + "test_integer_diagrams" + "test_lists_of_lists" + "test_mixed_pairs" + "test_multiple_diagrams" + "test_n_pixels" + ]; + meta = with lib; { description = "Distances and representations of persistence diagrams"; homepage = "https://persim.scikit-tda.org"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From 0fb3b8bddfcb7ddc59693451c7027914035bb730 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 15:40:06 +0200 Subject: [PATCH 05/11] python310Packages.numdifftools: init at 0.9.40 --- .../python-modules/numdifftools/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/numdifftools/default.nix diff --git a/pkgs/development/python-modules/numdifftools/default.nix b/pkgs/development/python-modules/numdifftools/default.nix new file mode 100644 index 000000000000..bc5914be721c --- /dev/null +++ b/pkgs/development/python-modules/numdifftools/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytestCheckHook +, pythonOlder +, scipy +}: + +buildPythonPackage rec { + pname = "numdifftools"; + version = "0.9.40"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "pbrod"; + repo = pname; + rev = "v${version}"; + hash = "sha256-YLi9cNHcZ/PlhrhvYOMfRTOt4kinQcfxvqInT8/0Qpg="; + }; + + propagatedBuildInputs = [ + numpy + scipy + ]; + + # Tests requires algopy and other modules which are optional and/or not available + doCheck = false; + + postPatch = '' + substituteInPlace setup.py \ + --replace '"pytest-runner"' "" + # Remove optional dependencies + substituteInPlace requirements.txt \ + --replace "algopy>=0.4" "" \ + --replace "statsmodels>=0.6" "" + ''; + + pythonImportsCheck = [ + "numdifftools" + ]; + + meta = with lib; { + description = "Library to solve automatic numerical differentiation problems in one or more variables"; + homepage = "https://github.com/pbrod/numdifftools"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d4ff7c5ebb8..5e8009a838db 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5862,6 +5862,8 @@ in { numcodecs = callPackage ../development/python-modules/numcodecs { }; + numdifftools = callPackage ../development/python-modules/numdifftools { }; + numericalunits = callPackage ../development/python-modules/numericalunits { }; numexpr = callPackage ../development/python-modules/numexpr { }; From 91824e319240fc6e9a0cc0bcb0bbfaa80aac32fb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 16:19:53 +0200 Subject: [PATCH 06/11] python310Packages.aeppl: init at 0.0.31 --- .../python-modules/aeppl/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/aeppl/default.nix diff --git a/pkgs/development/python-modules/aeppl/default.nix b/pkgs/development/python-modules/aeppl/default.nix new file mode 100644 index 000000000000..bf7f4b8d02aa --- /dev/null +++ b/pkgs/development/python-modules/aeppl/default.nix @@ -0,0 +1,51 @@ +{ lib +, aesara +, buildPythonPackage +, fetchFromGitHub +, numdifftools +, numpy +, pytestCheckHook +, pythonOlder +, scipy +}: + +buildPythonPackage rec { + pname = "aeppl"; + version = "0.0.31"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "aesara-devs"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-fbBtjU2skvfDCnRRW+9PIObsEOfKhl15qSLw3TGhl4k="; + }; + + propagatedBuildInputs = [ + aesara + numpy + scipy + ]; + + checkInputs = [ + numdifftools + pytestCheckHook + ]; + + preCheck = '' + export HOME=$(mktemp -d); + ''; + + pythonImportsCheck = [ + "aeppl" + ]; + + meta = with lib; { + description = "Library for an Aesara-based PPL"; + homepage = "https://github.com/aesara-devs/aeppl"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5e8009a838db..d1e09ad6cf48 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -209,6 +209,8 @@ in { aenum = callPackage ../development/python-modules/aenum { }; + aeppl = callPackage ../development/python-modules/aeppl { }; + aesara = callPackage ../development/python-modules/aesara { }; aesedb = callPackage ../development/python-modules/aesedb { }; From 5af41eba18d0c1623836293b4c777910e47bfd0a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 17:52:31 +0200 Subject: [PATCH 07/11] python310Packages.pynndescent: 0.5.6 -> 0.5.7 --- pkgs/development/python-modules/pynndescent/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix index 79b914f6122c..8389a7ae9c1f 100644 --- a/pkgs/development/python-modules/pynndescent/default.nix +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pynndescent"; - version = "0.5.6"; + version = "0.5.7"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-YfsxiFuqxGnWeTPix8k1tu3rsG7kmOLw+d/JfFnTclw="; + hash = "sha256-7LOVJV+janSLWHC0ugMA6g99qLGWSGS47dYld6hN/X0="; }; propagatedBuildInputs = [ From 7f38d0a148a5222026929e2b0f79f04ebb3890dd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 18:13:32 +0200 Subject: [PATCH 08/11] python310Packages.datashader: 0.13.0 -> 0.14.0 --- pkgs/development/python-modules/datashader/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/datashader/default.nix b/pkgs/development/python-modules/datashader/default.nix index 243571f248bb..e72d54cde4e3 100644 --- a/pkgs/development/python-modules/datashader/default.nix +++ b/pkgs/development/python-modules/datashader/default.nix @@ -15,6 +15,7 @@ , pyct , scipy , pytestCheckHook +, pythonOlder , nbsmoke , fastparquet , nbconvert @@ -24,12 +25,14 @@ buildPythonPackage rec { pname = "datashader"; - version = "0.13.0"; + version = "0.14.0"; format = "setuptools"; + disabled = pythonOlder "3.7"; + src = fetchPypi { inherit pname version; - sha256 = "sha256-6JscHm1QjDmXOLLa83qhAvY/xwvlPM6duQ1lSxnCVV8="; + hash = "sha256-VKEDOJV2ITO1gxKLbFQbcem0gEd/fzTIo+QSmZVsMGI="; }; propagatedBuildInputs = [ From c18e7de036625a81b8266cf41ed755fb8b4d69d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 24 May 2022 21:44:44 +0200 Subject: [PATCH 09/11] python39Packages.umap-learn: disable flaky test --- .../python-modules/umap-learn/default.nix | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/umap-learn/default.nix b/pkgs/development/python-modules/umap-learn/default.nix index 1281d90cdaf5..25016f9b4cc5 100644 --- a/pkgs/development/python-modules/umap-learn/default.nix +++ b/pkgs/development/python-modules/umap-learn/default.nix @@ -1,43 +1,45 @@ { lib , buildPythonPackage , fetchFromGitHub -, nose +, keras +, numba , numpy +, pynndescent +, pytestCheckHook +, pythonOlder , scikit-learn , scipy -, numba -, pynndescent , tensorflow , tqdm -, pytestCheckHook -, keras }: buildPythonPackage rec { pname = "umap-learn"; version = "0.5.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "lmcinnes"; repo = "umap"; rev = version; - sha256 = "sha256-S2+k7Ec4AxsN6d0GUGnU81oLnBgmlZp8OmUFCNaUJYw="; + hash = "sha256-S2+k7Ec4AxsN6d0GUGnU81oLnBgmlZp8OmUFCNaUJYw="; }; propagatedBuildInputs = [ + numba numpy + pynndescent scikit-learn scipy - numba - pynndescent tqdm ]; checkInputs = [ - nose - tensorflow - pytestCheckHook keras + pytestCheckHook + tensorflow ]; preCheck = '' @@ -52,6 +54,7 @@ buildPythonPackage rec { # Flaky test. Fails with AssertionError sometimes. "test_sparse_hellinger" + "test_densmap_trustworthiness_on_iris_supervised" # tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821 "test_save_load" @@ -61,6 +64,6 @@ buildPythonPackage rec { description = "Uniform Manifold Approximation and Projection"; homepage = "https://github.com/lmcinnes/umap"; license = licenses.bsd3; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From cd22937423fc5c97f45677dc8af0895096a3df72 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 26 May 2022 23:32:44 +0200 Subject: [PATCH 10/11] python310Packages.arviz: 0.12.0 -> 0.12.1 --- pkgs/development/python-modules/arviz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/arviz/default.nix b/pkgs/development/python-modules/arviz/default.nix index 4b5ed5ca687b..8cd1ae1b83da 100644 --- a/pkgs/development/python-modules/arviz/default.nix +++ b/pkgs/development/python-modules/arviz/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { pname = "arviz"; - version = "0.12.0"; + version = "0.12.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -40,7 +40,7 @@ buildPythonPackage rec { owner = "arviz-devs"; repo = pname; rev = "v${version}"; - hash = "sha256-ClARxgfji/CavEy8g5oeYK7pwSZS1yUIZnBiyTbZ/zU="; + hash = "sha256-5P6EXXAAS1Q2eNQuj/5JrDg0lPHfA5K4WaYfKaaXm9s="; }; propagatedBuildInputs = [ From 9b3553d1c4f685c0654a3b8043814eb458f2faa1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 27 May 2022 00:30:18 +0200 Subject: [PATCH 11/11] python310Packages.numba: 0.55.1 -> 0.55.2 --- pkgs/development/python-modules/numba/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 23921959f596..a9c152f412f8 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -22,13 +22,13 @@ let inherit (cudaPackages) cudatoolkit; in buildPythonPackage rec { - version = "0.55.1"; + version = "0.55.2"; pname = "numba"; disabled = pythonOlder "3.6" || pythonAtLeast "3.11"; src = fetchPypi { inherit pname version; - hash = "sha256-A+kGmiZm0chPk7ANvXFvuP7d6Lssbvr6LwSEKkZELqM="; + hash = "sha256-5CjZ4R2bpZKEnMyfegCQA+t9MGEgB+Nlr+dDznEYxvQ="; }; postPatch = ''