doot.control.loaders.task

Functions

apply_group_and_source(group, source, x)

insert the group and source into a task definition dict

Classes

TaskLoader

load toml defined tasks, and create doot.structs.TaskSpecs of them

Module Contents

doot.control.loaders.task.apply_group_and_source(
group,
source,
x,
) <Unknown>[source]

insert the group and source into a task definition dict

a task is: [[tasks.GROUP]]: name = TASKNAME …

So the group isn’t actually part of the dict. This fn adds it in, plus where the dict came from

class doot.control.loaders.task.TaskLoader[source]

load toml defined tasks, and create doot.structs.TaskSpecs of them

tasks: dict[str | doot.workflow._interface.TaskName_p, doot.workflow._interface.TaskSpec_i]
failures: dict[str | pathlib.Path, list]
cmd_names: set[str]
task_builders: dict[str, Any]
extra: jgdv.Maybe[jgdv.structs.chainguard.ChainGuard | dict]
exit_on_load_failures: bool
factory: doot.workflow._interface.TaskFactory_p
setup(
plugins: jgdv.structs.chainguard.ChainGuard,
extra: jgdv.Maybe[jgdv.structs.chainguard.ChainGuard] = None,
) Self[source]
Parameters:
  • plugins (jgdv.structs.chainguard.ChainGuard)

  • extra (jgdv.Maybe[jgdv.structs.chainguard.ChainGuard])

Return type:

Self

load() jgdv.structs.chainguard.ChainGuard[source]
Return type:

jgdv.structs.chainguard.ChainGuard

_get_raw_specs_from_data(
data: dict,
source: pathlib.Path | Literal['(extra)'],
) list[dict][source]

extract raw task descriptions from a toplevel tasks dict, with no format checking. expects the dict to be { group_key : [ task_dict ] }

Parameters:
Return type:

list[dict]

_load_specs_from_path(path: pathlib.Path) None[source]

load a config file defined task_sources of tasks

Parameters:

path (pathlib.Path)

Return type:

None

_build_task_specs(
specs: list[dict],
source: jgdv.Maybe[str | pathlib.Path] = None,
) None[source]

convert raw dicts into TaskSpec objects

Parameters:
Return type:

None

_load_location_updates(
data: list[jgdv.structs.chainguard.ChainGuard],
source: str | pathlib.Path,
) None[source]
Parameters:
Return type:

None