xarray-contrib / cf-xarray

an accessor for xarray objects that interprets CF attributes
https://cf-xarray.readthedocs.io/
Apache License 2.0
157 stars 39 forks source link

added `ValueError` for missing `grid_mapping` variable #458

Closed larsbuntemeyer closed 1 year ago

larsbuntemeyer commented 1 year ago

closes #448

This implements the fix suggested by @dcherian in #448

codecov[bot] commented 1 year ago

Codecov Report

Merging #458 (0d44411) into main (e283a83) will increase coverage by 0.00%. The diff coverage is 87.50%.

@@           Coverage Diff           @@
##             main     #458   +/-   ##
=======================================
  Coverage   86.33%   86.34%           
=======================================
  Files          22       22           
  Lines        4180     4188    +8     
  Branches      214      214           
=======================================
+ Hits         3609     3616    +7     
- Misses        513      514    +1     
  Partials       58       58           
Flag Coverage Δ
mypy 37.44% <0.00%> (-0.08%) :arrow_down:
unittests 95.97% <100.00%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
cf_xarray/tests/test_accessor.py 94.11% <83.33%> (-0.06%) :arrow_down:
cf_xarray/accessor.py 86.47% <100.00%> (+0.02%) :arrow_up:
dcherian commented 1 year ago

Thanks @larsbuntemeyer