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

Allow using apply method with method strings #3554

Merged
merged 9 commits into from
Mar 22, 2019
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 12, 2019

Implements the suggestion outlined in holoviz/datashader#723. This allows the apply method to accept strings which refer to methods on the object, e.g.:

color_picker

sample_apply

After some discussion @jlstevens and I have decided to make .apply a namespace accessor with the following convenience methods:

  • .apply.opts
  • .apply.select
  • .apply.reduce
  • .apply.aggregate

This also means we can deprecate HoloMap.reduce and HoloMap.sample which are outliers in our API (which are inherited but are not actually usable on DynamicMap) and can be achieved by chaining apply and collapse methods.

@philippjfr philippjfr added type: feature A major new feature tag: API labels Mar 12, 2019
@philippjfr
Copy link
Member Author

@jlstevens Ready to review.

@jlstevens
Copy link
Contributor

Other than two minor suggestions (_args -> _function_args and redim -> Redim) I am very happy with the PR and pleased to see the accessors live in a separate file. Happy to merge once the renaming is done and the tests are green.

@jlstevens
Copy link
Contributor

Tests are passing now and I'll go ahead and merge. Excited to try it out!

@jlstevens jlstevens merged commit 52548a6 into master Mar 22, 2019
@philippjfr philippjfr deleted the apply_method_via_string branch April 29, 2019 11:24
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
tag: API type: feature A major new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants