ogdc_runner.models.recipe_config module¶
- class ogdc_runner.models.recipe_config.DataOneInput(**data: Any) None¶
Bases:
InputParamDataOne input parameters.
- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- resolve_dataone_inputs() DataOneInput¶
Resolve DataONE dataset identifiers to data object URLs.
- Return type:
- class ogdc_runner.models.recipe_config.DataOneRecipeOutput(**data: Any) None¶
Bases:
RecipeOutputDataONE output configuration.
Recipe outputs will be published to a DataONE dataset.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.InputParam(**data: Any) None¶
Bases:
OgdcBaseModelInput parameter for a recipe.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.ParallelConfig(**data: Any) None¶
Bases:
OgdcBaseModelConfiguration 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:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.PvcRecipeOutput(**data: Any) None¶
Bases:
RecipeOutputPVC output configuration.
Recipe outputs will be stored on a specified PVC in kubernetes.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.RecipeConfig(**data: Any) None¶
Bases:
RecipeMetaModel 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:
data (
Any)name (str)
workflow (ShellWorkflow | VizWorkflow)
input (RecipeInput)
output (DataOneRecipeOutput | TemporaryRecipeOutput | PvcRecipeOutput)
recipe_directory (Path)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.RecipeImage(**data: Any) None¶
Bases:
OgdcBaseModelImage configuration for the recipe.
Supports both local and hosted Docker images.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.RecipeInput(**data: Any) None¶
Bases:
OgdcBaseModel- Parameters:
data (
Any)params (list[DataOneInput | UrlInput])
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- params: list[DataOneInput | UrlInput]¶
- classmethod validate_params(params: list[DataOneInput | UrlInput]) list[DataOneInput | UrlInput]¶
Ensure there’s at least one input parameter.
- Parameters:
params (
list[DataOneInput|UrlInput])- Return type:
- class ogdc_runner.models.recipe_config.RecipeMeta(**data: Any) None¶
Bases:
OgdcBaseModelModel for a recipe’s metadata (meta.yaml).
- Parameters:
data (
Any)name (str)
workflow (ShellWorkflow | VizWorkflow)
input (RecipeInput)
output (DataOneRecipeOutput | TemporaryRecipeOutput | PvcRecipeOutput)
- input: RecipeInput¶
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- output: DataOneRecipeOutput | TemporaryRecipeOutput | PvcRecipeOutput¶
- workflow: ShellWorkflow | VizWorkflow¶
- class ogdc_runner.models.recipe_config.RecipeOutput(**data: Any) None¶
Bases:
OgdcBaseModelBase model for recipe output configuration.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.ShellWorkflow(**data: Any) None¶
Bases:
WorkflowModel representing the shell workflow configuration.
Requires that the recipe_directory context be set when instantiating the class. E.g.,:
- workflow = ShellWorkflow.model_validate(
{“sh_file”: “recipe.sh”}, context={“recipe_directory”: Path(“/path/to/recipe_directory”)},
),
- Parameters:
data (
Any)type (Literal['shell'])
parallel (ParallelConfig)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parallel: ParallelConfig¶
- sh_file_path(info: ValidationInfo) Self¶
Model-level validator that constructs a full path to sh_file.
- Parameters:
info (
ValidationInfo)- Return type:
Self
- class ogdc_runner.models.recipe_config.TemporaryRecipeOutput(**data: Any) None¶
Bases:
RecipeOutputTemporary output configuration.
Recipe outputs will be stored temporarily in a user-accessible location.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ogdc_runner.models.recipe_config.UrlInput(**data: Any) None¶
Bases:
InputParamInpurt from URL.
When instantiated with context={“check_urls”: True}, URL-type parameters will be validated to ensure they are accessible via HTTP HEAD request.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- validate_url_accessible(info: ValidationInfo) Self¶
Validate that URL-type parameters are accessible.
- Parameters:
info (
ValidationInfo)- Return type:
Self
- class ogdc_runner.models.recipe_config.VizWorkflow(**data: Any) None¶
Bases:
WorkflowModel representing the visualization workflow configuration.
Requires that the recipe_directory context be set when instantiating the class. E.g.,:
- workflow = VizWorkflow.model_validate(
{“config_file”: “config.json”}, context={“recipe_directory”: Path(“/path/to/recipe_directory”)},
),
- Parameters:
data (
Any)type (Literal['visualization'])
parallel (ParallelConfig)
- config_file_path(info: ValidationInfo) Self¶
Model-level validator that constructs a full path to sh_file.
- Parameters:
info (
ValidationInfo)- Return type:
Self
- get_config_file_json() str¶
Get the viz workflow config as json.
If passed a JSON file, read the file content and return. Otherwise, an empty configuration will be returned (“{}”).
This configuration is used by the pdgworkflow for visualization workflows. When an empty config ({}) is returned, WorkflowManager will use its default behavior.
For documentation on available configuration options, see: - ConfigManager documentation: https://github.com/PermafrostDiscoveryGateway/viz-workflow/blob/feature-wf-k8s/pdgworkflow/ConfigManager.py - Example config: https://github.com/QGreenland-Net/ogdc-recipes/blob/main/recipes/viz-workflow/config.json
- Return type:
- Returns:
The content of the config.json file as a string, or empty JSON if file doesn’t exist. An empty config ({}) will cause ConfigManager to use default behavior.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parallel: ParallelConfig¶
- class ogdc_runner.models.recipe_config.Workflow(**data: Any) None¶
Bases:
OgdcBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].