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

Improvements to the help system #370

Merged
merged 11 commits into from Dec 20, 2015

Conversation

Projects
None yet
4 participants
@jlstevens
Copy link
Contributor

jlstevens commented Dec 19, 2015

This PR implements some improvements to the help system, suggested in #331.

Supports filtering of parameters using regular expressions as well as highlight. For instance:

hv.help(hv.Image, pattern='bounds')

image

hv.help(hv.Image, visualization=False, pattern='bounds')

image

It seems to work well even though I needed to employ some clever tricks to filter parameters. Now I'll look into addressing issue #330 in this PR as well..

@jlstevens

This comment has been minimized.

Copy link
Contributor Author

jlstevens commented Dec 19, 2015

I've now added a recursive option to address #330. This option will only work when given a nested object and will not do anything is a class is specified instead.

Once the tests pass, I think this is ready to merge.

@philippjfr

This comment has been minimized.

Copy link
Contributor

philippjfr commented Dec 20, 2015

Looks good. Great to have a better help system. Merging.

philippjfr pushed a commit that referenced this pull request Dec 20, 2015

Philipp Rudiger Philipp Rudiger
Merge pull request #370 from ioam/help_improvements
Improvements to the help system

@philippjfr philippjfr merged commit bc2fd72 into master Dec 20, 2015

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.2%) to 70.588%
Details

@philippjfr philippjfr deleted the help_improvements branch Dec 20, 2015

@maxalbert

This comment has been minimized.

Copy link
Contributor

maxalbert commented Dec 23, 2015

Great, this seems to work well. Many thanks!

I wonder whether it would be worth setting recursive=True by default to increase discoverability of options for composite objects (but I don't have a strong opinion on it).

It would also be good to document this new functionality in one of the tutorials (maybe the "Options" tutorial, since it already illustrates the help command?).

@jlstevens

This comment has been minimized.

Copy link
Contributor Author

jlstevens commented Dec 23, 2015

I wonder whether it would be worth setting recursive=True by default to increase discoverability of options for composite objects

Not a bad suggestion! I might do that after the website has been updated as changing it immediately will probably break notebook tests.

It would also be good to document this new functionality in one of the tutorials (maybe the "Options" tutorial, since it already illustrates the help command?).

Yes, that is definitely something I will do now. I can change Markdown text much more easily than output generated by code. Thank you for reminding me to do this!

@jlstevens

This comment has been minimized.

Copy link
Contributor Author

jlstevens commented Dec 23, 2015

I've added a brief description of these parameters in commit 04f77e4 to the Options tutorial.

@philippjfr Maybe we should use the pattern argument in the actual example? This would mean updating the test data but I see three advantages:

  1. Even hv.help(image) is generating too much output in the tutorial, making it hard to follow.
  2. It would mean we are less likely to have to update the test data when parameter documentation is updated.
  3. It would give a concrete example of pattern in use and why it is helpful.

What do you think? To be concrete, I'm considering showing the output of hv.help(image, pattern='bounds')...

@jbednar

This comment has been minimized.

Copy link
Contributor

jbednar commented Dec 26, 2015

Sounds good to me.

@maxalbert

This comment has been minimized.

Copy link
Contributor

maxalbert commented Dec 30, 2015

+1

@jlstevens

This comment has been minimized.

Copy link
Contributor Author

jlstevens commented Dec 30, 2015

I've gone and implemented this suggestion in 5ed9eda.

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