ska_sdp_piper.piper.pipeline module
- class ska_sdp_piper.piper.pipeline.Pipeline(name, *stages, global_config_model=<class 'ska_sdp_piper.piper.piper_base_model.PiperBaseModel'>, version=None)[source]
Bases:
Command- property config: dict
Get all the configuration of the pipeline
This returns a dictionary with following top level keys:
global_parametersparameterspipelineversion
- with_qa_path_resolver(resolver)[source]
Register a custom function to resolve the log file path dynamically.
- Parameters:
resolver (Callable) -- A function which can provide alternate log file paths.
- Return type:
- overide_run(*cli_args, runner=None)[source]
Override the
runsubcommand with custom CLI arguments and runner.- Parameters:
*cli_args (
CLIArgument) -- List of additional CLI arguments to registerrunner (
type[DefaultRunner] |None, default:None) -- The runner class to use for execution of stages
- Return type:
- Returns:
The current pipeline instance.
- create_output_dir(output_path, unique_output_subdir, **kwargs)[source]
Create the directory for pipeline output files.
- set_runtime(config_path, override_defaults, stages, **kwargs)[source]
Set the runtime state based on CLI and configuration files.
- install_config(override_defaults, config_install_path, **kwargs)[source]
Set the runtime state based on CLI and configuration files.
- Parameters:
override_defaults (
list[tuple[str,str]]) -- A list of tuple/list, where each element contains 2 sub-elements. First element is a string key to the parameter to override. This can represent a path to a nested key, where each key in the hirerarchy is seperated by a.character. Second element is also a string, which is then parsed using YAML rules, and converted to a rich object.config_install_path (
str) -- Directory path to store the default config**kwargs (dict) -- Additional runtime parameters.
- write_runtime_params(cli_args)[source]
Persist current configuration and CLI arguments to disk.
- Parameters:
cli_args (
dict) -- The raw CLI arguments used for the run.
- resolve_qa_dir(**kwargs)[source]
Determine and set the QA directory path.
- Parameters:
**kwargs (dict) -- Arbitrary keyword arguments passed to the QA path resolver.