xarray-contrib / xarray-schema

Schema validation for Xarray objects
https://xarray-schema.readthedocs.io/en/latest/index.html
MIT License
39 stars 8 forks source link

Dict-like schemas #16

Closed jhamman closed 2 years ago

jhamman commented 2 years ago

closes #10

This PR adds support for attrs and coords schemas. Due to the dict-like nature of these two objects, the api isn't quite as clean as I'd like but it does seem to check all the boxes in terms of functionality.

TODO:

codecov[bot] commented 2 years ago

Codecov Report

Merging #16 (32c4205) into main (bcaf95a) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
+ Coverage   93.73%   93.75%   +0.01%     
==========================================
  Files           6        6              
  Lines         351      352       +1     
==========================================
+ Hits          329      330       +1     
  Misses         22       22              
Impacted Files Coverage Δ
xarray_schema/components.py 98.56% <100.00%> (+0.01%) :arrow_up:

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 bcaf95a...32c4205. Read the comment docs.