about summary refs log tree commit diff
path: root/pkgs/development/python-modules/lifelines/default.nix
blob: b081bfae9d839ed545a0156eb5a8dbd077b2abe6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ lib
, autograd
, autograd-gamma
, buildPythonPackage
, dill
, fetchFromGitHub
, flaky
, formulaic
, jinja2
, matplotlib
, numpy
, pandas
, psutil
, pytestCheckHook
, pythonOlder
, scikit-learn
, scipy
, sybil
}:

buildPythonPackage rec {
  pname = "lifelines";
  version = "0.28.0";
  format = "setuptools";

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "CamDavidsonPilon";
    repo = "lifelines";
    rev = "refs/tags/v${version}";
    hash = "sha256-6j+RgKeBCvpcREf7j8NE2x+IUI/LaoT6jsnHny4ccVo=";
  };

  propagatedBuildInputs = [
    autograd
    autograd-gamma
    formulaic
    matplotlib
    numpy
    pandas
    scipy
  ];

  nativeCheckInputs = [
    dill
    flaky
    jinja2
    psutil
    pytestCheckHook
    scikit-learn
    sybil
  ];

  pythonImportsCheck = [
    "lifelines"
  ];

  disabledTestPaths = [
    "lifelines/tests/test_estimation.py"
  ];

  disabledTests = [
    "test_datetimes_to_durations_with_different_frequencies"
  ];

  meta = with lib; {
    description = "Survival analysis in Python";
    homepage = "https://lifelines.readthedocs.io";
    changelog = "https://github.com/CamDavidsonPilon/lifelines/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ swflint ];
  };
}