lumen icon indicating copy to clipboard operation
lumen copied to clipboard

Gracefully Handle Multiple Extensions or Assert an Error Message

Open tlmille2 opened this issue 4 years ago • 3 comments

If different views are used (for example Perspective with Holoviews), the dashboard doesn’t build, as two separate extensions are needed.

It would be nice if the various extensions could be gracefully handled, if not an assertion error on crossing multiple extensions would be nice for users to understand the error instead of the dashboard not displaying anything.

tlmille2 avatar Mar 27 '21 13:03 tlmille2

I suppose I don't know what "extension" refers to here. I've frequently used multiple different views together without issue so I'd have to look at the specific dashboard you were building.

philippjfr avatar Mar 29 '21 13:03 philippjfr

A quick reply, I'll throw up an example soon. Specifically if a view relies on pn.extension() and hv.extension(). I've experienced issues combining views that use one or the either. They appear to not play nicely. For example in jupyter, an error is asserted to restart the Kernel if you already are using hv.extension() and try to use pn.extension().

Example to follow when I get a minute.

tlmille2 avatar Mar 29 '21 13:03 tlmille2

Example of Issue

I'm able to create the following dashboard.yml specifications without any issues. Note I did remove some column names/axis in the screen grabs.

Holoviews

The below dashboard.yml uses only the hv.extension()

config:
  title: "Example Extension Error"
sources:
  dremio:
    type: intake
    shared: true
    cache_dir: cache
    uri: catalog.yml
targets:
  - title: Data
    source: dremio
    views:
      - table: dremio_vds
        type: custom
        x: hour
        y: value
    sizing_mode: stretch_width

Produces the following dashboard image

Perspective Example

The below dashboard.yml uses only the pn.extension()

config:
  title: "Example Extension Error"
sources:
  dremio:
    type: intake
    shared: true
    cache_dir: cache
    uri: catalog.yml
targets:
  - title: Table
    source: dremio
    views:
        datatable:
            type: perspective
            table: dremio_vds
            height: 750
            width: 1500

Produces the following dashboard image

Now if I try and combine the two views, the following happens:

config:
  title: "Example Extension Error"
sources:
  dremio:
    type: intake
    shared: true
    cache_dir: cache
    uri: catalog.yml
targets:
  - title: Data
    source: dremio
    views:
      - table: dremio_vds
        type: custom
        x: hour
        y: value
        rolling_window: 10
  - title: Table
    source: dremio
    views:
        datatable:
            table: dremio_vds
            type: perspective
            height: 750
            width: 1500
        
    sizing_mode: stretch_width

image image

I think this might have to do with the order the extensions are loaded. For example loading in the hv.extension() first before the pn.extension returns the following warning.

image

tlmille2 avatar Mar 29 '21 14:03 tlmille2

I think this was an issue with the way HoloViews and Panel extensions were interacting. This should now be resolved upstream.

philippjfr avatar Dec 05 '22 17:12 philippjfr

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Jul 11 '23 06:07 github-actions[bot]