Rewrite interactive API without holoviews dependency#5138
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 pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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
hvplotinteractiveAPI, which does not only support reactivity but also allows operator chaining and much more.One of the main obstacles with
.interactiveis that it depended ondimexpressions in HoloViews as a consequence of which it was specialized to support only objects that aholoviews.Datasetcan wrap. Since I always had planned to rewrite.interactiveto be independent of HoloViews AND to allow it to actually chain and store intermediates.Unlike the
hvplotimplementation this implementation does not store the full chain of operations inhv.dimobjects, instead we build up a chain ofinteractiveobjects 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
interactivehere 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.Parameterpanel.widgets.Widgetinteractiveobjectspn.ref