Skip to content

Commit 6b2e0aa

Browse files
authored
jupyter updates 2024-11-02 (NixOS#353035)
2 parents e62fd5b + 5478518 commit 6b2e0aa

File tree

11 files changed

+236
-62
lines changed

11 files changed

+236
-62
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
hatchling,
6+
hatch-jupyter-builder,
7+
jupyter-collaboration,
8+
}:
9+
10+
buildPythonPackage rec {
11+
pname = "jupyter-collaboration-ui";
12+
version = "1.0.0";
13+
pyproject = true;
14+
15+
src = fetchPypi {
16+
pname = "jupyter_collaboration_ui";
17+
inherit version;
18+
hash = "sha256-hTyUmLzRvexNTZxTv4Mbflm+OTW9j0HReLpAJuk/WnY=";
19+
};
20+
21+
postPatch = ''
22+
substituteInPlace pyproject.toml \
23+
--replace-fail ', "jupyterlab>=4.0.0"' ""
24+
'';
25+
26+
build-system = [
27+
hatchling
28+
hatch-jupyter-builder
29+
];
30+
31+
pythonImportsCheck = [ "jupyter_collaboration_ui" ];
32+
33+
# no tests
34+
doCheck = false;
35+
36+
passthru.tests = jupyter-collaboration.tests;
37+
38+
meta = {
39+
description = "JupyterLab/Jupyter Notebook 7+ extension providing user interface integration for real time collaboration";
40+
homepage = "https://github.com/jupyterlab/jupyter-collaboration/tree/main/projects/jupyter-collaboration-ui";
41+
license = lib.licenses.bsd3;
42+
maintainers = lib.teams.jupyter.members;
43+
};
44+
}

pkgs/development/python-modules/jupyter-collaboration/default.nix

+13-44
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,42 @@
44
fetchPypi,
55

66
# build-system
7-
hatch-jupyter-builder,
8-
hatch-nodejs-version,
97
hatchling,
10-
jupyterlab,
118

129
# dependencies
13-
jsonschema,
14-
jupyter-events,
15-
jupyter-server,
16-
jupyter-server-fileid,
17-
jupyter-ydoc,
18-
pycrdt,
19-
pycrdt-websocket,
10+
jupyter-collaboration-ui,
11+
jupyter-docprovider,
12+
jupyter-server-ydoc,
2013

2114
# tests
22-
pytest-jupyter,
23-
pytestCheckHook,
24-
websockets,
15+
callPackage,
2516
}:
2617

2718
buildPythonPackage rec {
2819
pname = "jupyter-collaboration";
29-
version = "2.1.4";
20+
version = "3.0.0";
3021
pyproject = true;
3122

3223
src = fetchPypi {
3324
pname = "jupyter_collaboration";
3425
inherit version;
35-
hash = "sha256-YT3wrTQ8imuTK8zeJbwscHtawtqspf1oItGzMMfg5io=";
26+
hash = "sha256-eewAsh/EI8DV4FNWgjEhT61RUbaYE6suOAny4bf1CCw=";
3627
};
3728

38-
postPatch = ''
39-
sed -i "/^timeout/d" pyproject.toml
40-
'';
41-
42-
build-system = [
43-
hatch-jupyter-builder
44-
hatch-nodejs-version
45-
hatchling
46-
jupyterlab
47-
];
29+
build-system = [ hatchling ];
4830

4931
dependencies = [
50-
jsonschema
51-
jupyter-events
52-
jupyter-server
53-
jupyter-server-fileid
54-
jupyter-ydoc
55-
pycrdt
56-
pycrdt-websocket
57-
];
58-
59-
nativeCheckInputs = [
60-
pytest-jupyter
61-
pytestCheckHook
62-
websockets
32+
jupyter-collaboration-ui
33+
jupyter-docprovider
34+
jupyter-server-ydoc
6335
];
6436

6537
pythonImportsCheck = [ "jupyter_collaboration" ];
6638

67-
preCheck = ''
68-
export HOME=$TEMP
69-
'';
70-
71-
pytestFlagsArray = [ "-Wignore::DeprecationWarning" ];
39+
# no tests
40+
doCheck = false;
7241

73-
__darwinAllowLocalNetworking = true;
42+
passthru.tests = callPackage ./test.nix { };
7443

7544
meta = {
7645
description = "JupyterLab Extension enabling Real-Time Collaboration";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
stdenvNoCC,
3+
fetchFromGitHub,
4+
jupyter-collaboration,
5+
pytest-jupyter,
6+
pytestCheckHook,
7+
websockets,
8+
}:
9+
stdenvNoCC.mkDerivation (finalAttrs: {
10+
pname = "jupyter-collaboration-test";
11+
inherit (jupyter-collaboration) version;
12+
13+
src = fetchFromGitHub {
14+
owner = "jupyterlab";
15+
repo = "jupyter-collaboration";
16+
rev = "refs/tags/v${finalAttrs.version}";
17+
hash = "sha256-6hDYB1uC0WraB37s9EKLJF7jyFu0B3xLocuLYyKj4hs=";
18+
};
19+
20+
postPatch = ''
21+
substituteInPlace pyproject.toml \
22+
--replace-fail "timeout = 300" ""
23+
'';
24+
25+
installPhase = ''
26+
touch $out
27+
'';
28+
29+
env.HOME = "$TMPDIR";
30+
31+
doCheck = true;
32+
33+
nativeCheckInputs = [
34+
jupyter-collaboration
35+
pytest-jupyter
36+
pytestCheckHook
37+
websockets
38+
];
39+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
hatchling,
6+
hatch-jupyter-builder,
7+
jupyter-collaboration,
8+
}:
9+
10+
buildPythonPackage rec {
11+
pname = "jupyter-docprovider";
12+
version = "1.0.0";
13+
pyproject = true;
14+
15+
src = fetchPypi {
16+
pname = "jupyter_docprovider";
17+
inherit version;
18+
hash = "sha256-EcO3GqdbhRxawHwfSnjOHfFmYjpZy2NuuGc5CSW/xlY=";
19+
};
20+
21+
postPatch = ''
22+
substituteInPlace pyproject.toml \
23+
--replace-fail ', "jupyterlab>=4.0.0"' ""
24+
'';
25+
26+
build-system = [
27+
hatchling
28+
hatch-jupyter-builder
29+
];
30+
31+
pythonImportsCheck = [ "jupyter_docprovider" ];
32+
33+
# no tests
34+
doCheck = false;
35+
36+
passthru.tests = jupyter-collaboration.tests;
37+
38+
meta = {
39+
description = "JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models";
40+
homepage = "https://github.com/jupyterlab/jupyter-collaboration/tree/main/projects/jupyter-docprovider";
41+
license = lib.licenses.bsd3;
42+
maintainers = lib.teams.jupyter.members;
43+
};
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
hatchling,
6+
jsonschema,
7+
jupyter-events,
8+
jupyter-server,
9+
jupyter-server-fileid,
10+
jupyter-ydoc,
11+
pycrdt,
12+
pycrdt-websocket,
13+
jupyter-collaboration,
14+
}:
15+
16+
buildPythonPackage rec {
17+
pname = "jupyter-server-ydoc";
18+
version = "1.0.0";
19+
pyproject = true;
20+
21+
src = fetchPypi {
22+
pname = "jupyter_server_ydoc";
23+
inherit version;
24+
hash = "sha256-MBdSTB2gaIFbdIyPHr5+wI7aBH/Fl85ywSWxgAmjkek=";
25+
};
26+
27+
build-system = [ hatchling ];
28+
29+
dependencies = [
30+
jsonschema
31+
jupyter-events
32+
jupyter-server
33+
jupyter-server-fileid
34+
jupyter-ydoc
35+
pycrdt
36+
pycrdt-websocket
37+
];
38+
39+
pythonImportsCheck = [ "jupyter_server_ydoc" ];
40+
41+
# no tests
42+
doCheck = false;
43+
44+
passthru.tests = jupyter-collaboration.tests;
45+
46+
meta = {
47+
description = "Jupyter-server extension integrating collaborative shared models";
48+
homepage = "https://github.com/jupyterlab/jupyter-collaboration/tree/main/projects/jupyter-server-ydoc";
49+
license = lib.licenses.bsd3;
50+
maintainers = lib.teams.jupyter.members;
51+
};
52+
}

pkgs/development/python-modules/jupyter-ydoc/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818

1919
buildPythonPackage rec {
2020
pname = "jupyter-ydoc";
21-
version = "2.1.2";
21+
version = "3.0.0";
2222
pyproject = true;
2323

2424
src = fetchPypi {
2525
pname = "jupyter_ydoc";
2626
inherit version;
27-
hash = "sha256-yYnIm0s9ljtYQJVzKJcimNTVSDTtjzz3Zo3WE9OfKsw=";
27+
hash = "sha256-nPOU7nxpVSh+6tERJq2DYIOpyjze8uJyIdxN/gW7arE=";
2828
};
2929

3030
build-system = [
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,52 @@
11
{
22
lib,
33
buildPythonPackage,
4+
fetchFromGitHub,
5+
setuptools,
46
jupyterhub,
57
ldap3,
6-
fetchPypi,
8+
traitlets,
9+
pytestCheckHook,
10+
pytest-asyncio,
711
}:
812

913
buildPythonPackage rec {
1014
pname = "jupyterhub-ldapauthenticator";
11-
version = "1.3.2";
12-
format = "setuptools";
15+
version = "2.0.1";
16+
pyproject = true;
1317

14-
src = fetchPypi {
15-
inherit pname version;
16-
sha256 = "758081bbdb28b26313bb18c9d8aa2b8fcdc9162e4d3ab196c626567e64f1ab8b";
18+
src = fetchFromGitHub {
19+
owner = "jupyterhub";
20+
repo = "ldapauthenticator";
21+
rev = "refs/tags/${version}";
22+
hash = "sha256-pb1d0dqu3VGCsuibpYgncbqCM9fz09yyoKGcKb14f4k=";
1723
};
1824

19-
# No tests implemented
20-
doCheck = false;
25+
build-system = [ setuptools ];
2126

22-
propagatedBuildInputs = [
27+
dependencies = [
2328
jupyterhub
2429
ldap3
30+
traitlets
31+
];
32+
33+
pythonImportsCheck = [ "ldapauthenticator" ];
34+
35+
nativeCheckInputs = [
36+
pytest-asyncio
37+
pytestCheckHook
38+
];
39+
40+
disabledTests = [
41+
# touch the socket
42+
"test_allow_config"
43+
"test_ldap_auth"
2544
];
2645

2746
meta = with lib; {
2847
description = "Simple LDAP Authenticator Plugin for JupyterHub";
2948
homepage = "https://github.com/jupyterhub/ldapauthenticator";
49+
changelog = "https://github.com/jupyterhub/ldapauthenticator/blob/${version}/CHANGELOG.md";
3050
license = licenses.bsd3;
3151
};
3252
}

pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
buildPythonPackage rec {
1313
pname = "jupyterhub-systemdspawner";
14-
version = "1.0.1";
14+
version = "1.0.2";
1515
pyproject = true;
1616

1717
disabled = pythonOlder "3.8";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
2020
owner = "jupyterhub";
2121
repo = "systemdspawner";
2222
rev = "refs/tags/v${version}";
23-
hash = "sha256-2Pxswa472umovHBUVTIX1l+Glj6bzzgBLsu+p4IA6jA=";
23+
hash = "sha256-obM8HGCHsisRV1+kHMWdA7d6eb6awwPMBuDUAf3k0uI=";
2424
};
2525

2626
postPatch = ''

pkgs/development/python-modules/jupyterhub/default.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
buildPythonPackage rec {
4444
pname = "jupyterhub";
45-
version = "5.1.0";
45+
version = "5.2.1";
4646
pyproject = true;
4747

4848
disabled = pythonOlder "3.8";
@@ -51,12 +51,12 @@ buildPythonPackage rec {
5151
owner = "jupyterhub";
5252
repo = "jupyterhub";
5353
rev = "refs/tags/${version}";
54-
hash = "sha256-3L83FLhLCdTgOuFRgRMbz316cYbai0Z+hJwxXUCYB2Y=";
54+
hash = "sha256-zOWcXpByJRzI9sTjTl+w/vo99suKOEN0TvPn1ZWlNmc=";
5555
};
5656

5757
npmDeps = fetchNpmDeps {
5858
inherit src;
59-
hash = "sha256-b7j6iGYXrwco4YruqRPEEi4yWRF6otTUD2jKCEPcLTE=";
59+
hash = "sha256-My7WUAqIvOrbbVTxSnA6a5NviM6u95+iyykx1xbudpw=";
6060
};
6161

6262
postPatch = ''

0 commit comments

Comments
 (0)