about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/papermill/default.nix
blob: 83e4a9f6f731429b65627951cd5d37da07902cc3 (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
, buildPythonPackage
, fetchPypi
, ansiwrap
, click
, future
, pyyaml
, nbformat
, nbconvert
, nbclient
, six
, tqdm
, jupyter-client
, requests
, entrypoints
, tenacity
, futures ? null
, black
, backports_tempfile
, isPy27
, pytest
, pytest-cov
, pytest-mock
}:

buildPythonPackage rec {
  pname = "papermill";
  version = "2.3.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "349aecd526c15c39f73a08df836467e2fead877c474d82c7df349f27ad272525";
  };

  propagatedBuildInputs = [
    ansiwrap
    click
    future
    pyyaml
    nbformat
    nbconvert
    nbclient
    six
    tqdm
    jupyter-client
    requests
    entrypoints
    tenacity
    black
  ] ++ lib.optionals isPy27 [
    futures
    backports_tempfile
  ];

  checkInputs = [
    pytest
    pytest-cov
    pytest-mock
  ];

  checkPhase = ''
    HOME=$(mktemp -d) pytest
  '';

  # the test suite depends on cloud resources azure/aws
  doCheck = false;

  meta = with lib; {
    description = "Parametrize and run Jupyter and nteract Notebooks";
    homepage = "https://github.com/nteract/papermill";
    license = licenses.bsd3;
    maintainers = [ maintainers.costrouc ];
  };
}