1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pythonOlder,
7 setuptools,
8 numpy,
9 scipy,
10 matplotlib,
11 plotly,
12 pandas,
13 hypothesis,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "synergy";
19 version = "1.0.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.5";
23
24 src = fetchFromGitHub {
25 owner = "djwooten";
26 repo = "synergy";
27 tag = "v${version}";
28 hash = "sha256-df5CBEcRx55/rSMc6ygMVrHbbEcnU1ISJheO+WoBSCI=";
29 };
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 numpy
35 scipy
36 matplotlib
37 plotly
38 pandas
39 ];
40
41 nativeCheckInputs = [
42 hypothesis
43 pytestCheckHook
44 ];
45
46 disabledTests =
47 [
48 # flaky: hypothesis.errors.FailedHealthCheck
49 "test_asymptotic_limits"
50 "test_inverse"
51 # AssertionError: synthetic_BRAID_reference_1.csv
52 # E3=0 not in (0.10639582639915163, 1.6900177333904622)
53 "test_BRAID_fit_bootstrap"
54 ]
55 ++ lib.optionals stdenv.hostPlatform.isDarwin [
56 # AssertionError: np.False_ is not true
57 "test_fit_loewe_antagonism"
58 ];
59
60 pythonImportsCheck = [ "synergy" ];
61
62 meta = with lib; {
63 description = "Python library for calculating, analyzing, and visualizing drug combination synergy";
64 homepage = "https://github.com/djwooten/synergy";
65 maintainers = [ ];
66 license = licenses.gpl3Plus;
67 };
68}