ValidHDF5#

class movement.validators.files.ValidHDF5(path, *, expected_datasets=NOTHING)[source]#

Bases: object

Class for validating HDF5 files.

The validator ensures that the file:

  • is in HDF5 format, and

  • contains the expected datasets.

path#

Path to the HDF5 file.

Type:

pathlib.Path

expected_datasets#

List of names of the expected datasets in the HDF5 file. If an empty list (default), this check is skipped.

Type:

list of str or None

Raises:

ValueError – If the file is not in HDF5 format or if it does not contain the expected datasets.