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

@philippjfr
Copy link
Member

@philippjfr philippjfr 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
Copy link
Member

@jbednar jbednar left a comment

Looks great, and should help keep user code simpler.

Loading

holoviews/streams.py Outdated Show resolved Hide resolved
Loading
@jlstevens
Copy link
Contributor

@jlstevens jlstevens 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.

Loading

@philippjfr
Copy link
Member Author

@philippjfr philippjfr 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.

Loading

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Apr 10, 2019

Looks good! Much happier with the new warning.

Loading

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Apr 10, 2019

Tests are green. Merging.

Loading

@jlstevens jlstevens merged commit 02308a8 into master Apr 10, 2019
4 checks passed
Loading
@philippjfr philippjfr deleted the parameter_instance_streams branch Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants