pycsamt.pipeline._config#
Config-file loaders for the pyCSAMT pipeline.
Supports three config formats:
- YAML
Pipeline.from_yaml("workflow.yaml")- JSON
Pipeline.from_json("workflow.json")- Python module
Pipeline.from_py("workflow.py")The Python file must expose a module-level variable named
pipeline_configthat is adictwith the same schema as the YAML/JSON format.
Config schema#
name: "My Workflow" # optional pipeline label
output_dir: "results/" # default outdir when Pipeline.run() is called
preset: "basic_qc" # optional: seed steps from a preset before
# applying the steps list below
steps:
- name: notch # user label for the step (optional)
code: NR001 # step registry code OR name
params: # keyword arguments (optional)
mains_hz: 50
n_harm: 30
- name: select_band
code: FREQ001
params:
band_hz: [0.001, 10000]
- code: FREQ004 # name is optional — auto-set from registry
- code: SS001
The steps list is processed in order; if preset is specified, its
steps come first and the explicit steps entries are appended.
Functions
|
Parse a JSON pipeline config file and return the raw dict. |
|
Import a Python config file and return its |
|
Parse a YAML pipeline config file and return the raw dict. |
|
Serialise a list of |
- pycsamt.pipeline._config.load_yaml(path)[source]#
Parse a YAML pipeline config file and return the raw dict.
- pycsamt.pipeline._config.load_json(path)[source]#
Parse a JSON pipeline config file and return the raw dict.
- pycsamt.pipeline._config.load_py(path)[source]#
Import a Python config file and return its
pipeline_configdict.
- pycsamt.pipeline._config.pipeline_to_yaml(steps, name='pipeline', output_dir=None)[source]#
Serialise a list of
(label, Step)tuples to a YAML string.Produces the canonical format that
load_yaml()can reload. Falls back to a plain-text representation when PyYAML is unavailable.