QuantStack / glue-jupyterlab

Glue JupyterLab Extension
https://glue-jupyterlab.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 7 forks source link

aladin lite in the viewers list? #99

Open ManonMarchand opened 1 year ago

ManonMarchand commented 1 year ago

Hello again Gluepyter's team,

Would you be interested in a collaboration to add aladin-lite as the possible viewers?

It is a web app that allows visualization of fits files, votables, hips, mocs... and other astronomy standards. The software looks like this : https://aladin.cds.unistra.fr/AladinLite/

Its source code is there : https://github.com/cds-astro/aladin-lite There is an ipywidget version here (it was presented at the JupyterCon where I heard of Gluepyter :wink: ) : https://github.com/cds-astro/ipyaladin

image

There was an extension for the glue-desktop software a long time ago : https://github.com/glue-viz/glue-aladin but it does not work anymore

Tagging aladin-lite's dev : @bmatthieu3 cause he asked me to be tagged :slightly_smiling_face:

martinRenou commented 1 year ago

Hello!

That's a good idea!

I guess we have multiple possible approaches for this:

The cleanest would be the later IMO, but the fastest to implement would be the second one probably.

trungleduc commented 1 year ago
  • Implement the viewer with ipyaladin directly in Gluepyter for now, and either export it upstream once it's stable or just keep it in Gluepyter.
  • Implement a plugin system for viewers in glue-jupyter (unless it exists already?) and make glue-ipyaladin-viewer a separate Python package that exposes the ipyaladin viewer for gluejupyter to use.

I prefer a viewer plugin system for gluepyter and make glue-jupyter one of its plugins. So users are free to add more kinds of viewers without depending on glue-jupyter. Another point is how to keep the compatibility with the glue QT app, if a viewer is added to gluepyter, should it be available also in the QT app?

martinRenou commented 1 year ago

I prefer a viewer plugin system for gluepyter and make glue-jupyter one of its plugins. So users are free to add more kinds of viewers without depending on glue-jupyter.

I'm not sure I understand. glue-jupyter provides our glue application object, so it's the one responsible for handling the interface between the viewers and the application, right? So viewers in gluepyter wouldn't have a choice to depend on glue-jupyter?

should it be available also in the QT app?

That sounds difficult :S Unless we get ipywidgets running in a Qt app using the web viewer Qt thing.

ManonMarchand commented 1 year ago

The QT app has this addon : https://github.com/glue-viz/glue-aladin . It got a bit abandoned but I guess we could make it work again?

PS: I'm a bit lost between the three solutions.

trungleduc commented 1 year ago

I'm not sure I understand. glue-jupyter provides our glue application object, so it's the one responsible for handling the interface between the viewers and the application, right? So viewers in gluepyter wouldn't have a choice to depend on glue-jupyter?

the viewer like aladin does not require a glue-jupyter application object, we only need to feed it the data.

That sounds difficult :S Unless we get ipywidgets running in a Qt app using the web viewer Qt thing.

Or the plugin author needs to create 2 versions of the viewer, one using ipywidgets for gluepyter and another (native/ webview...) for the QT app.

ManonMarchand commented 1 year ago

Or the plugin author needs to create 2 versions of the viewer, one using ipywidgets for gluepyter and another (native/ webview...) for the QT app.

There is an existing ipywidget version : https://github.com/cds-astro/ipyaladin You mean that this could be used directly?

trungleduc commented 1 year ago

Or the plugin author needs to create 2 versions of the viewer, one using ipywidgets for gluepyter and another (native/ webview...) for the QT app.

There is an existing ipywidget version : https://github.com/cds-astro/ipyaladin You mean that this could be used directly?

Not with the current architect. For now, we only support the widgets provided by glue-jupyter and the types defined in a session file. Supporting standalone ipywidgets needs a lot of refactoring and should be discussed with the glue core team.

martinRenou commented 1 year ago

PS: I'm a bit lost between the three solutions.

We should definitely clarify all this in the README

astrofrog commented 1 year ago

I think the best way forward would be to revive the glue-aladin plugin and to do something similar to what was done for glue-wwt which is that the plugin package can provide both the Qt and Jupyter viewers. We should get aladin working with 'vanilla' glue-jupyter and we will then get it 'for free' in glue-jupyterlab.

ManonMarchand commented 1 year ago

Nice! I see that you're the dev of the plugin. Should we move the conversation in the other repository?

astrofrog commented 1 year ago

@ManonMarchand - sounds good! I've opened an issue here: https://github.com/glue-viz/glue-aladin/issues/2