TaskIR

class lsst.pipe.base.pipelineIR.TaskIR(label: str, klass: str, config: 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)

Add a ConfigIR to this task if one is not present.

to_primitives()

Convert to a representation used in yaml serialization

Attributes Documentation

config: list[lsst.pipe.base.pipelineIR.ConfigIR] | None = 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: ConfigIR) None

Add 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_configConfigIR

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

to_primitives() dict[str, str | list[dict]]

Convert to a representation used in yaml serialization