movement.io.validators.ValidHDF5#
- class movement.io.validators.ValidHDF5(path, *, expected_datasets=NOTHING)[source]#
Class for validating HDF5 files.
- Parameters:
path (pathlib.Path) – Path to the HDF5 file.
expected_datasets (list of str or None) – List of names of the expected datasets in the HDF5 file. If an empty list (default), this check is skipped.
- Raises:
ValueError – If the file is not in HDF5 format or if it does not contain the expected datasets.
- __init__(path, *, expected_datasets=NOTHING)#
Method generated by attrs for class ValidHDF5.
Methods
__init__
(path, *[, expected_datasets])Method generated by attrs for class ValidHDF5.
file_contains_expected_datasets
(attribute, value)Ensure that the HDF5 file contains the expected datasets.
file_is_h5
(attribute, value)Ensure that the file is indeed in HDF5 format.
Attributes
path
expected_datasets