Stream: jupyter

Topic: Oct 2021 JupyterHub Update


view this post on Zulip Jared Baker (Sep 15 2021 at 16:02):

We're starting to look at updates for JupyterHub that will be targeted for October. If there are any desired updates / changes / pain points, we'd certainly like to get some feedback. Please let us know.

view this post on Zulip Anderson Banihirwe (Sep 15 2021 at 16:16):

If time permits, could you add the gator jupyterlab extension to the Hub's base environment?

view this post on Zulip Brian Bonnlander (Sep 15 2021 at 17:34):

If it's not already there, including fsspec or similar packages for connecting to s3 endpoints would be nice.

view this post on Zulip Kevin Paul (Sep 15 2021 at 17:35):

@Brian Bonnlander: Do you mean in the base JupyterLab kernels? You can always install fsspec yourself in your own Conda environments, right?

view this post on Zulip Brian Bonnlander (Sep 15 2021 at 17:38):

Absolutely correct; I manage my own conda environments on JupyterHub, but other users cannot run the notebooks I create unless they are good at managing conda environments, and this might create a pain point for them.

view this post on Zulip Kevin Paul (Sep 15 2021 at 17:39):

:thumbs_up: I think that might be a good discussion to have around what the "base environments" should contain.

view this post on Zulip Sebastian Milinski (Sep 15 2021 at 22:43):

If you consider adding jupyterlab extensions, could you have a look at https://github.com/ryantam626/jupyterlab_sublime?
Until jupyterlab implements additional key maps for editing notebooks, lab extensions are the only workaround.

I do realise that some key bindings might change the default behaviour, which could be annoying for many users. Is there a way to make an extension like this one available to users, but only if they choose to use it and not by default?

view this post on Zulip Jared Baker (Nov 19 2021 at 17:29):

@Sebastian Milinski I've added that specific extension on the development instance, but can you test? I'm not sure if this enhances anything since there is a Sublime keymap already, so I'm not sure if this negatively affects the overall hub (enables these key binding for everybody by default).

view this post on Zulip Sebastian Milinski (Nov 19 2021 at 17:53):

Thanks a lot @Jared Baker ! I just tested it and it works perfectly.

view this post on Zulip Jared Baker (Nov 19 2021 at 17:57):

I'm not sure it's a good idea. Seems to be no way to explicitly enable / disable it and all users aren't sublime users.

view this post on Zulip Sebastian Milinski (Nov 19 2021 at 18:30):

Hm, that could theoretically be a problem. But I'm not sure how many shortcuts actually interfere with commonly used shortcuts.

The main features that are introduced by this extension are multiple selection and multiple cursors. The way it behaves is consistent with many modern text editors/IDEs (sublime text, atom, pycharm, VS code,...).
On a mac, CMD+D selects the next occurrence of the selection and add a cursor. Ususally, CMD+D would delete the line (but so does CTRL+K, which is probably the better known shortcut for this operation.)
CTRL+SHIFT+DOWN/UP add an additional cursor below/above. This would usually select everything above/below the current cursor. For the selection, CMD+SHIFT+UP/DOWN still behaves as expected.

view this post on Zulip Jared Baker (Nov 19 2021 at 19:40):

It's still not great to deviate from the defaults when it's a shared resource like this, at least at the site level. I've disabled the extension for now, but you should be able to enable it with:

jupyter labextension enable --level=user @ryantam626/jupyterlab_sublime

from a terminal session as long as there is a jupyter binary on your path or use a full path to a system one should work:

/ncar/usr/jupyterhub.hpc.ucar.edu/dev/bin/jupyter labextension enable --level=user @ryantam626/jupyterlab_sublime

view this post on Zulip Sebastian Milinski (Nov 19 2021 at 21:32):

What would the steps be to enable it? Just do the above in a terminal once and then it applies automatically every time when I log in to jupyterhub?

When I run the command using the path to the jupyterhub binary, it throws an error:

Config option `kernel_spec_manager_class` not recognized by `EnableLabExtensionsApp`.
[W 2021-11-19 14:33:53.798 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.

I can run it using a jupyter binary in one of my conda environments, but that doesn't enable the extension when I use jupyterhub.

view this post on Zulip Jared Baker (Nov 22 2021 at 15:57):

Yeah, so that command basically just writes a configuration file in your $HOME directory that is JSON and since JSON can be prone to human error in some sense, it's easy to have the application do it. You'd have to restart your Jupyter Session (fully, stop the server and start a new one).


Last updated: Jan 30 2022 at 12:01 UTC