Unverified Commit 193bf2fd authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #244492 from GaetanLepage/jupyter-extensions

Jupyter extensions: make sure to run tests (as much as possible)
parents b76dc453 3f69b1cb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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; {
+19 −0
Original line number Diff line number Diff line
@@ -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";
  };
}
+3 −0
Original line number Diff line number Diff line
@@ -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; {
+16 −0
Original line number Diff line number Diff line
@@ -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; {
+15 −14
Original line number Diff line number Diff line
{ 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
Loading