Skip to content

Validation

Validation of data files against their labels.

ValidationNotSupported

Bases: NotImplementedError

File-level validation isn't supported for this file standard.

validate

validate(ft: Filetype, path: str | Path, *, bucket: Bucket | str | None = None, object_check_hook: bool = True) -> dict[str, list[str]]

Check whether the file at PATH is accurately described by the filetype FT. Return a dict of mismatches. If the dict is empty, there are no mismatches. If BUCKET is not None, PATH is interpreted as a key in the S3 bucket BUCKET.