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 ability to use functions with param dependencies in DynamicMap #3744

Merged
merged 11 commits into from
Aug 3, 2019

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented May 29, 2019

Allows doing things like:

slider = pn.widgets.FloatSlider()

@pn.depends(y=slider.param.value)
def test(y):
    return hv.Curve([0, 1, y])

pn.Column(slider, hv.DynamicMap(test))
  • Adds tests
  • Added docs

@jlstevens
Copy link
Contributor

jlstevens commented May 30, 2019

Code looks fine but I'm starting to lose track of all the ways you can do things with param watchers, panel etc. I assume the alternative would be a class which is unnecessary for such a simple example?

I guess I am happy to merge but I would also like to see some docs detailing this style among all the other ways you can do things with param nowadays.

@philippjfr
Copy link
Member Author

I guess I am happy to merge but I would also like to see some docs detailing this style among all the other ways you can do things with param nowadays.

That is on my to-do list along with .apply docs, but I don't think I'll get there today and in the meantime I'd like to build examples on top of this.

@jlstevens
Copy link
Contributor

jlstevens commented Aug 2, 2019

@philippjfr Looks good!

My comments generally relate to expanding the docs in a few places. There is one question about reordering the presentation of the function/class approach but I have no opinion as to whether that should be part of this PR or not.

Another task that shouldn't be part of this PR is to expand the streams user guide to discuss these implicit parameter streams. There are now three types of stream in holoviews imho 1) explicitly defined custom stream objects and classes 2) linked streams 3) implicit parameter driven ones.

Happy to merge once these doc issues are addressed (or postponed for later PRs). And once the tests are passing!

examples/user_guide/14-Data_Pipelines.ipynb Outdated Show resolved Hide resolved
@jbednar
Copy link
Member

jbednar commented Aug 3, 2019

Looks good now, thanks!

@philippjfr philippjfr merged commit 4534d45 into master Aug 3, 2019
@philippjfr philippjfr deleted the param_function branch August 5, 2019 13:53
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants