-
Notifications
You must be signed in to change notification settings - Fork 64
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
Update Jupyter extension #498
base: master
Are you sure you want to change the base?
Update Jupyter extension #498
Conversation
f1b7cc2
to
ed377cf
Compare
- Updates build system to hatchling and deprecates setup.py - Bumps jupyter package compats in python and javascript
85e5e40
to
2e23b0d
Compare
- `"importsNotUsedAsValues"` deprecated in favor of `"verbatimModuleSyntax"` - `"paths"` definition added to silence complaints - Recommended in https://jupyterlab.readthedocs.io/en/latest/extension/extension_dev.html#developing-a-prebuilt-extension - Fix imports/type-imports for newer typescript
With the notebook ```julia using PlotlyJS, Observables ``` ```julia p = plot(scatter(;y=rand(20)) ``` ```julia on(p["hover"]) do hover @show hover end ``` Run each cell, hover over several points to see everything working. There should be no errors in the browser console related to hover events. Restart the kernel, and then hover over points again. There should be errors for every hover event.
2e23b0d
to
91571b8
Compare
for (k,v) in IJulia.CommManager.comms | ||
if IJulia.CommManager.comm_target(v) == :webio_comm | ||
IJulia.CommManager.close_comm(v) | ||
delete!(IJulia.CommManager.comms, k) | ||
end | ||
end | ||
|
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.
This doesn't actually work with Requires (not sure why), but it does work in my weakdeps branch at #516 .
// Stop attempting to handle callbacks if previous kernel is gone | ||
this._webIO.setSendCallback((msg: any) => {}); |
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.
This fixes a non-user facing issue where trying to update observables after a kernel restart would throw errors in the browser console.
Highlights:
Summary of fixes/changes:
IJulia.CommManager.register_comm
method is not called, so WebIO never gets the messages on thewebio_comm
channel.webio_comm
channels in IJulia when WebIO is loaded.