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

Dimensioned streams #846

Merged
merged 12 commits into from
Sep 9, 2016
Merged

Dimensioned streams #846

merged 12 commits into from
Sep 9, 2016

Conversation

jlstevens
Copy link
Contributor

This PR implements dimensioned streams i.e support for streams with parameters listed in the key dimensions. This generalizes streams fully so that everything you can achieve with a regular DynamicMap can now be achieved using a stream (i.e our sliders could now use a streams based approach for dynamic maps).

I think this PR is mostly complete but it isn't quite ready yet. I would like to test it more, taking time to ensure that the counter and generator ('open') modes work correctly. In addition, I want to write some unit tests for the three new utility functions I've introduced as well as for dynamic maps with dimensioned streams.

@jlstevens
Copy link
Contributor Author

jlstevens commented Sep 2, 2016

I thought I might as well give an example of how this is used:

image

As the stream parameters 'x' and 'y' are listed in the kdims, you can index the DynamicMap with __getitem__ normally. You can specify values explicitly or None which means 'get the value from the stream'. As this dynamic map is now dimensioned, it has a cache that can fill with keys and data. This means you can cast it to a HoloMap which can be statically exported.

@jlstevens
Copy link
Contributor Author

Tests have passed except for one transient. There are several issues we are aware of but they won't be addressed in this PR.

  • Multiple calls to the dynamic map per plotting refresh.
  • Dimensioned streams do not mix well with regular key dimensions where sliders are required.

Addressing these involves distinct tweaks to DynamicMap so it is probably worth merging this PR to continue with this work.

@philippjfr
Copy link
Member

Looks good to me and only affects DynamicMaps with streams. PRs to fix multiple dynamic calls and widgets to follow in separate PRs.

@philippjfr philippjfr merged commit 2942edf into master Sep 9, 2016
@philippjfr philippjfr deleted the dimensioned_streams branch October 14, 2016 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants