diff --git a/pkgs/development/python-modules/jupyter-server-ydoc/default.nix b/pkgs/development/python-modules/jupyter-collaboration/default.nix similarity index 55% rename from pkgs/development/python-modules/jupyter-server-ydoc/default.nix rename to pkgs/development/python-modules/jupyter-collaboration/default.nix index a60f74aefbdd..9f17874dfc32 100644 --- a/pkgs/development/python-modules/jupyter-server-ydoc/default.nix +++ b/pkgs/development/python-modules/jupyter-collaboration/default.nix @@ -1,29 +1,33 @@ { lib , buildPythonPackage , pythonOlder -, fetchFromGitHub +, fetchPypi +, hatch-jupyter-builder +, hatch-nodejs-version , hatchling , pythonRelaxDepsHook +, jupyter-events +, jupyter-server , jupyter-server-fileid , jupyter-ydoc , ypy-websocket +, pytest-asyncio , pytest-jupyter , pytestCheckHook }: buildPythonPackage rec { - pname = "jupyter-server-ydoc"; - version = "0.8.0"; + pname = "jupyter-collaboration"; + version = "1.0.1"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; format = "pyproject"; - src = fetchFromGitHub { - owner = "jupyterlab"; - repo = "jupyter_collaboration"; - rev = "refs/tags/v${version}"; - hash = "sha256-KLb7kU5jsj6ihGO6HU3Y7uF+0PcwKoQlqQAhtO0oaJw="; + src = fetchPypi { + pname = "jupyter_collaboration"; + inherit version; + hash = "sha256-cf7BpF6WSoHQJQW0IXdpCAGTdkX9RNWZ4JovTHvcPho="; }; postPatch = '' @@ -31,6 +35,8 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ + hatch-jupyter-builder + hatch-nodejs-version hatchling pythonRelaxDepsHook ]; @@ -40,14 +46,17 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ + jupyter-events + jupyter-server jupyter-server-fileid jupyter-ydoc ypy-websocket ]; - pythonImportsCheck = [ "jupyter_server_ydoc" ]; + pythonImportsCheck = [ "jupyter_collaboration" ]; nativeCheckInputs = [ + pytest-asyncio pytest-jupyter pytestCheckHook ]; @@ -57,10 +66,10 @@ buildPythonPackage rec { ''; meta = { - changelog = "https://github.com/jupyterlab/jupyter_collaboration/blob/${src.rev}/CHANGELOG.md"; - description = "A Jupyter Server Extension Providing Y Documents"; + changelog = "https://github.com/jupyterlab/jupyter_collaboration/blob/v${version}/CHANGELOG.md"; + description = "JupyterLab Extension enabling Real-Time Collaboration"; homepage = "https://github.com/jupyterlab/jupyter_collaboration"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ dotlambda ]; + maintainers = lib.teams.jupyter.members; }; } diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a6ef2838bcb6..6ec506a14449 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -182,6 +182,7 @@ mapAliases ({ jupyter_client = jupyter-client; # added 2021-10-15 jupyter_core = jupyter-core; # added 2023-01-05 jupyter_server = jupyter-server; # added 2023-01-05 + jupyter-server-ydoc = jupyter-collaboration; # added 2023-07-18 Kajiki = kajiki; # added 2023-02-19 Keras = keras; # added 2021-11-25 larynx-train = piper-train; # added 2023-06-09 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 83b45cde21b3..998aa36cb6c4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5485,6 +5485,8 @@ self: super: with self; { jupyter-client = callPackage ../development/python-modules/jupyter-client { }; + jupyter-collaboration = callPackage ../development/python-modules/jupyter-collaboration { }; + jupyter-contrib-core = callPackage ../development/python-modules/jupyter-contrib-core { }; jupyter-contrib-nbextensions = callPackage ../development/python-modules/jupyter-contrib-nbextensions { }; @@ -5507,8 +5509,6 @@ 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 { };