-
-
Notifications
You must be signed in to change notification settings - Fork 539
Rewrite interactive API without holoviews dependency #5138
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5138 +/- ##
==========================================
- Coverage 83.60% 81.12% -2.49%
==========================================
Files 276 277 +1
Lines 40251 40387 +136
==========================================
- Hits 33653 32764 -889
- Misses 6598 7623 +1025
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 17 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sounds great to me; it's been really tricky to explain why .interactive is in hvPlot rather than in Panel. Just to be clear, with this support |
I have now split out an |
bae80f5
to
8b9d141
Compare
Co-authored-by: Andrew <15331990+ahuang11@users.noreply.github.com> Co-authored-by: Simon Høxbro Hansen <simon.hansen@me.com>
b52be5c
to
1dff754
Compare
This came out of some discussions with @jbednar on Friday. With the advent of more React-like APIs in Python we are in a place where we don't have a good way to declare standalone reactive variables, such as in this Solara example:
Initially I was thinking that we should be able to declare unbound param.Parameter instances which we could pass around but then I noted that we already have a very powerful reactive data structure in our ecosystem, namely the
hvplot
interactive
API, which does not only support reactivity but also allows operator chaining and much more.One of the main obstacles with
.interactive
is that it depended ondim
expressions in HoloViews as a consequence of which it was specialized to support only objects that aholoviews.Dataset
can wrap. Since I always had planned to rewrite.interactive
to be independent of HoloViews AND to allow it to actually chain and store intermediates.Unlike the
hvplot
implementation this implementation does not store the full chain of operations inhv.dim
objects, instead we build up a chain ofinteractive
objects each of which references the previous one. This means that intermediate results can be cached.Migration plan
The plan is to implement a generic version of
interactive
here but allow it to be extended in all the ways that are required for hvPlot to handle plotting and add special handling for DataFrame and xarray Dataset/DataArray types.Examples
Counter app:
ToDo
param.Parameter
panel.widgets.Widget
interactive
objectspn.ref