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

Adds support for parametric vertical coordinate #528

Merged

Conversation

jasonb5
Copy link
Contributor

@jasonb5 jasonb5 commented Jul 18, 2024

Adds support for parametric vertical coordinates from CFConventions.

  • Update docs
  • Add name to CITATION.cff
  • Remove squeeze

cf_xarray/accessor.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
@dcherian
Copy link
Contributor

dcherian commented Jul 22, 2024

Thanks for taking this on! I've left a few high-level comments. Mostly I think it would be a lot clearer if we define a dataclass per transform that took care of the all the specialized logic: #528 (comment)

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 92.69231% with 19 lines in your changes missing coverage. Please review.

Project coverage is 93.35%. Comparing base (a9cebee) to head (c9849f6).
Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
cf_xarray/parametric.py 92.91% 18 Missing ⚠️
cf_xarray/accessor.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
+ Coverage   85.78%   93.35%   +7.56%     
==========================================
  Files          13       13              
  Lines        2364     2197     -167     
  Branches      183        0     -183     
==========================================
+ Hits         2028     2051      +23     
+ Misses        303      146     -157     
+ Partials       33        0      -33     
Flag Coverage Δ
mypy ?
unittests 93.35% <92.69%> (-0.64%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
@dcherian
Copy link
Contributor

ignore the 3.9 failures, I'll drop it soon.

cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
@dcherian
Copy link
Contributor

Thanks! This is getting close. Just some style nits.

I haven't looked at the tests but I'm assuming you have it covered with some real life usage too? :)

@dcherian
Copy link
Contributor

dcherian commented Aug 21, 2024

Please also add your name to CITATION.cff

EDIT: I added a checklist to the top.

cf_xarray/parametric.py Outdated Show resolved Hide resolved
cf_xarray/parametric.py Outdated Show resolved Hide resolved
@dcherian dcherian enabled auto-merge (squash) October 22, 2024 21:59
@dcherian dcherian merged commit 62ff402 into xarray-contrib:main Oct 22, 2024
10 of 12 checks passed
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.

3 participants