Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 540 Bytes

File metadata and controls

17 lines (14 loc) · 540 Bytes

Added check_* entry points in zarr_metadata.rules returning a discriminated Valid[T] | Invalid, for callers who want a document and its problems in one value.

The literal valid field narrows to either the normalized document or a nonempty problem tuple:

result = check_array_metadata_v3(loaded)
if result.valid:
    store(result.document)  # typed ZarrV3ArrayMetadataJSON
else:
    report(result.problems)  # non-empty tuple of problems

Use validate_* to collect problems and parse_* to raise on invalid input.