bokeh / jupyter_bokeh

An extension for rendering Bokeh content in JupyterLab notebooks
BSD 3-Clause "New" or "Revised" License
253 stars 48 forks source link

Update for jlab 3 #123

Closed bryevdv closed 3 years ago

bryevdv commented 3 years ago

@philippjfr @mattpap This PR was created using the update script here:

https://jupyterlab.readthedocs.io/en/stable/extension/extension_migration.html

An extension built with jupyter labextension build works in Jupyter Lab 3, including an embedded server example. push_notebook is broken:

Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest @bokeh/jupyter_bokeh extension is installed. In an exported notebook this warning is expected. notify_idle — bokeh-2.3.0.min.js:165:1241

I did delete a _temp_extension dir that looked like cruft from the update script.

Can we just publish this with npm publish? What if anything else is requried? Supposedly the upgrade script added everything necessary for a python package too but I have no idea if it actually works.

bryevdv commented 3 years ago

@philippjfr @mattpap I am going to just npm publish this from the PR branch tomorrow (without merging yet) unless I hear otherwise.

slenky commented 3 years ago

Hi @bryevdv , looking forward for the publishing, thank you!

mattpap commented 3 years ago

If you want to publish this, make a dev release first. There's DEVGUIDE.md with all locations that need updating and scripts/deploy.sh for publishing (though most likely will only work in my setup).

bryevdv commented 3 years ago

@mattpap FYI the devguide is out of date. JLab extensions now have a defined standard project structure (which we are going to use) and e.g. __init__.py fetches the version automatically for the package.json and also uses yarn so there is no package-json.lock

mattpap commented 3 years ago

In this case it needs to be updated.

bryevdv commented 3 years ago

Well, unfortunately what was building and working before is now no longer build or working at all. To be honest I am tempted to wipe everything and start fresh from a clean "cookie cutter" extension template project at this point. Having been on board so early with jupyterlab and now having gone ad-hoc through so many iterations with their updates, we are just no longer aligned with their standard practices, and I don't think we can afford not to be.

I won't have time to look at this until at least this weekend, though.

philippjfr commented 3 years ago

JLab extensions now have a defined standard project structure (which we are going to use) and e.g. init.py fetches the version automatically for the package.json and also uses yarn so there is no package-json.lock

Agree that we should follow the project structure.

To be honest I am tempted to wipe everything and start fresh from a clean "cookie cutter" extension template project at this point.

Agree, that we should probably just start with the cookie cutter and then re-add the code from this repo. I'll have a go at that tomorrow but will almost certainly need help from @mattpap on some of the bundling related issues. We'll go over that together tomorrow.

bryevdv commented 3 years ago

superseded by #124