-
-
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
Drop notebook 6 #4822
Drop notebook 6 #4822
Conversation
b05cac4
to
4096595
Compare
This is correct because the produced output is using html that will includes plotly.js the first time:
Dropping the mimerenderer factory will prevent |
@fcollonval Thank you for the response! Also hi! |
This is looking good to me. |
@marthacryan, testing the Code is
I have |
@LiamConnors Looks like this wasn't happening for me because I hadn't added the |
In VS Code, I see this: Not really sure what to make of it. I'm using the same environment as in a notebook launched in the browser. I've commented here as I'm testing off this branch, but I guess this may be more related to #4823 |
README.md
Outdated
### Jupyter Widget Support | ||
|
||
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets` | ||
For use as a Jupyter widget, install `jupyter` and `anywidget` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section above this talks about "JupyterLab Support" and should now mention anywidget. Wondering if this section should stay as "Jupyter Notebook Support"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe they should be combined. The usage is almost identical for jupyter Notebook and JupyterLab
elif "jupyter-lab" in parent_process and jupyter_lab.__version__ < "3": | ||
# Add warning about upgrading jupyterlab | ||
warnings.warn( | ||
f"Plotly version >= 6 requires JupyterLab >= 3 but you have {jupyter_lab.__version__} installed. To upgrade JupyterLab, please run `pip install jupyterlab --upgrade`." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put this in FigureWidget
instead?
Note: this PR is on top of the changes from #4823 because the plotly.js version used in plotly.py is based on the jupyterlab extension code, and we needed a new place to store the plotly.js version. The widget seemed like a good place because all of the other javascript is removed in this PR.
Fixes #4779.
It appears that the entire
packages/javascript/jupyterlab_plotly
directory contains code that is either used to support very old versions of jupyter lab/notebook/voila, or is not used at all. This PR removes the entire directory in favor of having a very smallpackages/python/plotly/js
directory that contains only the widget code (see #4663 for adding the widget code into that directory).The last time that the jupyter extension was significantly changed was 3 years ago in #3142. @fcollonval described the files in the
packages/javascript/jupyterlab_plotly
directory in this comment. He did add support for federated extensions (new jupyter lab/notebook build), but I wasn't able to find evidence that having an extension installed in jupyterlab >=3 or jupyter notebook >= 7 is even necessary for plotly. @fcollonval if you know of any reason that that isn't true, please let me know!To test:
git clean -f -x -d
cd packages/python/plotly
pip install -e .
pip install jupyter
jupyter lab
jupyter notebook