Validation¶
Conformance validator with levels 1 to 5, each including those below.
Validation overview says what each level checks.
validate(store, level=N) runs levels 1 to N (default 3) and returns a
ValidationResult.
zarr_vectors.validate is undecided: treat it as internal.
Unified validation — runs levels 1–5 cumulatively.
- zarr_vectors.validate.validate(store_path, *, level=3)[source]¶
Validate a zarr vectors store at the specified conformance level (1–5).
- Parameters:
- Return type:
ValidationResult¶
- class zarr_vectors.validate.ValidationResult(level, passed=<factory>, warnings=<factory>, errors=<factory>)[source]¶
Bases:
objectAccumulated validation outcome.
- __init__(level, passed=<factory>, warnings=<factory>, errors=<factory>)¶
- merge(other)[source]¶
- Parameters:
other (ValidationResult)
- Return type:
None
Individual validation modules¶
Level 1 structural validation — verify the store layout on disk.
- zarr_vectors.validate.structure.validate_structure(store_path)[source]¶
Level 1: verify the store’s structure.
Asked of the store, not of a filesystem. This used to be pure
pathlib–Path(store_path).exists()anditerdir()– which made level 1 the one validator that could only ever see a local directory. Worse, it could not see the local ones either when reached through the api:Dataset.validate()passesGroup.url, andPath("file:///C:/...")does not exist, so every api-driven validation failed at level 1 and returned before doing anything else.Accepts a path, a URL or an open
Group.- Parameters:
- Return type:
Level 2 metadata validation — verify metadata is well-formed.
- zarr_vectors.validate.metadata.level_fields(root, li, lg)[source]¶
The level’s metadata fields as stored, uncoerced, so a malformed value reaches the check that reports it.
Precedence: the level’s
zarr_vectorsobject > legacy top-level keys (seeread_level_metadata()). Level 0’s bin is the root’sbase_bin_shape, so bin fields on level 0 are dropped.
- zarr_vectors.validate.metadata.validate_metadata(store_path)[source]¶
Level 2: verify all metadata is well-formed.
- Parameters:
- Return type:
Level 3 consistency validation — verify data arrays are internally consistent.
- zarr_vectors.validate.consistency.validate_consistency(store_path)[source]¶
Level 3: verify internal data consistency.
- Parameters:
- Return type:
Level 4-5 conformance validation — geometry rules and multi-resolution.
- zarr_vectors.validate.conformance.validate_conformance(store_path)[source]¶
Level 4: verify geometry-specific conformance.
- Parameters:
- Return type: