intake / intake

Intake is a lightweight package for finding, investigating, loading and disseminating data.

Home Page:https://intake.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revising catalog-level GUI

AlbertDeFusco opened this issue · comments

I get weird things when I try to open the GUI on a catalog-of-catalogs.

# catalogs.yml
sources:
    weather:
        driver: yaml_file_cat
        args:
            path: https://gist.githubusercontent.com/AlbertDeFusco/60a3d2031f89f1fed1d396bb367fe168/raw/401b29419608abd51985f45a81308bc3f4534410/weather.yaml

then in the notebook the gui doesn't appear to work.

Screenshot 2023-02-27 at 23 03 45

If instead I swap out CatalogGUI for the interface.gui.GUI

    @property
    def gui(self):
        if not hasattr(self, "_gui"):
            from ..interface import do_import
            from ..interface.gui import GUI
            do_import()
            self._gui = GUI(self)
        else:
            self._gui.visible = True
        return self._gui

I get a much better experience with nested catalogs

Screenshot 2023-02-27 at 23 07 28

I am interested in making a PR if you think this is reasonable. Also, is this a good use of do_import() or should something else be done to ensure that the panel extension is loaded?

Yes, I agree that that catalog and source-level GUIs are probably not fit for purpose and in practice rarely used/poorly documented. Having a single entry point would simplify our life and also allow for the code to be refactored. I don't know the reason that your display looks so weird, though!

We could probably do with a general brainstorming of user expected behaviour around these visual components, especially if they are to be integrated with jlab extensions or online services.

should something else be done

There is a intake.output_notebook function. do_import adds a little CSS which is probably not needed...