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