taskgraph.loader package


taskgraph.loader.transform module

taskgraph.loader.transform.loader(kind, path, config, params, loaded_tasks)

Get the input elements that will be transformed into tasks in a generic way. The elements themselves are free-form, and become the input to the first transform.

By default, this reads tasks from the tasks key, or from yaml files named by tasks-from. The entities are read from mappings, and the keys to those mappings are added in the name key of each entity.

If there is a task-defaults config, then every task is merged with it. This provides a simple way to set default values for all tasks of a kind. The task-defaults key can also be specified in a yaml file pointed to by tasks-from. In this case it will only apply to tasks defined in the same file.

Other kind implementations can use a different loader function to produce inputs and hand them to transform_inputs.

Module contents