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
Contributor

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented May 30, 2019

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.

@philippjfr philippjfr force-pushed the param_function branch from 67100ab to 1c7fdd5 Aug 2, 2019

@jlstevens

This comment has been minimized.

Copy link
Contributor

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!

@philippjfr philippjfr force-pushed the param_function branch from 03f3174 to 1051f14 Aug 2, 2019

@jbednar
jbednar approved these changes Aug 2, 2019
examples/user_guide/14-Data_Pipelines.ipynb Outdated Show resolved Hide resolved
Apply suggestions from code review
Co-Authored-By: James A. Bednar <jbednar@users.noreply.github.com>
@jbednar

This comment has been minimized.

Copy link
Member

commented Aug 3, 2019

Looks good now, thanks!

Update examples/user_guide/14-Data_Pipelines.ipynb
Co-Authored-By: James A. Bednar <jbednar@users.noreply.github.com>

@philippjfr philippjfr merged commit 4534d45 into master Aug 3, 2019

0 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@philippjfr philippjfr deleted the param_function branch Aug 5, 2019

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