2.2.3.11. pycsamt.api.pipe#
Pipeline API configuration for pyCSAMT.
- class pycsamt.api.pipe.PipelineAPIConfig(output_root='pipe_results', processed_subdir='processed', plots_subdir='plots', on_step_error='warn', save_intermediate=False, show_progress=True, progress_style='bar', repr_width=80, plot_dpi=150, plot_fmt='png', report_formats=<factory>, cache_root=None, history_path=None)
Bases:
objectRuntime configuration for the pyCSAMT pipeline engine.
- Variables:
output_root (str) – Default root directory when no outdir is passed to
run().processed_subdir (str) – Sub-directory inside output_root that receives the processed EDI files.
plots_subdir (str) – Sub-directory inside output_root that receives all QC figures, organised into one sub-folder per pipeline step.
on_step_error (str) – Behaviour when a step raises an exception.
"raise"re-raises immediately;"warn"logs a warning and continues with the previous sites;"skip"is silent.save_intermediate (bool) – If
True, EDI files are also written after each step (intoplots_subdir/<step>/edi_snapshot/).show_progress (bool) – Enable console progress output while the pipeline runs.
progress_style (str) –
"bar"– tqdm-style progress bar (requires tqdm; falls back to"log"when unavailable)."log"– one line per step."silent"– no output."rich"– a live-updatingrich.table.Tableshowing every step’s status (pending/running/OK/ERR/cached) at once, rewritten in place as the run progresses. See Live Observability.repr_width (int) – Character width used when printing the pipeline summary.
plot_dpi (int) – DPI for saved figures.
plot_fmt (str) – File extension / format for saved figures (
"png","pdf","svg").report_formats (tuple) – Sequence of report types to write. Each item must be
"html","txt", or"dashboard"."dashboard"writes a richer, brandeddashboard.htmlwith KPI stat tiles and inline-SVG charts (step status, per-step duration, site-count flow) — see Pipeline Outputs.cache_root (str | None) – Default root directory for the pipeline step cache (
StepCache) whenrun()is called withcache=True.Noneresolves lazily to~/.pycsamt/pipeline_cache.history_path (str | None) – Default file for the run history log (
load_history()) whenrun()is called withhistory=True.Noneresolves lazily to~/.pycsamt/pipeline_history.jsonl.
- Parameters:
- output_root: str = 'pipe_results'
- processed_subdir: str = 'processed'
- plots_subdir: str = 'plots'
- on_step_error: str = 'warn'
- save_intermediate: bool = False
- show_progress: bool = True
- progress_style: str = 'bar'
- repr_width: int = 80
- plot_dpi: int = 150
- plot_fmt: str = 'png'
- report_formats: tuple
- configure(**kw)
Set one or more configuration attributes by keyword.
- Parameters:
kw (Any)
- Return type:
None
- context(**kw)
Temporarily override config values, then restore them.
- Parameters:
kw (Any)
- Return type:
Generator[PipelineAPIConfig, None, None]
- reset()
Restore all attributes to package defaults.
- Return type:
None
- clone()
Return a deep copy of this config.
- Return type:
- pycsamt.api.pipe.configure_pipe(**kw)
Configure the global
PYCSAMT_PIPEsingleton.- Parameters:
kw (Any)
- Return type:
None
- pycsamt.api.pipe.reset_pipe()
Reset
PYCSAMT_PIPEto package defaults.- Return type:
None