nixos/jupyter: migrate service to jupyter 7 setup#367106
nixos/jupyter: migrate service to jupyter 7 setup#367106JohnRTitor merged 1 commit intoNixOS:masterfrom
Conversation
|
Thanks for this. |
c306cf1 to
672818d
Compare
|
@GaetanLepage Updated. Thanks for the guidance |
The current commit message is |
|
Updated 🫡 |
1d673a5 to
e842be7
Compare
JohnRTitor
left a comment
There was a problem hiding this comment.
Blocked until the above comments are resolved
JohnRTitor
left a comment
There was a problem hiding this comment.
Please add a release notes too.
|
I’ll implement the changes either on the 31st or in the new year. |
1151605 to
4368108
Compare
|
@JohnRTitor I have added the change into the release-notes. I hope that is the correct place. Notebook config is now included again. |
5b4a927 to
9775de7
Compare
NixOS/nixpkgs#367106 Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
There was a problem hiding this comment.
Did some minor nitpicks.
And tested the module like this JohnRTitor/nix-conf@b6c504a
Lets me login now (with a previously generated password). But when I tried to generate a new one it showed an error. Could you investigate?
I am using a pretty basic config. https://github.com/JohnRTitor/nix-conf/blob/b6c504ab5ad36af2e4e0191fa4ca9fa67e04efa4/dev-environment/jupyter.nix
The above code snippet works if I use the server from
nix-shell -p 'python3.withPackages (ps: with ps; [jupyter])' --run 'jupyter notebook'
|
@JohnRTitor Thanks for the attention to detail! As for the error with password generation it looks like expected behaviour to me. The code in the notebook will run within its own execution environment, the kernel, this is isolated from the execution environment that the server itself runs within. https://docs.jupyter.org/en/latest/projects/kernels.html
You could try the following kernel to get it to work: When the kernel is set up this way it will be selectable in the UI. |
JohnRTitor
left a comment
There was a problem hiding this comment.
Nice, thanks.
Let me just rebase so we remove the merge conflict here.
… current versions Signed-off-by: Maximilian Ehlers <maximilian@sodawa.com> Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.11
git worktree add -d .worktree/backport-367106-to-release-24.11 origin/release-24.11
cd .worktree/backport-367106-to-release-24.11
git switch --create backport-367106-to-release-24.11
git cherry-pick -x f199d57ad67ebebf001f50db0f6f823ad1cf0835 |
Signed-off-by: Maximilian Ehlers <maximilian@sodawa.com> Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> (partially cherry picked from commit f199d57)
Signed-off-by: Maximilian Ehlers <maximilian@sodawa.com> Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
| ${cfg.notebookConfig} | ||
|
|
||
| c.NotebookApp.password = ${cfg.password} | ||
| c.ServerApp.password = "${cfg.password}" |
There was a problem hiding this comment.
This is a breaking change and should be mentioned in relnotes.
There was a problem hiding this comment.
Yep, already done :) https://github.com/NixOS/nixpkgs/pull/367106/files
There was a problem hiding this comment.
That only mentions about Jupyter 7 changes, not about the quoting behaviour change.
There was a problem hiding this comment.
@nbdd0121 can you add this to the release notes?
| package = cfg.package; | ||
| package = pkgs.python3.withPackages ( | ||
| ps: | ||
| [ | ||
| cfg.package | ||
| ] | ||
| ++ cfg.extraPackages | ||
| ); |
There was a problem hiding this comment.
This is also a breaking change that should be mentioned in the changelog. This breaks any setup where package = <some python environment> as opposed to package = <python package> and using extraPackages.
There was a problem hiding this comment.
Can you add this to the release notes?
Became maintainer of nixos/jupyter in NixOS#367106. This error was not caught since meta.maintainer in nixos modules are not at the time of writing evaluated

The current implementation has problems after the jupyter project introduced changes: https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html
This MR:
jupyter notebookcommandThe last 2 changes come with an example in order to add export to WebPDF.
Closes #355046
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.