holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.42k stars 484 forks source link

Jupyter Panel Preview can no longer show the panel-chemistry extension on Binder #3997

Closed MarcSkovMadsen closed 1 year ago

MarcSkovMadsen commented 1 year ago

After upgrading to Panel 0.14.0, the panel-chemistry extension no longer shows when using the Panel Jupyter Preview on Binder.

It works in the notebooks.

It is my hypothesis that the new implementation of the Jupyter Panel Preview forgets to serve the assets of bokeh extensions? Maybe only if the are installed via pip install -e .?

Reproduce

  1. Open https://mybinder.org/v2/gh/awesome-panel/panel-chemistry/feature/binder-working
  2. Open the JSMEEditor.ipynb example notebook and verify it works
  3. Open the Jupyter Panel Preview and verify it does not work.

image

  1. Find the link to the Panel application in shown in the preview iframe
  2. Open the link
  3. Open the Network tab in the browser.
  4. Refresh the browser
  5. See that the panel_chemistry.js is not found while the panel.min.js is

image

https://hub.gke2.mybinder.org/user/awesome-panel-panel-chemistry-yjyfkah4/panel-preview/static/extensions/panel/panel.min.js?v=514f2a7b05a1ef2ad45a3b4321cf452aee6fe7b50d0be86fd33ffe9a1990db1d

https://hub.gke2.mybinder.org/user/awesome-panel-panel-chemistry-yjyfkah4/panel-preview/static/extensions/panel_chemistry/panel_chemistry.js?v=77e3b0df3cc2634331ad7f8f5afc2924308e4108dec5f2839a37662d082ac218

Additional Context

You can find the example branch here https://github.com/awesome-panel/panel-chemistry/tree/feature/binder-working

philippjfr commented 1 year ago

Can't get that binder branch to build which makes this pretty difficult to debug.

philippjfr commented 1 year ago

Okay, figured it out. Need to communicate any changes to the bokeh.embed.bundle.extension_dirs dictionary back to the main process.

MarcSkovMadsen commented 1 year ago

Thanks. Unfortunately Binder is becoming more and more slow and instable.

maximlt commented 1 year ago

Yes, they lack 💰 and are badly affected by crypto miners.