nirs4all.pipeline.config.pipeline_config module

PipelineConfigs.py

class nirs4all.pipeline.config.pipeline_config.PipelineConfigs(definition: Dict | List[Any] | str, name: str = '', description: str = 'No description provided', max_generation_count: int = 10000)[source]

Bases: object

Class to hold the configuration for a pipeline.

property expansion_count: int

Return the number of pipeline configurations generated from the template.

Returns:

Number of expanded configurations (1 if no generators were used)

static get_hash(steps) str[source]

Generate a hash for the pipeline configuration.

All objects are fully JSON-serializable (no _runtime_instance). No need for default=str hack anymore.

get_template_dict() Dict[source]

Get the original template as a dictionary.

Returns:

Original template dictionary (deep copy to prevent mutation)

get_template_yaml() str[source]

Serialize the original template to YAML format for storage.

Returns:

YAML string of the original template

classmethod value_of(obj, key)[source]

Recursively collect all values of a key in a (possibly nested) serialized object. Returns a single string with values joined by commas.

classmethod value_of_str(obj, key)[source]

Returns a single string of all values for the given key, joined by commas.