about summary refs log tree commit diff
path: root/pkgs/development/python-modules/experiment-utilities/default.nix
blob: 918114789b4db9675435954acbfa7e35833172f7 (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
{
  lib,
  buildPythonPackage,
  cloudpickle,
  dill,
  fasteners,
  fetchFromGitLab,
  qgrid,
  ipynbname,
  ipywidgets,
  odfpy,
  scipy,
  plotly,
  pytestCheckHook,
  pyyaml,
  tabulate,
  tensorboard,
  torch,
}:

buildPythonPackage rec {
  pname = "experiment-utilities";
  version = "0.3.6";
  format = "setuptools";

  src = fetchFromGitLab {
    owner = "creinke";
    repo = "exputils";
    domain = "gitlab.inria.fr";
    rev = "refs/tags/version_${version}";
    hash = "sha256-jo0CBSpUc/F1lJ2vagocngDM1Lopw5/AJnt1QwCunA8=";
  };

  # This dependency constraint (<=7.6.5) was due to a bug in qgrid that has been patched in its
  # owned derivation
  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "ipywidgets >= 7.5.1,<= 7.6.5" "ipywidgets >= 7.5.1"
  '';

  propagatedBuildInputs = [
    cloudpickle
    dill
    fasteners
    ipynbname
    ipywidgets
    odfpy
    plotly
    pyyaml
    qgrid
    scipy
    tabulate
    tensorboard
  ];

  nativeCheckInputs = [
    pytestCheckHook
    torch
  ];

  disabledTests = [ "test_experimentstarter" ];

  pythonImportsCheck = [ "exputils" ];

  meta = with lib; {
    description = "Various tools to run scientific computer experiments.";
    homepage = "https://gitlab.inria.fr/creinke/exputils";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ GaetanLepage ];
  };
}