readConfigYaml#

lsst.ts.wep.utils.readConfigYaml(path, recurseImports=True)#

Read the config yaml file and return the corresponding dictionary.

Parameters:
  • path (str) – 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.

  • recurseImports (str, 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:

Dictionary containing the configuration stored in the yaml file

Return type:

dict

Raises:

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