From 33ed01ea05d8d79770a5fa9453c6bbae6b7c1ffc Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sun, 4 Feb 2024 07:26:47 +0000 Subject: [PATCH 1/4] python311Packages.osqp: disable failing unit tests disable unit tests failing after upgrade to scipy 1.12 as they appear to just be issues with the test and not the underlying functionality. Can re-enable once https://github.com/osqp/osqp-python/issues/121 is closed. --- pkgs/development/python-modules/osqp/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/osqp/default.nix b/pkgs/development/python-modules/osqp/default.nix index 13797c4d17f8..f58a3fec14c8 100644 --- a/pkgs/development/python-modules/osqp/default.nix +++ b/pkgs/development/python-modules/osqp/default.nix @@ -5,6 +5,7 @@ , fetchPypi , future , numpy +, oldest-supported-numpy , pytestCheckHook , pythonOlder , qdldl @@ -15,7 +16,7 @@ buildPythonPackage rec { pname = "osqp"; version = "0.6.3"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -28,6 +29,7 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake + oldest-supported-numpy setuptools-scm ]; @@ -50,6 +52,14 @@ buildPythonPackage rec { disabledTests = [ # Need an unfree license package - mkl "test_issue14" + ] + # disable tests failing after scipy 1.12 update + # https://github.com/osqp/osqp-python/issues/121 + # re-enable once unit tests fixed + ++ [ + "feasibility_tests" + "polish_tests" + "update_matrices_tests" ]; meta = with lib; { From b4781965cdb0112934482fe342043c111839d4eb Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sun, 4 Feb 2024 07:51:36 +0000 Subject: [PATCH 2/4] python311Packages.cvxpy: apply upstream patch to fix unit test fixes unit test failure after scipy 1.12 upgrade --- pkgs/development/python-modules/cvxpy/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/cvxpy/default.nix b/pkgs/development/python-modules/cvxpy/default.nix index a8e4b6dc9618..16a5adbf1594 100644 --- a/pkgs/development/python-modules/cvxpy/default.nix +++ b/pkgs/development/python-modules/cvxpy/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , buildPythonPackage +, fetchpatch , clarabel , cvxopt , ecos @@ -29,6 +30,16 @@ buildPythonPackage rec { hash = "sha256-CjhqV4jb14t7IN0HFSTsY2yPpys2KOafGrxxTI+YEeU="; }; + patches = [ + # fix QP tests. remove on next update + # https://github.com/cvxpy/cvxpy/pull/2343 + (fetchpatch { + name = "fix-QP-tests.patch"; + url = "https://github.com/cvxpy/cvxpy/commit/4c8549b9820e64c1b06f5d71c5d3f36528dd4a76.patch"; + hash = "sha256-43zjS1STEBaGgj1jEOlX3XzMsE4wjoKAk8ApJo98AzY="; + }) + ]; + # we need to patch out numpy version caps from upstream postPatch = '' sed -i 's/\(numpy>=[0-9.]*\),<[0-9.]*;/\1;/g' pyproject.toml From edcd5ae003178531237af049a85b3e569cc8f341 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sun, 4 Feb 2024 13:26:59 +0000 Subject: [PATCH 3/4] python311Packages.jaxopt: apply patch / disable failing tests after scipy 1.12 update add patch and disable failing aarch64 linux tests --- .../python-modules/jaxopt/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/development/python-modules/jaxopt/default.nix b/pkgs/development/python-modules/jaxopt/default.nix index 0f0e396b906d..af924cea5ab2 100644 --- a/pkgs/development/python-modules/jaxopt/default.nix +++ b/pkgs/development/python-modules/jaxopt/default.nix @@ -1,7 +1,9 @@ { lib +, stdenv , buildPythonPackage , pythonOlder , fetchFromGitHub +, fetchpatch , pytest-xdist , pytestCheckHook , absl-py @@ -29,6 +31,16 @@ buildPythonPackage rec { hash = "sha256-T/BHSnuk3IRuLkBj3Hvb/tFIb7Au25jjQtvwL28OU1U="; }; + patches = [ + # fix failing tests from scipy 1.12 update + # https://github.com/google/jaxopt/pull/574 + (fetchpatch { + name = "scipy-1.12-fix-tests.patch"; + url = "https://github.com/google/jaxopt/commit/48b09dc4cc93b6bc7e6764ed5d333f9b57f3493b.patch"; + hash = "sha256-v+617W7AhxA1Dzz+DBtljA4HHl89bRTuGi1QfatobNY="; + }) + ]; + propagatedBuildInputs = [ absl-py jax @@ -54,6 +66,13 @@ buildPythonPackage rec { "jaxopt.tree_util" ]; + disabledTests = lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ + # https://github.com/google/jaxopt/issues/577 + "test_binary_logit_log_likelihood" + "test_solve_sparse" + "test_logreg_with_intercept_manual_loop3" + ]; + meta = with lib; { homepage = "https://jaxopt.github.io"; description = "Hardware accelerated, batchable and differentiable optimizers in JAX"; From 8c75884e0ef1365973c785467e7a88269215c031 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sun, 4 Feb 2024 13:55:19 +0000 Subject: [PATCH 4/4] python311Packages.qutip: 4.7.4 -> 4.7.5 --- pkgs/development/python-modules/qutip/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qutip/default.nix b/pkgs/development/python-modules/qutip/default.nix index ddd3b18adbf0..6c57c8f3c076 100644 --- a/pkgs/development/python-modules/qutip/default.nix +++ b/pkgs/development/python-modules/qutip/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "qutip"; - version = "4.7.4"; + version = "4.7.5"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = pname; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-gfWYlQoGESE+EryLVfsnmBq9xFf3d92xOmEz4A32iqU="; + hash = "sha256-4nXZPZFu9L+Okha3qvPil1KvLGO1EbrzotQjqQ8r9l8="; }; nativeBuildInputs = [