pelagos_py.steps.base_step#
- pelagos_py.steps.base_step.REGISTERED_STEPS[source]#
Registry of explicitly registered step classes.
- pelagos_py.steps.base_step.register_step(cls)[source]#
Decorator to mark a step class for inclusion in the pipeline.
- class pelagos_py.steps.base_step.BaseStep(name, parameters=None, diagnostics=False, context=None)[source]#
Bases:
pelagos_py.utils.config_mirror.ConfigMirrorMixinBase class for pipeline steps with config-mirroring support. Every concrete subclass (registered via @register_step) inherits this.
- classmethod describe_parameters()[source]#
Return a JSON-serialisable description of this step’s parameters.
Introspection surface for external tools (e.g. a dashboard) that need to render a parameter form without instantiating the step. See
pelagos_py.utils.parameter_spec.describe().
- classmethod output_variables(parameters)[source]#
Variables this step writes for the given config
parameters(read by the config validator).
- adjusted_copy(var)[source]#
Name of
var’s_ADJUSTEDversion, created (with its_QC) as a copy of the raw variable if missing.
- values_at_rows_of(var, rows_of)[source]#
vartime-interpolated onto the rows whererows_ofhas data, as(values, flags).For a step needing another sensor’s values at its own rows; the result is for the calculation only and never written to the data. Samples flagged in the calculation flags (default 3/4/9) are not interpolated from, and each row’s flag is the merged flag of the samples it came from (9 where no value).
- mark_intermediate(*names)[source]#
Record pipeline-made working variables that Data Export leaves out unless asked to keep them.
- log(message, console=True)[source]#
Log an info-level message.
console=Falsekeeps it in the log file only.
- log_generating_diagnostics()[source]#
Log that diagnostics are being produced, distinguishing report-capture runs from
diagnostics: true.
- log_progress(iterable=None, *, desc, total=None, unit='it', leave=False)[source]#
Wrap a countable sub-loop as a standard pipeline progress bar; drop-in for
tqdm(iterable, ...).
- halt(message)[source]#
Stop the pipeline cleanly for an unrecoverable misconfiguration.
Logs
message(the detail and any fix/install hint) at ERROR level, then a terminal STOP line marking the deliberate halt, and exits. Use this instead of raising for config problems discovered at run time, so the user sees one actionable error rather than a wrapped traceback.