-
Notifications
You must be signed in to change notification settings - Fork 173
Upgrade project to jupyterlab 4x #729
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
Conversation
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.
There is much I don’t understand in these changes, so don’t count my approval too highly. But I don’t see anything major I would consider a blocker.
@@ -408,7 +440,7 @@ pip install graph-notebook | |||
with | |||
|
|||
``` python | |||
pip install ./dist/graph_notebook-4.6.2-py3-none-any.whl | |||
pip install ./dist/graph_notebook-5.0.0-py3-none-any.whl --force-reinstall |
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.
Is the --force-reinstall
necessary? If it is, would it be worth adding a comment about why it is necessary?
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.
--force-reinstall
not necessary per se. But since it is only for development, I thought it would be good to guarantees that subsequent builds with local changes will override existing installations, ensuring the latest changes are always reflected in the local installation.
try: | ||
notebook = nbformat.read(f, as_version=4) | ||
except Exception as e: | ||
print(f"Notebook does not appear to be JSON: {str(e)}") |
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.
Is the error here always related to JSON format? Perhaps a more generic error message might be better? Something like:
Failed to parse Notebook file
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.
Makes sense. This was the only error i was noticing while prototyping a few things. Can make this more generic. Can i do it in a different PR while updating the change log tho?
// Add jQuery UI CSS via CDN | ||
const jqueryUICss = document.createElement('link'); | ||
jqueryUICss.rel = 'stylesheet'; | ||
jqueryUICss.href = 'https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css'; |
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 migration to JupyterLab 4.x required significant changes in how jQuery UI is integrated, moving from a webpack-managed CSS loading approach to a CDN-based solution with explicit initialization in the widget. This change, along with updated module federation configuration for jQuery dependencies, was necessitated by JupyterLab 4.x's stricter handling of external dependencies and CSS loading, as the previous webpack-based approach from JupyterLab 3.x was no longer compatible with the new architecture.
- Changed it to use the jQuery style from the CDN - https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css
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.
LGTM. Built and tested these changes on a SageMaker JupyterLab 4 notebook instance, and all widgets and magics functionality appears intact per manual validation.
Awesome work on this migration - thank you @adityaramesh12!
Issue #, if available: #689
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.