summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/synergy/default.nix
blob: 0668c963b24aee24e0b90b9e25c0c25b175b23ae (plain)
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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  numpy,
  scipy,
  matplotlib,
  plotly,
  pandas,
  hypothesis,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "synergy";
  version = "1.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "djwooten";
    repo = "synergy";
    tag = "v${version}";
    hash = "sha256-df5CBEcRx55/rSMc6ygMVrHbbEcnU1ISJheO+WoBSCI=";
  };

  build-system = [ setuptools ];

  dependencies = [
    numpy
    scipy
    matplotlib
    plotly
    pandas
  ];

  nativeCheckInputs = [
    hypothesis
    pytestCheckHook
  ];

  disabledTests = [
    # flaky: hypothesis.errors.FailedHealthCheck
    "test_asymptotic_limits"
    "test_inverse"
    # AssertionError: synthetic_BRAID_reference_1.csv
    #  E3=0 not in (0.10639582639915163, 1.6900177333904622)
    "test_BRAID_fit_bootstrap"
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # AssertionError: np.False_ is not true
    "test_fit_loewe_antagonism"
  ];

  pythonImportsCheck = [ "synergy" ];

  meta = {
    description = "Python library for calculating, analyzing, and visualizing drug combination synergy";
    homepage = "https://github.com/djwooten/synergy";
    maintainers = [ ];
    license = lib.licenses.gpl3Plus;
  };
}