Skip to content

Commit

Permalink
python3Packages.pymanopt: marked as broken
Browse files Browse the repository at this point in the history
  • Loading branch information
yl3dy committed May 23, 2023
1 parent c719e9d commit 17eec7a
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions pkgs/development/python-modules/pymanopt/default.nix
Expand Up @@ -5,14 +5,14 @@
, scipy
, torch
, autograd
, nose2
, matplotlib
, tensorflow
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "pymanopt";
version = "2.1.1";
format = "setuptools";

src = fetchFromGitHub {
owner = pname;
Expand All @@ -22,31 +22,28 @@ buildPythonPackage rec {
};

propagatedBuildInputs = [ numpy scipy torch ];
nativeCheckInputs = [ nose2 autograd matplotlib tensorflow ];
nativeCheckInputs = [ autograd matplotlib pytestCheckHook ];

checkPhase = ''
runHook preCheck
# upstream themselves seem unsure about the robustness of these
# tests - see https://github.com/pymanopt/pymanopt/issues/219
grep -lr 'test_second_order_function_approximation' tests/ | while read -r fn ; do
substituteInPlace "$fn" \
--replace \
'test_second_order_function_approximation' \
'dont_test_second_order_function_approximation'
done
nose2 tests -v
runHook postCheck
preCheck = ''
substituteInPlace "tests/conftest.py" \
--replace "import tensorflow as tf" ""
substituteInPlace "tests/conftest.py" \
--replace "tf.random.set_seed(seed)" ""
'';

disabledTestPaths = [
"tests/test_examples.py"
"tests/backends/test_tensorflow.py"
"tests/test_problem.py"
];

pythonImportsCheck = [ "pymanopt" ];

meta = {
description = "Python toolbox for optimization on Riemannian manifolds with support for automatic differentiation";
homepage = "https://www.pymanopt.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ yl3dy ];
broken = lib.versionAtLeast scipy.version "1.10.0";
};
}

0 comments on commit 17eec7a

Please sign in to comment.