diff --git a/pkgs/development/python-modules/jupyter-collaboration-ui/default.nix b/pkgs/development/python-modules/jupyter-collaboration-ui/default.nix new file mode 100644 index 000000000000..2e571e222c25 --- /dev/null +++ b/pkgs/development/python-modules/jupyter-collaboration-ui/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + hatchling, + hatch-jupyter-builder, + jupyter-collaboration, +}: + +buildPythonPackage rec { + pname = "jupyter-collaboration-ui"; + version = "1.0.0"; + pyproject = true; + + src = fetchPypi { + pname = "jupyter_collaboration_ui"; + inherit version; + hash = "sha256-hTyUmLzRvexNTZxTv4Mbflm+OTW9j0HReLpAJuk/WnY="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail ', "jupyterlab>=4.0.0"' "" + ''; + + build-system = [ + hatchling + hatch-jupyter-builder + ]; + + pythonImportsCheck = [ "jupyter_collaboration_ui" ]; + + # no tests + doCheck = false; + + passthru.tests = jupyter-collaboration.tests; + + meta = { + description = "JupyterLab/Jupyter Notebook 7+ extension providing user interface integration for real time collaboration"; + homepage = "https://github.com/jupyterlab/jupyter-collaboration/tree/main/projects/jupyter-collaboration-ui"; + license = lib.licenses.bsd3; + maintainers = lib.teams.jupyter.members; + }; +} diff --git a/pkgs/development/python-modules/jupyter-collaboration/default.nix b/pkgs/development/python-modules/jupyter-collaboration/default.nix index 0489550cfc68..4f6e29fee66d 100644 --- a/pkgs/development/python-modules/jupyter-collaboration/default.nix +++ b/pkgs/development/python-modules/jupyter-collaboration/default.nix @@ -4,73 +4,42 @@ fetchPypi, # build-system - hatch-jupyter-builder, - hatch-nodejs-version, hatchling, - jupyterlab, # dependencies - jsonschema, - jupyter-events, - jupyter-server, - jupyter-server-fileid, - jupyter-ydoc, - pycrdt, - pycrdt-websocket, + jupyter-collaboration-ui, + jupyter-docprovider, + jupyter-server-ydoc, # tests - pytest-jupyter, - pytestCheckHook, - websockets, + callPackage, }: buildPythonPackage rec { pname = "jupyter-collaboration"; - version = "2.1.4"; + version = "3.0.0"; pyproject = true; src = fetchPypi { pname = "jupyter_collaboration"; inherit version; - hash = "sha256-YT3wrTQ8imuTK8zeJbwscHtawtqspf1oItGzMMfg5io="; + hash = "sha256-eewAsh/EI8DV4FNWgjEhT61RUbaYE6suOAny4bf1CCw="; }; - postPatch = '' - sed -i "/^timeout/d" pyproject.toml - ''; - - build-system = [ - hatch-jupyter-builder - hatch-nodejs-version - hatchling - jupyterlab - ]; + build-system = [ hatchling ]; dependencies = [ - jsonschema - jupyter-events - jupyter-server - jupyter-server-fileid - jupyter-ydoc - pycrdt - pycrdt-websocket - ]; - - nativeCheckInputs = [ - pytest-jupyter - pytestCheckHook - websockets + jupyter-collaboration-ui + jupyter-docprovider + jupyter-server-ydoc ]; pythonImportsCheck = [ "jupyter_collaboration" ]; - preCheck = '' - export HOME=$TEMP - ''; + # no tests + doCheck = false; - pytestFlagsArray = [ "-Wignore::DeprecationWarning" ]; - - __darwinAllowLocalNetworking = true; + passthru.tests = callPackage ./test.nix { }; meta = { description = "JupyterLab Extension enabling Real-Time Collaboration"; diff --git a/pkgs/development/python-modules/jupyter-collaboration/test.nix b/pkgs/development/python-modules/jupyter-collaboration/test.nix new file mode 100644 index 000000000000..044b923a723d --- /dev/null +++ b/pkgs/development/python-modules/jupyter-collaboration/test.nix @@ -0,0 +1,39 @@ +{ + stdenvNoCC, + fetchFromGitHub, + jupyter-collaboration, + pytest-jupyter, + pytestCheckHook, + websockets, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "jupyter-collaboration-test"; + inherit (jupyter-collaboration) version; + + src = fetchFromGitHub { + owner = "jupyterlab"; + repo = "jupyter-collaboration"; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-6hDYB1uC0WraB37s9EKLJF7jyFu0B3xLocuLYyKj4hs="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "timeout = 300" "" + ''; + + installPhase = '' + touch $out + ''; + + env.HOME = "$TMPDIR"; + + doCheck = true; + + nativeCheckInputs = [ + jupyter-collaboration + pytest-jupyter + pytestCheckHook + websockets + ]; +}) diff --git a/pkgs/development/python-modules/jupyter-docprovider/default.nix b/pkgs/development/python-modules/jupyter-docprovider/default.nix new file mode 100644 index 000000000000..d32dc1b31140 --- /dev/null +++ b/pkgs/development/python-modules/jupyter-docprovider/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + hatchling, + hatch-jupyter-builder, + jupyter-collaboration, +}: + +buildPythonPackage rec { + pname = "jupyter-docprovider"; + version = "1.0.0"; + pyproject = true; + + src = fetchPypi { + pname = "jupyter_docprovider"; + inherit version; + hash = "sha256-EcO3GqdbhRxawHwfSnjOHfFmYjpZy2NuuGc5CSW/xlY="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail ', "jupyterlab>=4.0.0"' "" + ''; + + build-system = [ + hatchling + hatch-jupyter-builder + ]; + + pythonImportsCheck = [ "jupyter_docprovider" ]; + + # no tests + doCheck = false; + + passthru.tests = jupyter-collaboration.tests; + + meta = { + description = "JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models"; + homepage = "https://github.com/jupyterlab/jupyter-collaboration/tree/main/projects/jupyter-docprovider"; + license = lib.licenses.bsd3; + maintainers = lib.teams.jupyter.members; + }; +} diff --git a/pkgs/development/python-modules/jupyter-server-ydoc/default.nix b/pkgs/development/python-modules/jupyter-server-ydoc/default.nix new file mode 100644 index 000000000000..1e988383621b --- /dev/null +++ b/pkgs/development/python-modules/jupyter-server-ydoc/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + hatchling, + jsonschema, + jupyter-events, + jupyter-server, + jupyter-server-fileid, + jupyter-ydoc, + pycrdt, + pycrdt-websocket, + jupyter-collaboration, +}: + +buildPythonPackage rec { + pname = "jupyter-server-ydoc"; + version = "1.0.0"; + pyproject = true; + + src = fetchPypi { + pname = "jupyter_server_ydoc"; + inherit version; + hash = "sha256-MBdSTB2gaIFbdIyPHr5+wI7aBH/Fl85ywSWxgAmjkek="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + jsonschema + jupyter-events + jupyter-server + jupyter-server-fileid + jupyter-ydoc + pycrdt + pycrdt-websocket + ]; + + pythonImportsCheck = [ "jupyter_server_ydoc" ]; + + # no tests + doCheck = false; + + passthru.tests = jupyter-collaboration.tests; + + meta = { + description = "Jupyter-server extension integrating collaborative shared models"; + homepage = "https://github.com/jupyterlab/jupyter-collaboration/tree/main/projects/jupyter-server-ydoc"; + license = lib.licenses.bsd3; + maintainers = lib.teams.jupyter.members; + }; +} diff --git a/pkgs/development/python-modules/jupyter-ydoc/default.nix b/pkgs/development/python-modules/jupyter-ydoc/default.nix index 4bb08e6ed9a5..5fa69f424fbd 100644 --- a/pkgs/development/python-modules/jupyter-ydoc/default.nix +++ b/pkgs/development/python-modules/jupyter-ydoc/default.nix @@ -18,13 +18,13 @@ buildPythonPackage rec { pname = "jupyter-ydoc"; - version = "2.1.2"; + version = "3.0.0"; pyproject = true; src = fetchPypi { pname = "jupyter_ydoc"; inherit version; - hash = "sha256-yYnIm0s9ljtYQJVzKJcimNTVSDTtjzz3Zo3WE9OfKsw="; + hash = "sha256-nPOU7nxpVSh+6tERJq2DYIOpyjze8uJyIdxN/gW7arE="; }; build-system = [ diff --git a/pkgs/development/python-modules/jupyterhub-ldapauthenticator/default.nix b/pkgs/development/python-modules/jupyterhub-ldapauthenticator/default.nix index c4da40729c0f..79c5c99ff99e 100644 --- a/pkgs/development/python-modules/jupyterhub-ldapauthenticator/default.nix +++ b/pkgs/development/python-modules/jupyterhub-ldapauthenticator/default.nix @@ -1,32 +1,52 @@ { lib, buildPythonPackage, + fetchFromGitHub, + setuptools, jupyterhub, ldap3, - fetchPypi, + traitlets, + pytestCheckHook, + pytest-asyncio, }: buildPythonPackage rec { pname = "jupyterhub-ldapauthenticator"; - version = "1.3.2"; - format = "setuptools"; + version = "2.0.1"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "758081bbdb28b26313bb18c9d8aa2b8fcdc9162e4d3ab196c626567e64f1ab8b"; + src = fetchFromGitHub { + owner = "jupyterhub"; + repo = "ldapauthenticator"; + rev = "refs/tags/${version}"; + hash = "sha256-pb1d0dqu3VGCsuibpYgncbqCM9fz09yyoKGcKb14f4k="; }; - # No tests implemented - doCheck = false; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ jupyterhub ldap3 + traitlets + ]; + + pythonImportsCheck = [ "ldapauthenticator" ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + disabledTests = [ + # touch the socket + "test_allow_config" + "test_ldap_auth" ]; meta = with lib; { description = "Simple LDAP Authenticator Plugin for JupyterHub"; homepage = "https://github.com/jupyterhub/ldapauthenticator"; + changelog = "https://github.com/jupyterhub/ldapauthenticator/blob/${version}/CHANGELOG.md"; license = licenses.bsd3; }; } diff --git a/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix b/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix index c40866fd3d82..ebcbfb71d7c5 100644 --- a/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix +++ b/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "jupyterhub-systemdspawner"; - version = "1.0.1"; + version = "1.0.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "jupyterhub"; repo = "systemdspawner"; rev = "refs/tags/v${version}"; - hash = "sha256-2Pxswa472umovHBUVTIX1l+Glj6bzzgBLsu+p4IA6jA="; + hash = "sha256-obM8HGCHsisRV1+kHMWdA7d6eb6awwPMBuDUAf3k0uI="; }; postPatch = '' diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index 76fbe01ae3d1..5fb9cc969b59 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -42,7 +42,7 @@ buildPythonPackage rec { pname = "jupyterhub"; - version = "5.1.0"; + version = "5.2.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -51,12 +51,12 @@ buildPythonPackage rec { owner = "jupyterhub"; repo = "jupyterhub"; rev = "refs/tags/${version}"; - hash = "sha256-3L83FLhLCdTgOuFRgRMbz316cYbai0Z+hJwxXUCYB2Y="; + hash = "sha256-zOWcXpByJRzI9sTjTl+w/vo99suKOEN0TvPn1ZWlNmc="; }; npmDeps = fetchNpmDeps { inherit src; - hash = "sha256-b7j6iGYXrwco4YruqRPEEi4yWRF6otTUD2jKCEPcLTE="; + hash = "sha256-My7WUAqIvOrbbVTxSnA6a5NviM6u95+iyykx1xbudpw="; }; postPatch = '' diff --git a/pkgs/development/python-modules/mkdocs-jupyter/default.nix b/pkgs/development/python-modules/mkdocs-jupyter/default.nix index dd0c300ab175..c0286491927c 100644 --- a/pkgs/development/python-modules/mkdocs-jupyter/default.nix +++ b/pkgs/development/python-modules/mkdocs-jupyter/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "mkdocs-jupyter"; - version = "0.25.0"; + version = "0.25.1"; pyproject = true; disabled = pythonOlder "3.9"; @@ -24,7 +24,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "mkdocs_jupyter"; inherit version; - hash = "sha256-4mwdNBkWvFf5bqP5PY0KiPx3yH1M7iIvZtIAd5jZJPU="; + hash = "sha256-DpJy/0lH4OxoPJJCOkv7QqJkd8EDqxpquCd+LcyPev4="; }; pythonRelaxDeps = [ "nbconvert" ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 75ce887ee4f7..6c6091354793 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6634,12 +6634,16 @@ self: super: with self; { jupyter-collaboration = callPackage ../development/python-modules/jupyter-collaboration { }; + jupyter-collaboration-ui = callPackage ../development/python-modules/jupyter-collaboration-ui { }; + jupyter-contrib-core = callPackage ../development/python-modules/jupyter-contrib-core { }; jupyter-console = callPackage ../development/python-modules/jupyter-console { }; jupyter-core = callPackage ../development/python-modules/jupyter-core { }; + jupyter-docprovider = callPackage ../development/python-modules/jupyter-docprovider { }; + jupyter-events = callPackage ../development/python-modules/jupyter-events { }; jupyter-highlight-selected-word = callPackage ../development/python-modules/jupyter-highlight-selected-word { }; @@ -6654,6 +6658,8 @@ self: super: with self; { jupyter-server-terminals = callPackage ../development/python-modules/jupyter-server-terminals { }; + jupyter-server-ydoc = callPackage ../development/python-modules/jupyter-server-ydoc { }; + jupyter-ui-poll = callPackage ../development/python-modules/jupyter-ui-poll { }; jupyter-ydoc = callPackage ../development/python-modules/jupyter-ydoc { };