uvex_transients.cli.steps.run_steps#

uvex_transients.cli.steps.run_steps(config: RunConfig, store: dict[str, Any], out_dir: Path | None = None, overwrite: bool = False, keep_intermediate: bool = True) → Iterator[tuple[StepSpec, Any, Path | None]][source]#

Run every step in config.steps, in order, against store.

Parameters:
  • config (RunConfig) – The parsed run-config; config.steps is accessed here (forcing its own structural validation, if not already resolved) before the first step runs.

  • store (dict of str to Any) – The artifact store, seeded by the caller with at least "baseline" (and typically "exposure") – see uvex_transients.cli.config.RESERVED_ARTIFACT_IDS. Mutated in place: each step’s own id is added once it’s run (or loaded from an existing checkpoint).

  • out_dir (Path, optional) – Directory to read/write checkpoint files from/to. If None, no step is ever checkpointed, regardless of its own checkpoint/keep_intermediate.

  • overwrite (bool, optional) – Whether an existing checkpoint file may be overwritten – and, symmetrically, whether an existing one is trusted and loaded instead of the step being rerun. With overwrite=True, every step always reruns and any existing checkpoint is replaced.

  • keep_intermediate (bool, optional) – The default “should this step be checkpointed” answer for a step whose own ~uvex_transients.cli.config.StepSpec.checkpoint is None. The default is True.

Yields:
  • step (StepSpec) – The step just run (or loaded from checkpoint).

  • artifact (Any) – Its resulting artifact (also written into store[step.id]).

  • path (Path or None) – The checkpoint file it was written to or loaded from, or None if it wasn’t checkpointed at all.