ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
199 stars 38 forks source link

Support specifying a glob of panel apps #65

Open MarcSkovMadsen opened 3 years ago

MarcSkovMadsen commented 3 years ago

Panel (and Bokeh) are capable of serving apps via commands like

panel serve shared/*.ipynb

or

panel serve shared/*.py

When done like this an index page will be served at the root "/" providing access to all the apps served.

In the next version of Panel it will look like

image

You can try it out here https://mybinder.org/v2/gh/holoviz/panel/binder?urlpath=panel/

Please support.

If I can contribute in any way let me know.

Thanks.

danlester commented 3 years ago

Thanks for this. I might need to see how it can be built into the bokeh-root-cmd wrapper that serves Panel and Bokeh apps, or whether a different approach for Panel is now needed.

MarcSkovMadsen commented 3 years ago

Hi @danlester . I would really like a separate entry for Panel.

My hypothesis is that it would be close to https://github.com/ideonate/bokeh-root-cmd/blob/master/bokeh_root_cmd/main.py with some additional functionality inspired by Panels get_server at https://github.com/holoviz/panel/blob/718543ba16d94e5703f3827c79622f46b9021914/panel/io/server.py#L505

MarcSkovMadsen commented 3 years ago

My suggestion would be to create a new panel_root_cmd repository and package. The alternative would be to add a --panel flag to the bokeh_root_cmd package. That would also work. What would you prefer @danlester ?

danlester commented 3 years ago

There are now a few of these 'root-cmd' type packages, so could be worth starting to understand the common components and maybe bring these into one at some point. So a good starting point could be to see if --panel could be built into bokeh-root-cmd.

Or maybe it doesn't really need --panel anyway, and new functionality could be relevant to bokeh-only scripts too.

It's also just worth thinking whether *.ipynb is a bit liberal in the context of ContainDS Dashboards, e.g. notebooks saved there without thinking are suddenly published inadvertently.