1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 autograd, 11 future, 12 numba, 13 numpy, 14 pandas, 15 patsy, 16 scikit-learn, 17 scipy, 18 statsmodels, 19 20 # tests 21 matplotlib, 22 pytest-xdist, 23 pytestCheckHook, 24 seaborn, 25}: 26 27buildPythonPackage rec { 28 pname = "hyppo"; 29 version = "0.5.2"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "neurodata"; 34 repo = "hyppo"; 35 tag = "v${version}"; 36 hash = "sha256-7Y+UhneIGwqjsPCnGAQWF/l4r1gFbYs3fdHhV46ZBjA="; 37 }; 38 39 # some of the doctests (4/21) are broken, e.g. unbound variables, nondeterministic with insufficient tolerance, etc. 40 # (note upstream's .circleci/config.yml only tests test_*.py files despite their pytest.ini adding --doctest-modules) 41 postPatch = '' 42 substituteInPlace pytest.ini --replace-fail "addopts = --doctest-modules" "" 43 ''; 44 45 build-system = [ setuptools ]; 46 47 dependencies = [ 48 autograd 49 future 50 numba 51 numpy 52 pandas 53 patsy 54 scikit-learn 55 scipy 56 statsmodels 57 ]; 58 59 nativeCheckInputs = [ 60 pytest-xdist 61 pytestCheckHook 62 matplotlib 63 seaborn 64 ]; 65 enabledTestPaths = [ 66 "hyppo" 67 ]; 68 69 meta = { 70 homepage = "https://github.com/neurodata/hyppo"; 71 description = "Python package for multivariate hypothesis testing"; 72 changelog = "https://github.com/neurodata/hyppo/releases/tag/v${version}"; 73 license = lib.licenses.mit; 74 maintainers = with lib.maintainers; [ bcdarwin ]; 75 }; 76}