ogdc_runner.models package

OGDC Runner Pydantic models.

class ogdc_runner.models.ExecutionFunction(**data: Any) None

Bases: OgdcBaseModel

Represents a function or command to execute in parallel.

Exactly one of command or function must be specified.

name

Unique identifier for this execution function

command

Shell command to execute (for shell workflows)

function

Python callable (for Hera @script decorated functions)

Parameters:
command: str | None
function: Callable[[...], Any] | None
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_ExecutionFunction__context: Any) None

Validate that exactly one execution type is specified.

Raises:

ValueError – If zero or multiple execution types are specified

Parameters:

_ExecutionFunction__context (Any)

Return type:

None

name: str
class ogdc_runner.models.FilePartition(**data: Any) None

Bases: OgdcBaseModel

Represents a partition of input files for parallel execution.

Each partition represents a unit of work executed in a separate container/task.

partition_id

Unique identifier for this partition

files

File paths or URLs to process in this partition

execution_function

Name of the ExecutionFunction to run

metadata

Additional metadata (e.g., num_files, size)

Parameters:
execution_function: str
files: list[str]
metadata: dict[str, str | int | float]
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

partition_id: int
class ogdc_runner.models.OgdcBaseModel(**data: Any) None

Bases: BaseModel

Base pydantic model for the ogdc-runner.

Parameters:

data (Any)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ogdc_runner.models.ParallelConfig(**data: Any) None

Bases: OgdcBaseModel

Configuration for parallel execution behavior.

enabled

Whether parallel execution is enabled

partition_strategy

Strategy for dividing work (“files” or “file_chunks”)

partition_size

Number of files per partition; None means use the orchestrator default (typically 1 000)

max_parallelism

Maximum number of concurrent Argo pods across all parallel stages; None means no cap beyond the cluster default

Parameters:
  • data (Any)

  • enabled (bool)

  • partition_strategy (Literal['files'])

  • partition_size (int | None)

  • max_parallelism (int | None)

enabled: bool
max_parallelism: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod must_be_positive(v: int | None) int | None
Parameters:

v (int | None)

Return type:

int | None

partition_size: int | None
partition_strategy: Literal['files']
class ogdc_runner.models.RecipeConfig(**data: Any) None

Bases: RecipeMeta

Model for a recipe’s configuration.

This includes the data in meta.yaml, plus some internal metadata/config that is generated dynamically at runtime (e.g., recipe_directory).

Parameters:
property id: str
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

recipe_directory: Path
class ogdc_runner.models.RecipeImage(**data: Any) None

Bases: OgdcBaseModel

Image configuration for the recipe.

Supports both local and hosted Docker images.

Parameters:
property full_image_path: str

Return the full image path including tag.

image: str
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

tag: str
class ogdc_runner.models.RecipeMeta(**data: Any) None

Bases: OgdcBaseModel

Model for a recipe’s metadata (meta.yaml).

Parameters:
input: RecipeInput
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
output: DataOneRecipeOutput | TemporaryRecipeOutput | PvcRecipeOutput
workflow: ShellWorkflow | VizWorkflow

Submodules