diff --git a/pkgs/development/python-modules/jupyter-contrib-core/default.nix b/pkgs/development/python-modules/jupyter-contrib-core/default.nix index 0f9c573e30070..a81c354974307 100644 --- a/pkgs/development/python-modules/jupyter-contrib-core/default.nix +++ b/pkgs/development/python-modules/jupyter-contrib-core/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , jupyter-core , notebook +, pytestCheckHook }: buildPythonPackage rec { @@ -21,6 +22,13 @@ buildPythonPackage rec { notebook ]; + nativeCheckInputs = [ pytestCheckHook ]; + + disabledTestPaths = [ + # This test fails upstream too + "tests/test_application.py" + ]; + pythonImportsCheck = [ "jupyter_contrib_core" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix b/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix index bf9bc2bd7cd0e..73ba031e39925 100644 --- a/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix +++ b/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix @@ -6,6 +6,9 @@ , jupyter-highlight-selected-word , jupyter-nbextensions-configurator , lxml +, nose +, pytestCheckHook +, notebook }: buildPythonPackage rec { @@ -27,6 +30,20 @@ buildPythonPackage rec { lxml ]; + nativeCheckInputs = [ + nose + pytestCheckHook + ]; + + disabledTestPaths = [ + # Thoses tests fail upstream because of nbconvert being too recent + # https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1606 + "tests/test_exporters.py" + + # Requires to run jupyter which is not feasible here + "tests/test_application.py" + ]; + pythonImportsCheck = [ "jupyter_contrib_nbextensions" ]; meta = with lib; { @@ -34,5 +51,7 @@ buildPythonPackage rec { homepage = "https://github.com/ipython-contrib/jupyter_contrib_nbextensions"; license = licenses.bsd3; maintainers = with maintainers; [ GaetanLepage ]; + # https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1647 + broken = versionAtLeast notebook.version "7"; }; } diff --git a/pkgs/development/python-modules/jupyter-highlight-selected-word/default.nix b/pkgs/development/python-modules/jupyter-highlight-selected-word/default.nix index a069ecf948f51..64cbe33ae8bad 100644 --- a/pkgs/development/python-modules/jupyter-highlight-selected-word/default.nix +++ b/pkgs/development/python-modules/jupyter-highlight-selected-word/default.nix @@ -14,6 +14,9 @@ buildPythonPackage rec { hash = "sha256-KgM//SIfES46uZySwNR4ZOcolnJORltvThsmEvxXoIs="; }; + # This package does not have tests + doChecks = false; + pythonImportsCheck = [ "jupyter_highlight_selected_word" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/jupyter-nbextensions-configurator/default.nix b/pkgs/development/python-modules/jupyter-nbextensions-configurator/default.nix index c675542be1080..61c235877f4a1 100644 --- a/pkgs/development/python-modules/jupyter-nbextensions-configurator/default.nix +++ b/pkgs/development/python-modules/jupyter-nbextensions-configurator/default.nix @@ -8,6 +8,9 @@ , notebook , pyyaml , tornado +, nose +, pytestCheckHook +, selenium }: buildPythonPackage rec { @@ -39,6 +42,19 @@ buildPythonPackage rec { tornado ]; + nativeCheckInputs = [ + nose + pytestCheckHook + selenium + ]; + + # Those tests fails upstream + disabledTestPaths = [ + "tests/test_application.py" + "tests/test_jupyterhub.py" + "tests/test_nbextensions_configurator.py" + ]; + pythonImportsCheck = [ "jupyter_nbextensions_configurator" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/nbconvert/default.nix b/pkgs/development/python-modules/nbconvert/default.nix index 54632a5025736..e7fb3dfba4721 100644 --- a/pkgs/development/python-modules/nbconvert/default.nix +++ b/pkgs/development/python-modules/nbconvert/default.nix @@ -1,28 +1,28 @@ -{ beautifulsoup4 -, bleach +{ lib +, fetchurl , buildPythonPackage -, defusedxml +, pythonOlder , fetchPypi -, fetchpatch -, fetchurl , hatchling -, importlib-metadata -, ipywidgets +, beautifulsoup4 +, bleach +, defusedxml , jinja2 , jupyter-core , jupyterlab-pygments -, lib , markupsafe , mistune , nbclient , packaging , pandocfilters , pygments -, pyppeteer -, pytestCheckHook -, pythonOlder , tinycss2 , traitlets +, importlib-metadata +, flaky +, ipywidgets +, pyppeteer +, pytestCheckHook }: let @@ -33,15 +33,15 @@ let }; in buildPythonPackage rec { pname = "nbconvert"; - version = "7.2.5"; + version = "7.7.3"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-j9xE/X2UJNt/3G4eg0oC9rhiD/tlN2c4i+L56xb4QYQ="; + hash = "sha256-SlmWv1880WqgQxiXuhqkxkhCwgefQ0s9xrjEslLvM1U="; }; # Add $out/share/jupyter to the list of paths that are used to search for @@ -85,6 +85,7 @@ in buildPythonPackage rec { ''; nativeCheckInputs = [ + flaky ipywidgets pyppeteer pytestCheckHook diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 957752040e43b..95f387653d972 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "notebook"; - version = "7.0.1"; + version = "7.0.2"; disabled = pythonOlder "3.8"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-LhatTmPqiffvviEu58FpP8+lq1X/73UEdTD3SvS9kmw="; + hash = "sha256-1w1qB0GMgpvV9UM3zpk7cQUmHZAm+dP+aOm4qhog2po="; }; postPatch = ''