-
Notifications
You must be signed in to change notification settings - Fork 39
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 loading and running recipes to the notebook API #907
Conversation
These are introduced by the CLI, but some parts of the code depend on these variables to be specified.
Redirect recipe output to `main_log.txt` / `main_log_debug.txt`, as well as the notebook
The default has missing config parameters by design, so it is useless to warn until after the user config has been loaded.
Hi @nielsdrost and @Peter9192 , this PR is ready for review. Could you have a look? There is still a small issue with the tests on CircleCI that I will have a look at, but I think other than that the PR can be reviewed. The tests are running fine locally. |
This test fail seems to be completely random on CircleCI (sometime it passes, sometimes it fails), unrelated to any changed made in this PR, and I cannot reproduce it on my own machine.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, though I did not try using it.
Could you have a look at the question about representing CheckLevels in a YAML file? I think this should not be needed, because CheckLevels should not leak to the diagnostic script through the YAML interface, this is supposed to be used by the CMOR checker and nothing else.
Would it be possible to solve the import outside toplevel Codacy issue?
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
Yeah, it can be solved, but I think it is clearer where it is now. |
If would be great if you could follow the style guide if there is no technical reason for deviating from it. If everyone starts making up their own style the code will become harder to read for everyone. |
I don't consider this error be a 'hard' fail from Codacy, sometimes the code reads much better if the import is not at the top of the file. Besides that, Codacy and yapf sometimes conflict as well, so it is unclear what style to use. |
@bouweandela This PR is ready to be merged. I worked around the test failure by clearing the cache before the regrid tests, but a better implementation is needed. For more info see #953. |
Shoot, now I merged the wrong branch here...
EDIT: all good! |
5da9dbd
to
3dd57c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a scan of the code (especially changes outside of experimental). Looks good to me.
Changes implemented as requested.
Hi everyone, this PR implements an api to load and run recipes in an interactive jupyter notebook.
This PR is mostly complete in terms of what it is supposed to do. The thing that is missing is to have good test. I'm thinking we should have some very basic test recipes that we can run to test the API.
Also implements bugfix that closes #953
To do
max_parallel_tasks != 1
) -> Seems to work as intended..yml
or maybe pass dict directly?)Tasks
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 #901 and #868
For more discussion, see issue #498
Documentation: https://esmvaltool--907.org.readthedocs.build/projects/ESMValCore/en/907/api/esmvalcore.api.html
Demo notebook: https://gist.github.com/stefsmeets/1163eeea765906550f772c15b69e866e