From ae1039c04793c28f473084e14608cd1fc3a3dce8 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Aug 2023 08:19:24 +0200 Subject: [PATCH 1/6] python310Packages.notebook: 7.0.1 -> 7.0.2 --- pkgs/development/python-modules/notebook/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = '' From cdb0e2e82bfa5b58b9177437184f53f7491a17b9 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Jul 2023 08:49:16 +0200 Subject: [PATCH 2/6] python310Packages.jupyter-contrib-core: run tests --- .../python-modules/jupyter-contrib-core/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) 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; { From b9dab7ce25ad12e82c81e9f33f89dbbe7134a9e1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Jul 2023 08:49:34 +0200 Subject: [PATCH 3/6] python310Packages.jupyter-nbextensions-configurator: run tests --- .../default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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; { From bb244d60b922f78a13939995caaf6d1e8ef47dd5 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Jul 2023 08:52:54 +0200 Subject: [PATCH 4/6] python310Packages.jupyter-highlight-selected-word: explicitly disable tests --- .../python-modules/jupyter-highlight-selected-word/default.nix | 3 +++ 1 file changed, 3 insertions(+) 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; { From 635923cf53ffc8932511c90e15250b49026fc48d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Jul 2023 15:25:05 +0200 Subject: [PATCH 5/6] python310Packages.nbconvert: 7.2.5 -> 7.7.3 --- .../python-modules/nbconvert/default.nix | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) 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 From 3f69b1cbfaf1d6e8a43ea0c133ef988feac544a3 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 20 Jul 2023 15:26:28 +0200 Subject: [PATCH 6/6] python310Packages.jupyter-contrib-nbextensions: run tests --- .../jupyter-contrib-nbextensions/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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"; }; }