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

Add handling of cftime bounds #441

Open znichollscr opened 1 year ago

znichollscr commented 1 year ago

At the moment this just adds a failing test that shows that add_bounds fails if the times are cftimes. I'm not sure what the best solution would be.

znichollscr commented 1 year ago

@mathause any thoughts on this one? (Calling on a familiar name :))

codecov[bot] commented 1 year ago

Codecov Report

Merging #441 (938e566) into main (9383257) will decrease coverage by 49.16%. The diff coverage is 31.81%.

@@             Coverage Diff             @@
##             main     #441       +/-   ##
===========================================
- Coverage   86.40%   37.24%   -49.16%     
===========================================
  Files          22       21        -1     
  Lines        3994     3936       -58     
  Branches      194      199        +5     
===========================================
- Hits         3451     1466     -1985     
- Misses        491     2271     +1780     
- Partials       52      199      +147     
Flag Coverage Δ
mypy 37.24% <31.81%> (-0.04%) :arrow_down:
unittests ?

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

Impacted Files Coverage Δ
cf_xarray/helpers.py 25.64% <ø> (-40.18%) :arrow_down:
cf_xarray/tests/test_accessor.py 29.06% <31.81%> (-64.86%) :arrow_down:

... and 19 files with indirect coverage changes