Skip to content

pipeline

The Pipeline class is the main entry point for running an gridstats config.

gridstats.pipeline

Pipeline orchestration for gridstats.

The Pipeline class loads data, applies a sequence of stat operations defined in a PipelineConfig, finalises the result, and writes it to disk.

Pipeline

Orchestrate data loading, stat computation, and output writing.

Parameters:

Name Type Description Default
config PipelineConfig

Validated pipeline configuration.

required

from_yaml(path: str | Path) -> Pipeline classmethod

Instantiate a Pipeline from a YAML configuration file.

Parameters:

Name Type Description Default
path str | Path

Path to a YAML file conforming to the PipelineConfig schema.

required

Returns:

Type Description
Pipeline

Ready-to-run Pipeline instance.

run() -> xr.Dataset

Execute the full pipeline: load → compute → finalise → write.

Returns:

Type Description
Dataset

The finalised output dataset (also written to disk).