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