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

Minimal Dataset coords and dims validation #62

Open ljstrnadiii opened 2 years ago

ljstrnadiii commented 2 years ago

What would be the minimal implementation to be merged here?

My use case is simply to check if a dataset has specific coords and dims. I could go one step further to check that each coord is indexed by specific dim.

I might just give this a try, but is there a can of worms I am simply not anticipating here?

Cheers!

https://github.com/carbonplan/xarray-schema/blob/a25777c55dde98d5732f48423706da4fc81cd1fd/xarray_schema/dataset.py#L60

jhamman commented 2 years ago

Sounds great @ljstrnadiii! The one thing to watch out for is the potential to introduce schema inconsistencies (i.e. between data_vars and dataset coords). See also #39.

kmuehlbauer commented 2 years ago

@ljstrnadiii Did you come any further with this?

garciampred commented 9 months ago

It this project alive? It is very interesting Please check https://github.com/xarray-contrib/xarray-schema/pull/187