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