TaskIR

class lsst.pipe.base.pipelineIR.TaskIR(label: str, klass: str, config: Optional[List[lsst.pipe.base.pipelineIR.ConfigIR], None] = None)

Bases: object

Intermediate representation of tasks read from a pipeline yaml file.

Attributes Summary

config List of all configs overrides associated with this task, and may be None if there are no config overrides.

Methods Summary

add_or_update_config(other_config) Adds a ConfigIR to this task if one is not present.
to_primitives() Convert to a representation used in yaml serialization

Attributes Documentation

config = None

List of all configs overrides associated with this task, and may be None if there are no config overrides.

Methods Documentation

add_or_update_config(other_config: lsst.pipe.base.pipelineIR.ConfigIR) → None

Adds a ConfigIR to this task if one is not present. Merges configs if there is a ConfigIR present and the dataId keys of both configs match, otherwise adds a new entry to the config list. The exception to the above is that if either the last config or other_config has a python block, then other_config is always added, as python blocks can modify configs in ways that cannot be predicted.

Parameters:
other_config : ConfigIR

A ConfigIR instance to add or merge into the config attribute of this task.

to_primitives() → Dict[str, Union[str, List[dict]]]

Convert to a representation used in yaml serialization