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 get_available_cats() method to tutorial.py #458

Merged
merged 11 commits into from Aug 18, 2022

Conversation

jukent
Copy link
Collaborator

@jukent jukent commented Mar 14, 2022

Change Summary

Adding a get_keys() method to the tutorial.py module. This will help with the documentation by listing all of the available dataset catalogs to then choose from before calling tutorial.get_url().

Is it necessary to add a long-name associated with each of these keys?

Also corrects a spelling error on "catalog" in tutorial.py and adds a check that the tutorial_catalogs input kwarg is a dictionary.

Related issue number

The need for this arose while working on #456

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable

@jukent jukent marked this pull request as ready for review March 14, 2022 15:39
@jukent jukent requested a review from andersy005 as a code owner March 14, 2022 15:39
@jukent
Copy link
Collaborator Author

jukent commented Mar 14, 2022

Both get_url and get_keys allow the user to pass in their own dictionary of keys mapping to urls in the kwargs, instead of just the tutorial_catalog dictionary. There aren't tests checking for a bad dictionary input though. --- This is now done.

Copy link
Member

@andersy005 andersy005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks solid to me 👍🏽

thank you @jukent!

@andersy005
Copy link
Member

Both get_url and get_keys allow the user to pass in their own dictionary of keys mapping to urls in the kwargs, instead of just the tutorial_catalog dictionary.

my latest change restricts this to a default dict of values so as to reduce the complexity of the codebase. we can add this feature later when there's a demand for it.

@andersy005 andersy005 enabled auto-merge (squash) August 18, 2022 16:59
@andersy005 andersy005 changed the title add get_keys() method to tutorial.py Add get_available_cats() method to tutorial.py Aug 18, 2022
@andersy005 andersy005 merged commit aaab9d7 into intake:main Aug 18, 2022
@andersy005 andersy005 added the enhancement Issues that are found to be a reasonable candidate feature additions label Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that are found to be a reasonable candidate feature additions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants