xarrera.DatasetSchema
- class xarrera.DatasetSchema(data_vars=None, coords=None, attrs=None, checks=None)
A light-weight xarray.Dataset validator
- Parameters:
data_vars (mapping of variable names and DataArraySchemas, optional) – Per-variable DataArraySchema’s, by default None
coords (Union[CoordsSchema, Dict[Hashable, DataArraySchema]], optional) – Coordinates schema to validate against the Dataset, optional
attrs (Union[AttrsSchema, Dict[Hashable, AttrsSchema]], optional) – Attribute names and their values, optional.
checks (Iterable[Callable], optional) – Dataset wide checks, by default None
- __init__(data_vars=None, coords=None, attrs=None, checks=None)
Methods
__init__([data_vars, coords, attrs, checks])check_dims_consistency()from_json(obj)to_json(**dumps_kws)Generate a JSON string representation of this schema
validate(ds)Check if the Dataset complies with the Schema.
Attributes
attrscoordsdata_varsjson