-
Notifications
You must be signed in to change notification settings - Fork 3
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 ESMValTool Equilibrium Climate Sensitivity recipe #51
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
@bouweandela I had a go at resolving the conflicts due to renaming packages here: bouweandela#1 Is this ready for review? I had a quick look through and it's looking great, with a few extra TODO's to add to the list :D |
270d34f
to
2160fe0
Compare
It is ready if you are OK with postponing the TODOs to a next pull request. |
Have you seen how many TODOs we have 😆 |
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.
Nice stuff
|
||
Recipe = dict[str, Any] | ||
|
||
OutputBundle = dict[str, Any] |
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.
We should make a common type and validation for this in due course
@@ -0,0 +1 @@ | |||
"""Tests for the ref-metrics-esmvaltool package.""" |
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.
I haven't typically made the test directory a python module. What are the pros of this?
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.
I removed the files for now and we can talk about it later. In my experience, it is safer to put __init__.py
files everywhere to avoid running into unexpected errors because some development tooling (e.g. documentation builder, test runner, etc) interprets the files as namespace packages.
It is also a common practice to ship the tests with the software. This has the advantage that you can even run the tests when installing the package from PyPI. This is e.g. useful when checking that the package is correctly building on conda-forge. To do this, I would move the tests
folder into the src/cmip_ref_metrics_esmvaltool
folder and add __init__.py
files.
packages/ref-metrics-esmvaltool/src/cmip_ref_metrics_esmvaltool/recipe.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Jared Lewis <jared@jared.kiwi.nz>
Description
Add Equilibrium Climate Sensitivity (ECS) to the ESMValTool metrics package.
Related to #32.
This works, but will result in many failures because of missing data and may be inaccurate because of missing cell areas. Ideas for further improvement:
Checklist
Please confirm that this pull request has done the following:
changelog/