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 Listing and finding recipes to the experimental notebook API #901

Merged
merged 19 commits into from
Dec 16, 2020

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Dec 9, 2020

Hi all, this code implements some new functionality for the experimental API we are building. It introduces some functions to list recipes, find recipes using some search patterns, and display nicely formatted recipe metadata in a jupyter notebook.

Tasks

  • Create an issue to discuss what you are going to do, if you haven't done so already (and add the link at the bottom)
  • This pull request has a descriptive title that can be used in a changelog
  • Add unit tests
  • Public functions should have a numpy-style docstring so they appear properly in the API documentation. For all other functions a one line docstring is sufficient.
  • If writing a new/modified preprocessor function, please update the documentation
  • Circle/CI tests pass. Status can be seen below your pull request. If the tests are failing, click the link to find out why.
  • Codacy code quality checks pass. Status can be seen below your pull request. If there is an error, click the link to find out why. If you suspect Codacy may be wrong, please ask by commenting.

If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.


Follows up on #868
For more discussion, see issue #498
Documentation: https://esmvaltool--901.org.readthedocs.build/projects/ESMValCore/en/901/api/esmvalcore.api.html
Demo notebook: https://gist.github.com/stefsmeets/f4b7fc7fffe78cecb895b12bfb8ea671

@stefsmeets stefsmeets changed the title Api list recipes [WIP] List / find recipes for notebook API [WIP] Dec 9, 2020
@stefsmeets stefsmeets added enhancement New feature or request UX User experience labels Dec 9, 2020
@stefsmeets stefsmeets self-assigned this Dec 9, 2020
pybtex is a bibtex parser / renderer for python (https://pybtex.org/)
@stefsmeets stefsmeets marked this pull request as ready for review December 14, 2020 11:10
@stefsmeets stefsmeets changed the title List / find recipes for notebook API [WIP] List / find recipes for notebook API Dec 14, 2020
@stefsmeets
Copy link
Contributor Author

Hi @nielsdrost , this one is ready for review!

Copy link
Member

@nielsdrost nielsdrost left a comment

Choose a reason for hiding this comment

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

Nice work @stefsmeets! Works like a charm (after the bibtex fixes got merged)

There seem to be a few Codacy issues related to imports, could you have a look?

esmvalcore/experimental/recipe_info.py Outdated Show resolved Hide resolved
string += '\n\n'
string += f'{self.description}'

string += '\n\n### Contributors'
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be authors, and mainainters is perhaps missing.

Copy link
Contributor Author

@stefsmeets stefsmeets Dec 16, 2020

Choose a reason for hiding this comment

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

Yep, good point! I added the maintaners and fixed the string.

@stefsmeets
Copy link
Contributor Author

Nice work @stefsmeets! Works like a charm (after the bibtex fixes got merged)

There seem to be a few Codacy issues related to imports, could you have a look?

Yep:

  • Codacy ignores the # noqa: E402 tag, which is about the import order, because I want to have the warning at the top.
  • The other one (third party import "import yaml" should be placed before "import pybtex" (wrong-import-order)) is odd. isort sorts pybtex before yaml and locally, prospector does not complain... So I think we can ignore this one.

Copy link
Member

@nielsdrost nielsdrost left a comment

Choose a reason for hiding this comment

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

Thank @stefsmeets, looks great!

@nielsdrost nielsdrost changed the title List / find recipes for notebook API Add Listing and finding recipes to the experimental notebook API Dec 16, 2020
@nielsdrost nielsdrost merged commit 63f5b03 into master Dec 16, 2020
@nielsdrost nielsdrost deleted the api_list_recipes branch December 16, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants