StepContext#
- class rapidtools.jobs.StepContext(job: ~rapidtools.jobs.schema.Job, spec: ~rapidtools.jobs.schema.StepSpec, step_type: ~rapidtools.jobs.steps.StepType, params: dict[str, ~typing.Any], inputs: dict[str, ~typing.Any], settings: ~typing.Any, output_dir: ~pathlib.Path, workflow: ~typing.Any = None, outputs: dict[str, ~pathlib.Path | None] = <factory>, files: list[dict[str, ~typing.Any]] = <factory>, summary: dict[str, ~typing.Any] = <factory>, data: ~typing.Any = None, objects: dict[str, ~typing.Any] = <factory>)[source]#
Bases:
objectEverything a step needs to run, and the place it reports back to.
The run function of a step type fills
outputs,files,summary,dataandobjectsas it goes, so that whatever was produced before a failure or a cancellation is still reported.- Variables:
job (Job) – The job being run.
spec (StepSpec) – The step as written in the job file.
step_type (StepType) – Its type.
params (dict[str, Any]) – Validated parameters, secrets resolved.
inputs (dict[str, Any]) – Resolved inputs by name (
Path,AssetsInputorRegion); absent inputs areNone.settings (Any) – What
StepType.buildreturned.output_dir (Path) – The job’s resolved output folder.
workflow (Any) – The workflow engine doing the work.
outputs (dict[str, Path | None]) – Declared outputs written so far.
files (list[dict[str, Any]]) – Other files worth listing, each with
label,pathandkind.summary (dict[str, Any]) – Small JSON facts about the run (counts).
data (Any) – A JSON result that is not a file.
objects (dict[str, Any]) – In-memory results for callers in the same process (collections, workflow result objects). Never serialized.