h5_matches_structure

function of dascore.utils.hdf5 source

h5_matches_structure(
    h5file: File ,
    structure: collections.abc.Sequence[str] ,
)

Check if an H5 file matches a spec given by a structure.

Parameters

Parameter Description
h5file A an open h5file as returned by h5py.File.
structure A sequence of strings which indicates required groups/datasets/attrs.
For example (“data”, “data/raw”, “data/raw.sampling”) would require
the ‘data’ group to exist, the data/raw group/dataset to exist and
that raw has an attributed called ‘sampling’.