holoviz-topics / examples

Visualization-focused examples using HoloViz for specific topics
https://examples.holoviz.org
Creative Commons Attribution 4.0 International
84 stars 24 forks source link

Declare live deployment targets #171

Closed ablythed closed 3 years ago

ablythed commented 3 years ago

Right now, Jean-Luc is the only one who knows what should be deployed for which projects. Each anaconda-project.yml should declare what the live deployment targets are, e.g. by listing the command names under a user-defined field "live_deployments" with a dictionary command: endpoint.

jlstevens commented 3 years ago

An example might be:

live_deployments: 
   notebooks: attractors-notebooks
   dashboard: attractors
jlstevens commented 3 years ago

It is worth mentioning is that we hope to have a consistent scheme. For project FOO it should always be this kind of mapping for notebooks and dashboards:

live_deployments: 
   notebooks: FOO-notebooks
   dashboard: FOO

At least when there are both types of deployment....

jbednar commented 3 years ago

"always" doesn't seem suitable in this case! Out of 39 projects, only four have a "notebooks" target, and only 13 have a "dashboard" target. More often there is a "notebook" target (33 projects).

jlstevens commented 3 years ago

I meant 'always' when there are both types of deployment in the same project: as you point out, that doesn't seem to be true for most of them...

jbednar commented 3 years ago

Sure, but even in that case we need to standardize between "notebooks" and "notebook".

BTW, maybe we should invert this and instead put this info into the target itself? E.g.:

commands:
  dashboard:
    unix: panel serve *_panel.ipynb
    supports_http_options: true
    endpoint: attractors-dashboard
  notebooks:
    notebook: .
    endpoint: attractors-notebook

Not sure if that will cause any issues for anaconda-project...

jlstevens commented 3 years ago

I think notebooks is expected to be a directory of notebooks (like your example above) while notebook is when the command is used to serve a specific notebook.

I like your suggestion for endpoint in the commands but I expect anaconda-project to complain about it (afaik only top level keys can be declared to be ignored).

jbednar commented 3 years ago

Could go either way; have to try it! But yes, if it doesn't work, we can fall back to the separate section.

ablythed commented 3 years ago

I added endpoint to the commands section and although anaconda-project gives the warning * anaconda-project.yml: Unknown field name 'endpoint', it runs fine. See #181.

jbednar commented 3 years ago

Superseded by #183.