1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, coverage
6, ipykernel
7, jupyter-client
8, nbformat
9, pytestCheckHook
10, pytest
11, six
12, glibcLocales
13, matplotlib
14, sympy
15}:
16
17buildPythonPackage rec {
18 pname = "nbval";
19 version = "0.10.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.6";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-tKzv3BEyrvihtbYr+ak9Eo66UoObKFTqPkJZj023vrM=";
27 };
28
29 buildInputs = [
30 glibcLocales
31 ];
32
33 propagatedBuildInputs = [
34 coverage
35 ipykernel
36 jupyter-client
37 nbformat
38 pytest
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 matplotlib
44 sympy
45 ];
46
47 disabledTestPaths = [
48 "tests/test_ignore.py"
49 # These are the main tests but they're fragile so skip them. They error
50 # whenever matplotlib outputs any unexpected warnings, e.g. deprecation
51 # warnings.
52 "tests/test_unit_tests_in_notebooks.py"
53 # Impure
54 "tests/test_timeouts.py"
55 # No value for us
56 "tests/test_coverage.py"
57 # nbdime marked broken
58 "tests/test_nbdime_reporter.py"
59 ];
60
61 # Some of the tests use localhost networking.
62 __darwinAllowLocalNetworking = true;
63
64 pythonImportsCheck = [
65 "nbval"
66 ];
67
68 meta = with lib; {
69 description = "A py.test plugin to validate Jupyter notebooks";
70 homepage = "https://github.com/computationalmodelling/nbval";
71 license = licenses.bsd3;
72 maintainers = with maintainers; [ ];
73 };
74}