upxo.meshing.gbconformant.pipeline.state module
Settings, artefacts, status and invalidation of one pipeline run.
A PipelineState holds the settings, the result of every stage that has run
(the heavy arrays live here) and the status of each stage. Invalidating a stage drops
its results and those of every later stage.
- class upxo.meshing.gbconformant.pipeline.state.StageStatus(*values)[source]
-
- NOT_RUN = 'Not run'
- RUNNING = 'Running'
- OK = 'OK'
- FAILED = 'Failed'
- STALE = 'Stale'
- SKIPPED = 'Skipped'
- class upxo.meshing.gbconformant.pipeline.state.PipelineState(config: dict, stage_ids: list[str])[source]
Bases:
objectHolds settings, artefacts, and per-stage status.
- status: dict[str, StageStatus]
- set_progress_handler(handler) None[source]
handler(message, current=None, total=None)receives the progress of the running stage.
- set_status(stage_id: str, status: StageStatus) None[source]
- pop_history(stage_id: str, data: dict) dict[source]
Move
data['history']into the stage’s history artefact; returnsdatawithout it.The per-pass list stays out of the compact stage report (and the JSON written for it) the same way it was dropped before this existed; it is kept instead at
"<stage_id>.history"for later per-pass inspection, and is invalidated together with the stage that wrote it.
- invalidate_from(stage_id: str, reason: str = '') list[str][source]
Mark
stage_idand every later stage stale; drop their artefacts.reasonsays why (it is kept for each stage that held results). Returns the list of invalidated stage ids.
- invalidate_after(stage_id: str, reason: str = '') list[str][source]
Invalidate every stage that comes after
stage_id; returns their ids.