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

Conversation

Projects
None yet
2 participants
@jlstevens
Copy link
Contributor

jlstevens commented Sep 2, 2016

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

jlstevens commented Sep 9, 2016

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

This comment has been minimized.

Copy link
Contributor

philippjfr commented Sep 9, 2016

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

3 of 4 checks passed

continuous-integration/travis-ci/push The Travis CI build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.04%) to 69.368%
Details
s3-reference-data-cache Tests passing no test data changes required.
Details

@philippjfr philippjfr removed the in progress label Sep 9, 2016

@philippjfr philippjfr deleted the dimensioned_streams branch Oct 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.