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

Updated to param 2.0 API #3260

Merged
merged 1 commit into from
Jan 11, 2019
Merged

Updated to param 2.0 API #3260

merged 1 commit into from
Jan 11, 2019

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Dec 6, 2018

Methods updated:

  • debug
  • defaults
  • force_new_dynamic_value
  • get_param_values
  • get_value_generator
  • inspect_value
  • message
  • params
  • pprint
  • print_param_defaults
  • print_param_values
  • script_repr
  • set_default
  • set_dynamic_time_fn
  • set_param
  • state_pop
  • state_push
  • verbose
  • warning

@philippjfr philippjfr force-pushed the param_api branch 2 times, most recently from 0c4521c to bdbd09e Compare December 6, 2018 13:02
@philippjfr
Copy link
Member Author

I've changed all the methods that I think should definitely be moved onto the param subobject, leaving only get_param_values, params and pprint which I think are the most useful methods. We should decide whether we want to simply move everything or if we want to leave these commonly useful methods or do something else entirely, e.g. by moving and renaming them.

@jbednar
Copy link
Member

jbednar commented Dec 6, 2018

My vote is for obj.get_param_values() to become obj.param.values() and for obj.params() to become obj.param.objects() (or something similar). I would't mind having obj.pprint() stay where it is, but it's not something I almost ever use, so I'd vote to move it to obj.param.pprint() for consistency. Note that these are all changes on Param, rather than HoloViews, which would need to happen before reflecting such changes here.

@jlstevens
Copy link
Contributor

I quite like obj.param.values() but I'm not sure about obj.param.objects().

@jbednar
Copy link
Member

jbednar commented Dec 6, 2018

Got anything better? :-) "values" is obvious; what to call the Parameter objects is much less obvious, because their name is "Parameter" but we have to distinguish it from the value, and "parameter" can mean "value"....

@jlstevens
Copy link
Contributor

The Parameters object could be callable. So you could use obj.param('x') to get the 'x' parameter...

@jbednar
Copy link
Member

jbednar commented Dec 6, 2018

obj.param('x') is fine, though obj.param.x is a lot more readable. But regardless, obj.param.objects() (or something like it, e.g. obj.param.definitions()) is still needed.

@jlstevens
Copy link
Contributor

I'm going to go ahead and merge. I think it is important we make this change and test it as it is now - the remaining changes can go into a subsequent PR.

@jlstevens jlstevens merged commit eac6716 into master Jan 11, 2019
@philippjfr philippjfr deleted the param_api branch April 29, 2019 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants