bokeh / jupyter_bokeh

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

Upgrade to JupyterLab by reinitializing project structure #124

Closed philippjfr closed 3 years ago

philippjfr commented 3 years ago

Another attempt at this, this time by reinitializing the project and then readding the old code.

philippjfr commented 3 years ago

Have to figure out the tests but locally this now works in classic notebook and jlab when following the dev instructions. Ping @mattpap and @bryevdv for testing.

philippjfr commented 3 years ago

Actually, the nbextension doesn't seem to work yet.

philippjfr commented 3 years ago

Fixed, should all work now.

philippjfr commented 3 years ago

Tests finally passing as well.

bryevdv commented 3 years ago

I have publish 3.0.0-dev1 to NPM and PyPI. Seems to moslty be working:

Screen Shot 2021-03-21 at 12 07 28 PM

A few notes:

bryevdv commented 3 years ago

Well, actually looking at the console, I think maybe it is not using the extension for me, but instead be falling back to the bare JS exec that classic uses?

Screen Shot 2021-03-21 at 12 17 38 PM

cc @philippjfr

bryevdv commented 3 years ago

@jasongrout Do you have any ideas about the above? It seems I am seeing that error from the installed pre-built extensions, and others are not. But I think I have everything installed that is mentioned in other (old) threads I can find about that message:

(230_39) ❯ jupyter labextension list
JupyterLab v3.0.12
/Users/bryan/anaconda/envs/230_39/share/jupyter/labextensions
        @bokeh/jupyter_bokeh v3.0.0-dev1 enabled OK (python, jupyter_bokeh)
        @jupyter-widgets/jupyterlab-manager v4.0.0-alpha.1 enabled OK (python, jupyterlab_widgets)

~/work/bokeh/examples/howto bryanv/hasprops*
(230_39) ❯ conda list ipywidgets
# packages in environment at /Users/bryan/anaconda/envs/230_39:
#
# Name                    Version                   Build  Channel
ipywidgets                8.0.0a4                  pypi_0    pypi

~/work/bokeh/examples/howto bryanv/hasprops*
(230_39) ❯ pip install jupyterlab_widgets
Requirement already satisfied: jupyterlab_widgets in /Users/bryan/anaconda/envs/230_39/lib/python3.9/site-packages (2.0.0a1)

How can I debug this?

bryevdv commented 3 years ago

OK seems like it was the 2.0.0a1 version of jupyterlab-widgets that the pip install --pre jupyter_bokeh brought it that was busting everything for me

jasongrout commented 3 years ago

OK seems like it was the 2.0.0a1 version of jupyterlab-widgets that the pip install --pre jupyter_bokeh brought it that was busting everything for me

Yes, that --pre switch bitten me too before. Glad you figured it out.

I took jupyter_bokeh for a quick test run and it seems to work. Thanks for updating it!

philippjfr commented 3 years ago

Thanks @jasongrout. One quick question, for a conda-forge recipe should we include jupyter-packaging as a host dependency or will it skip invoking the build step as long as the package on PyPI has already bundled it?

jasongrout commented 3 years ago

Thanks @jasongrout. One quick question, for a conda-forge recipe should we include jupyter-packaging as a host dependency or will it skip invoking the build step as long as the package on PyPI has already bundled it?

I think because setup.py imports it, it needs to be a build dependency, like here:

https://github.com/conda-forge/jupyterlab-fasta-feedstock/blob/5d32434a19e6ca5c7a8dd3705db8e1bf770de2c2/recipe/meta.yaml#L20