Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully Handle Multiple Extensions or Assert an Error Message #116

Closed
tlmille2 opened this issue Mar 27, 2021 · 5 comments
Closed

Gracefully Handle Multiple Extensions or Assert an Error Message #116

tlmille2 opened this issue Mar 27, 2021 · 5 comments

Comments

@tlmille2
Copy link
Collaborator

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.

@philippjfr
Copy link
Member

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.

@tlmille2
Copy link
Collaborator Author

tlmille2 commented Mar 29, 2021

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
Copy link
Collaborator Author

tlmille2 commented Mar 29, 2021

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

@philippjfr
Copy link
Member

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

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants