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 support for passing in parameter instances as streams #3616

Merged
merged 2 commits into from Apr 10, 2019

Conversation

Projects
None yet
3 participants
@philippjfr
Copy link
Contributor

commented Apr 10, 2019

Makes it possible to pass in a Parameter instance as a stream, which will internally be converted to a Params stream. Also adds some validation to ensure the same parameter is not subscribed to multiple times.

  • Adds tests

@philippjfr philippjfr added this to the v1.12.1 milestone Apr 10, 2019

@jbednar
Copy link
Contributor

left a comment

Looks great, and should help keep user code simpler.

Show resolved Hide resolved holoviews/streams.py Outdated
@jlstevens

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

Looks good. I suppose we don't have any ideas on how to remap parameter names?

One thought I had (probably not a good idea) would be to allow something like:

hv.DynamicMap(..., streams={'foo':bar.param.baz})

This isn't great as you can't really mix parameter instances and streams nicely. Alternatively:

hv.DynamicMap(..., streams=[position_stream, ('foo', bar.param.baz)])

But I'm not hot on introducing more tuple formats.

@philippjfr

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

Looks good. I suppose we don't have any ideas on how to remap parameter names?

Yeah, it's unfortunate, but I don't want to rush things and come up with something we will hate later so I think this a safe first cut.

@jlstevens

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

Looks good! Much happier with the new warning.

@jlstevens

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

Tests are green. Merging.

@jlstevens jlstevens merged commit 02308a8 into master Apr 10, 2019

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 87.699%
Details
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.