1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pytestCheckHook
6, numpy
7, pandas
8, scipy
9}:
10
11buildPythonPackage rec {
12 pname = "formulae";
13 version = "0.3.4";
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "bambinos";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-6IGTn3griooslN6+qRYLJiWaJhvsxa1xj1+1kQ57yN0=";
21 };
22
23 propagatedBuildInputs = [
24 numpy
25 pandas
26 scipy
27 ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30 # use assertions of form `assert pytest.approx(...)`, which is now disallowed:
31 disabledTests = [ "test_basic" "test_degree" ];
32 pythonImportsCheck = [
33 "formulae"
34 "formulae.matrices"
35 ];
36
37 meta = with lib; {
38 homepage = "https://bambinos.github.io/formulae";
39 description = "Formulas for mixed-effects models in Python";
40 license = licenses.mit;
41 maintainers = with maintainers; [ bcdarwin ];
42 };
43}