NekUpload.validate.hdf5_definitions module
- class NekUpload.validate.hdf5_definitions.HDF5DatasetDefinition(path: str, dataset_shape: tuple[int, ...] = ())[source]
Bases:
HDF5DefinitionGiven an HDF5 file, responsible for checking if dataset conforms to schema expectations, such as shape constraints. All exceptions raised from this class are of type HDF5SchemaException or its children.
- dataset_shape: tuple[int, ...] = ()
- path: str
- validate(f: File) bool[source]
Checks whether the defined HDF5 dataset is present and well-defined in the specified HDF5 file
- Parameters:
f (h5py.File) – _description_
- Raises:
HDF5SchemaException – _description_
HDF5SchemaException – _description_
HDF5SchemaException – _description_
HDF5SchemaException – _description_
- Returns:
_description_
- Return type:
bool
- class NekUpload.validate.hdf5_definitions.HDF5GroupDefinition(path: str, attributes: list[str] = <factory>)[source]
Bases:
HDF5DefinitionGiven an HDF5 file, responsible for checking group conforms to correct structure and contains the specified attributes. This is not an exclusive check, other non-specified attributes can also be present. All exceptions raised from this class are of type HDF5SchemaException or its children.
- attributes: list[str]
- path: str
- validate(f: File) bool[source]
Checks whether the defined HDF5 group is present and well-defined in the specified HDF5 file
- Parameters:
f (h5py.File) – HDF5 file
- Raises:
HDF5SchemaException – _description_
HDF5SchemaException – _description_
HDF5SchemaException – _description_
- Returns:
_description_
- Return type:
bool