readConfigYaml

lsst.ts.wep.utils.readConfigYaml(path: str, recurseImports: bool = True) dict

Read the config yaml file and return the corresponding dictionary.

Parameters

pathstr

Path to the config yaml file. Can be an absolute or relative path, but if the path starts with “policy:”, the path will be understood to be relative to the ts_wep policy directory.

recurseImportsstr, optional

If True, and the config contains ‘imports’, open the file(s) provided under that keyword and merge the resulting configurations. In the case of overlapping keywords, each subsequent import overrides previous imports, and the imported configs are all overridden by the top level config. (the default is True)

Returns

dict

Dictionary containing the configuration stored in the yaml file

Raises

ValueError

If recurseImports is True and ‘imports’ doesn’t map to a string or 1D list of strings