Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate and Migrate to JupyterLab 3 #197

Closed
sandertyu opened this issue Oct 21, 2020 · 15 comments
Closed

Investigate and Migrate to JupyterLab 3 #197

sandertyu opened this issue Oct 21, 2020 · 15 comments
Labels

Comments

@sandertyu
Copy link
Contributor

sandertyu commented Oct 21, 2020

Currently JupyterLab 3 is only available as a release candidate, and some of the major changes which affect us are to the way that extensions work. I'll post a bunch of links here which are tracking some of the JupyterLab issues for this transition so that we can keep up to date and figure out how to migrate when it comes out (probably over winter break?).

https://discourse.jupyter.org/t/jupyterlab-3-0-release-candidate-available/6248/6
jupyterlab/jupyterlab#9118 (now closed by full 2.x -> 3.x migration guide, PR here)
https://github.com/jupyterlab/extension-examples/tree/3.0
jupyterlab/jupyterlab#8038

@moorepants
Copy link
Member

In general, we should wait some months after its release so that it's bugs get ironed out. But maybe it is something we could launch Jan 2021 if it is ready.

@sandertyu
Copy link
Contributor Author

JupyterLab3 is officially released; https://blog.jupyter.org/jupyterlab-3-0-is-out-4f58385e25bb

Issue on repo2docker about migrating; jupyterhub/repo2docker#935

@moorepants
Copy link
Member

We'll probably have to wait till various things that depend on jupyterlab are updated, so we should check this in a couple months again.

@sandertyu
Copy link
Contributor Author

it looks like repo2docker is now using jupyterlab3. We can probably more actively try and migrate our default-env to jupyterlab 3. We should verify that all of the current widgets in the widget-testing repo have been updated for jlab v3. For now, I will pin our default-env to jlab 2 so that future builds will not get unexpectedly caught on jlab3. Hopefully this will override the one pinned in repo2docker.

@moorepants
Copy link
Member

Interesting that build times for images will reduce because the extensions no longer have to be built: https://twitter.com/jtpio/status/1362409396022689811

@sandertyu
Copy link
Contributor Author

All widgets that we support are compatible with jupyterlab3. We can build a new default-env with jupyterlab=3 soon for our default-env. There may be edge-cases where stuff is broken, but Jason seems pretty confident that very few things depend on jupyterlab (which is true, at least from a dependency standpoint).

@sandertyu
Copy link
Contributor Author

sandertyu commented Mar 4, 2021

Alright, I've built a default-env image with JupyterLab3 and it requires some testing on staging.jupyter.libretexts.org. I've removed the postBuild extension for the following packages and we'll want to test to verify that they all still work. According to their documentation, they should all be fine;

  • Run the small code examples from our testing Thebe HTML pages
    • bokeh
    • ipywidgets
    • bqplot
    • ipyleaflet
    • pythreejs
    • ipympl
    • plotly
    • ipycytoscape
    • ipyvolume
    • ipygany
    • nglview
  • nbgrader (extension installs thru conda package)
  • nbgitpuller (only old versions should need the lab extension)
  • jupyterhub server-proxy (might need to explicitly install through conda, and also enable extension)

@sandertyu
Copy link
Contributor Author

It also looks like our jupyterlab extension to add our faq to the help tab doesnt work with jupyterlab3. Will have to look for a fix or try to examine the debug file. The build failed and the pod quit before I was able to take a look;

first-console
second-console

I should also note that i dont have a working image of jupyterlab3 on staging at the moment.

@sandertyu
Copy link
Contributor Author

I've managed to make a new default-env which builds successfully with the extension, but the extension does not work ie the libretexts logo button in the 'help' tab is not there. jupyter labextension list says that it is properly enabled, so maybe some code needs to be changed.

The migration script outlined in the docs gives you a prompt to overwrite certain things within the directory. I answered yes to most/all of them, maybe using different overwrite settings would make it work?

@moorepants
Copy link
Member

The best thing would be ask for help in the jupyter discourse or their ?gitter? chat channel.

@sandertyu
Copy link
Contributor Author

I've built a default-env where the JupyterHub FAQ extension works properly, but none of the other extensions work properly. Tracing the errors in the console, I came across this jupyter thread (my console errors were the same as the thread creator's). However, jupyter labextension list shows that they are all installed and enabled, but when I try to run code which uses the widgets I get "widget not displaying" errors. I'll probably make a thread about this new issue.

@moorepants
Copy link
Member

I'll probably make a thread about this new issue.

Definitely ask asap.

@sandertyu
Copy link
Contributor Author

Okay, so it turns out that ipyvolume is specifically broken in JupyterLab3 (the interface), but not on jupyterlab=3 in general (such as in a notebook through Binder, or in Thebe). Once it is removed, the rest of default-env functions properly and it can be seen on staging. We can move forward to jupyterlab=3 and temporarily drop ipyvolume until they fix it in JupyterLab3, or we can remain on jupyterlab=2 until the maintainers fix it. I've sent them on brief message already with a possible suggestion for fixing the package.

I don't believe that any people are using ipyvolume on our platforms, and moving to jupyterlab=3 would allow us to fix ipycytoscape again (which doesnt work on Thebe/Libretexts but does on JupyterLab currently). It's up to @moorepants I think.

@moorepants
Copy link
Member

I don't believe that any people are using ipyvolume on our platforms

This may be true on libretexts, but what about on the hub? It's best not to remove features unless we are sure that noone is using it. There are open PRs on ipyvolume about jlab3: https://github.com/maartenbreddels/ipyvolume/pulls

@sandertyu
Copy link
Contributor Author

we've migrated everywhere, but dropped ipyvolume for now until it works properly in jlab3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants