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

Support indexing by cf_role for DSG datasets #240

Merged
merged 1 commit into from
Jun 29, 2021

Conversation

dcherian
Copy link
Contributor

xref #122

@@ -372,6 +372,7 @@ def _get_all(obj: Union[DataArray, Dataset], key: str) -> List[str]:
"""
all_mappers = (
_get_custom_criteria,
functools.partial(_get_custom_criteria, criteria=cf_role_criteria),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kthyng This was really easy!

Copy link
Contributor

Choose a reason for hiding this comment

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

@dcherian Nice! Not sure what this is exactly, but glad the changes are working for you.

@@ -665,7 +666,7 @@ def check_results(names, key):
successful[k] = bool(measure)
if measure:
varnames.extend(measure)
elif k in custom_criteria:
elif k in custom_criteria or k in cf_role_criteria:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should really refactor this.

@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #240 (bc544f8) into main (ed36d29) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #240   +/-   ##
=======================================
  Coverage   96.76%   96.76%           
=======================================
  Files          14       14           
  Lines        1792     1793    +1     
=======================================
+ Hits         1734     1735    +1     
  Misses         58       58           
Flag Coverage Δ
unittests 96.76% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cf_xarray/accessor.py 95.59% <100.00%> (ø)
cf_xarray/criteria.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 ed36d29...bc544f8. Read the comment docs.

@dcherian dcherian merged commit 2f46ee3 into xarray-contrib:main Jun 29, 2021
@dcherian dcherian deleted the cf-role branch June 29, 2021 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants