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

Deprecate the function esmvalcore.var_name_constraint #1592

Merged
merged 1 commit into from
May 19, 2022

Conversation

schlunma
Copy link
Contributor

@schlunma schlunma commented May 19, 2022

Description

This PR adds an API documentation for the module esmvalcore.iris_helpers deprecates the function var_name_constraint in it. It replaces it with iris' NameConstraint class.

Note: I didn't remove the appearances of var_name_constraint in the ICON CMORizer on purpose since they are fixed in #1549 and I want to avoid merge conflicts.

Closes #1536
Closes #1537

Link to documentation: https://esmvaltool--1592.org.readthedocs.build/projects/ESMValCore/en/1592/api/esmvalcore.iris_helpers.html


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@schlunma schlunma added this to the v2.6.0 milestone May 19, 2022
@schlunma schlunma requested a review from valeriupredoi May 19, 2022 09:51
@schlunma schlunma self-assigned this May 19, 2022
@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #1592 (65265e2) into main (11cd9cb) will increase coverage by 0.00%.
The diff coverage is 62.96%.

@@           Coverage Diff           @@
##             main    #1592   +/-   ##
=======================================
  Coverage   90.83%   90.83%           
=======================================
  Files         200      200           
  Lines       10644    10648    +4     
=======================================
+ Hits         9668     9672    +4     
  Misses        976      976           
Impacted Files Coverage Δ
esmvalcore/preprocessor/_derive/lvp.py 50.00% <25.00%> (ø)
esmvalcore/preprocessor/_derive/vegfrac.py 41.66% <25.00%> (ø)
esmvalcore/preprocessor/_derive/lwp.py 40.74% <33.33%> (ø)
esmvalcore/preprocessor/_derive/_shared.py 88.31% <50.00%> (ø)
esmvalcore/preprocessor/_derive/sm.py 52.94% <50.00%> (ø)
esmvalcore/cmor/_fixes/shared.py 100.00% <100.00%> (ø)
esmvalcore/iris_helpers.py 100.00% <100.00%> (ø)
esmvalcore/preprocessor/_derive/alb.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11cd9cb...65265e2. Read the comment docs.

@schlunma
Copy link
Contributor Author

Sorry, I can't add all these missing tests for the variable derivation here...

Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

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

excellent enhancement, Manu! Two questions: is the class NameConstraint available for only the latest iris, or - what's the minimum version of iris it is available in - since we must pin on that one? And the second question: do we have a list somewhere where we add all these deprecations, so we remember to remove them in said versions? 🍺

@valeriupredoi
Copy link
Contributor

oh and don't worry about the coverage issue, we need tests for those to begin with, but we'll plop them in a future PR 👍

@schlunma
Copy link
Contributor Author

Cheers V, thanks for the review! 🚀

is the class NameConstraint available for only the latest iris, or - what's the minimum version of iris it is available in - since we must pin on that one?

Apparently it has been added in 2.4, so we should be fine here 😆

And the second question: do we have a list somewhere where we add all these deprecations, so we remember to remove them in said versions? beer

That's a very good idea! Afaik we don't have this list yet, but I will open an issue to create one.

@schlunma schlunma merged commit b902e58 into main May 19, 2022
@schlunma schlunma deleted the deprecate_var_name_constraint branch May 19, 2022 12:30
@valeriupredoi
Copy link
Contributor

great, cheers, Manu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants