-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
updating lumino packages #4685
updating lumino packages #4685
Conversation
Could this please get some attention? I too would like Plotly to be happy with current Jupyterlab, and this is a trivial change. |
@likewei92 @athornton Hi! Sorry for the delay here. We've been working on our jupyter code a lot and we ended up removing this extension because it isn't necessary for jupyterlab >= 3 and notebook >= 7. Are you able to use plotly in the notebook editor? |
...sort of? Get a cup of coffee. This is going to be a long story. Installing "plotly" (whether conda or pip) installs 5.24.1. It seems to work fine, except that In the Rubin Science Platform we also use dash. dash now complains that JupyterLab wants a rebuild. It does this with both 5.24 and 6.0.0rc0. In the RSP production environment, users do not have the power to rebuild the lab, and that is done by design. But even in our build pipeline...we generally assemble our JupyterLab environment (which is complex) via a GitHub Actions pipeline, and rebuilding JupyterLab simply takes too much memory, and the rebuild fails (even with So what I really need is for Jupyterlab to be happy enough with the state of its world that it will not claim plotly and dash are incompatible and pop up a dialog prompting the user to try a rebuild. Since that's Jupyterlab's quite-sensible behavior when it detects incompatibilities, the shortest route to satisfying it goes through modifying package.json for those two packages so the Lab knows that the newer lumino versions it has are just fine for plotly and dash. The fact that Lab rebuilds are very costly is, of course, one of the primary motivators behind doing JupyterLab prebuilt extensions, and part of why Project Jupyter wants you to build extensions that way now. So, it looks like Plotly 6 will be compatible (in package.json, rather than just de facto) with Jupyterlab 4 (and hopefully 5+, since 5 should be here soon)...but it's still going to require an updated release of dash to not think it needs a Jupyterlab rebuild. I think I'm fine, at the moment, with removing dash from my build for now and waiting until plotly 6 is released, assuming there's a compatible dash that will accompany it. I can live with Jupyterlab putting a red X next to the plotly extension if I list lab extensions, but I can't live with the user complaints that every time they start a lab they're told that dash requires a jupyterlab rebuild and they get an unhelpful error message if they click the build button, and I don't think many if any users are actually using dash within the Rubin Science Platform environment. I don't know if further releases (with updated compatibility statements) of the 5.x family and of dash are warranted just to get Jupyterlab to accept that these are working extensions, but a good combing through package.json to ensure compatibility with the JupyterLab versions you want to support is probably something that needs to happen with the next big release of packages for the Python ecosystem. |
@athornton Thank you for explaining! Could you elaborate on how you're using dash? And what it means for dash to want a jupyterlab rebuild? You can also go ahead and |
Here's the prompt-for-rebuild: This dialog pops up on starting a new JupyterLab container and must be dismissed with either "Build" or "Cancel" to proceed. "Build" then generates a 500 error, because (I think) the user cannot write to the filesystems where JupyterLab lives. Below here there's what's installed. Notably,
|
As to how we're using dash: I don't think we are. I added plotly to our packages a couple years ago (I think) because I wanted 3D scatterplots with easy zooming to work, and I am pretty sure I added dash because the plotly webpage said "you should also install dash, because it's a really easy way to do plots" or something like that. Having standalone apps in the JupyterLab Notebook doesn't seem all that useful to me; I don't know whether any of our users will disagree with me on that. |
@athornton Ah ok didn't realize you were using conda to install plotly. That may be bundling the jupyterlab extension, although I'm not seeing that in the conda forge recipe for plotly. I'll have to keep looking into this, but thank you for the detailed responses! BTW it does sound like dash won't be a great use-case for your users, so you should feel free to remove it if that unblocks you. |
I am going to go ahead and close this PR though because the file it changes no longer exists. We're not going to continue releasing an npm package because that is now deprecated in jupyterlab. |
Allowing more updated versions of lumino packages. This will resolve #4354
Please uncomment this block and take a look at this checklist if your PR is making substantial changes to documentation/impacts files in the
doc
directory. Check all that apply to your PR, and leave the rest unchecked to discuss with your reviewer! Not all boxes must be checked for every PR :)If your PR modifies code of the
plotly
package, we have a different checklistbelow :-).
Documentation PR
doc/README.md
filedoc-prod
branch OR it targets themaster
branchpx
example if at all possibleplotly.graph_objects as go
/plotly.express as px
/plotly.io as pio
df
fig = <something>
call is high up in each new/modified example (eitherpx.<something>
ormake_subplots
orgo.Figure
)fig.add_*
andfig.update_*
rather thango.Figure(data=..., layout=...)
in every new/modified examplefig.add_shape
andfig.update_xaxes
are used instead of bigfig.update_layout
calls in every new/modified examplefig.show()
is at the end of each new/modified exampleplotly.plot()
andplotly.iplot()
are not used in any new/modified exampleCode PR
plotly.graph_objects
, my modifications concern thecodegen
files and not generated files.modified existing tests.
new tutorial notebook (please see the doc checklist as well).