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

Add .show method on HoloViews elements #6368

Open
ahuang11 opened this issue Sep 8, 2024 · 4 comments · May be fixed by #6370
Open

Add .show method on HoloViews elements #6368

ahuang11 opened this issue Sep 8, 2024 · 4 comments · May be fixed by #6370
Labels
type: enhancement Minor feature or improvement to an existing feature

Comments

@ahuang11
Copy link
Collaborator

ahuang11 commented Sep 8, 2024

Since Panel is already a dependency, I think it's just wrapping the element in pn.panel(el).show()

@ahuang11 ahuang11 added the TRIAGE Needs triaging label Sep 8, 2024
@hoxbro
Copy link
Member

hoxbro commented Sep 9, 2024

No problem with adding this. I have been thinking about doing something similar for .servable.

One of the problems with .servable for me was what to return when calling the method if the returned object should be a panel object or holoviews by doing the same wrapping as you suggest.

I don't think will be a problem for .show.

@ahuang11 ahuang11 added type: enhancement Minor feature or improvement to an existing feature and removed TRIAGE Needs triaging labels Sep 9, 2024
@ahuang11 ahuang11 linked a pull request Sep 11, 2024 that will close this issue
@philippjfr
Copy link
Member

Note that while I have no strong opinions about this and have I think proposed this in the past. This does go against the core design principle of HoloViews which is that elements are declarative containers and have next to no "rendering" related methods or state.

@ahuang11
Copy link
Collaborator Author

ahuang11 commented Oct 1, 2024

I personally would like to use .show() for ease of use, and the core design principle seems unintuitive since I view HoloViews as a data visualization library.

If there's serious objection, what if the method was patched in instead with import holoviews.show (like import hvplot.pandas)?

@MarcSkovMadsen
Copy link
Collaborator

Please no more patching. Its legacy Python to do this. Tools like ruff and mypy do not under stand this and works against. Your editor does not understand this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants