flowrep.nodes.helper_models module

class flowrep.nodes.helper_models.ConditionalCase(**data: Any)[source]

Bases: BaseModel

body: LabeledRecipe
condition: LabeledRecipe
condition_output: base_models.Label | None
model_config: ClassVar[ConfigDict] = {}

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

validate_condition_is_accessible()[source]
validate_distinct_labels()[source]
class flowrep.nodes.helper_models.ExceptionCase(**data: Any)[source]

Bases: BaseModel

An exception/node pair.

exceptions

The version info for exception types against which to except.

Type:

list[pyiron_snippets.versions.VersionInfo]

body

The node to couple to these exceptions.

Type:

flowrep.nodes.helper_models.LabeledRecipe

Note

In a try-except case, we expect the exception target to always be a type – and more idiomatically a subclass of python’s builtin BaseException. Here, we don’t explicitly validate that. Using pyiron_snippets.versions.VersionInfo allows us to ensure that recipes are able to fully specify where exceptions can be found, should a non-builtin exception be used.

body: LabeledRecipe
exceptions: list[versions.VersionInfo]
model_config: ClassVar[ConfigDict] = {}

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

classmethod validate_exceptions_not_empty(v)[source]
class flowrep.nodes.helper_models.LabeledRecipe(*, label: Annotated[str, BeforeValidator(func=_validate_label, json_schema_input_type=PydanticUndefined)], node: AtomicRecipe | ForEachRecipe | IfRecipe | TryRecipe | WhileRecipe | WorkflowRecipe)[source]

Bases: BaseModel

label: base_models.Label
model_config: ClassVar[ConfigDict] = {}

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

node: RecipeDiscrimination