From 0eacecad3652580b4fb7990ed7f360f095ab5065 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Sat, 25 May 2024 12:34:07 -0400 Subject: [PATCH] python312Packages.hyppo: unbreak Disabled doctests which seem not properly maintained/tested; disabled test collection of non-source directories (e.g. 'tutorials' contains some broken code, but no actual tests) --- .../python-modules/hyppo/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/hyppo/default.nix b/pkgs/development/python-modules/hyppo/default.nix index 896bbe640cc0..2d3f2563ad01 100644 --- a/pkgs/development/python-modules/hyppo/default.nix +++ b/pkgs/development/python-modules/hyppo/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, pythonOlder, fetchFromGitHub, + setuptools, pytestCheckHook, autograd, numba, @@ -16,7 +17,7 @@ buildPythonPackage rec { pname = "hyppo"; version = "0.4.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -27,6 +28,14 @@ buildPythonPackage rec { hash = "sha256-QRE3oSxTEobTQ/7DzCAUOdjzIZmWUn9bgPmJWj6JuZg="; }; + # some of the doctests (4/21) are broken, e.g. unbound variables, nondeterministic with insufficient tolerance, etc. + # (note upstream's .circleci/config.yml only tests test_*.py files despite their pytest.ini adding --doctest-modules) + postPatch = '' + substituteInPlace pytest.ini --replace-fail "addopts = --doctest-modules" "" + ''; + + build-system = [ setuptools ]; + propagatedBuildInputs = [ autograd numba @@ -40,15 +49,14 @@ buildPythonPackage rec { matplotlib seaborn ]; - disabledTestPaths = [ - "docs" - "benchmarks" - "examples" + pytestFlagsArray = [ + "hyppo" ]; meta = with lib; { homepage = "https://github.com/neurodata/hyppo"; description = "Python package for multivariate hypothesis testing"; + changelog = "https://github.com/neurodata/hyppo/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ bcdarwin ]; };