scope_steps
Identifying a DAG's scope steps.
A scope step (registry.produces_file_scope) narrows the run's file selection
rather than producing a result other steps read, so several parts of the DAG
machinery have to tell one apart from an ordinary step: the validator checks its
placement, scoping runs it, the executor leaves it out of the wave loop, and
waves keeps it out of both the ledger key and the waveability check.
Separate from scoping, which runs the scope step: this module only names
them, so it imports nothing from flows.dag at runtime and every one of those
callers can import it directly.
Module
Functions
is_scope_step
def is_scope_step(step: DAGStep) ‑> bool:Return whether step narrows the run's file selection.
Arguments
step: The step to classify.
Returns
Whether the step's registry entry declares produces_file_scope.
runnable_steps
def runnable_steps(steps: Sequence[DAGStep]) ‑> list[DAGStep]:Return the steps among steps that the executor should run.
Arguments
steps: The phase's steps, in declaration order.
Returns Every step but the scope step, in declaration order.
scope_steps
def scope_steps(steps: Sequence[DAGStep]) ‑> list[DAGStep]:Return the scope steps among steps, in declaration order.
Arguments
steps: The steps to inspect — a phase'ssteps, or an interactive DAG'sbackground_steps.
Returns Every scope step among them — empty when there is none, and more than one only for a DAG the validator has yet to reject.