flowrep.nodes.workflow_recipe module
- class flowrep.nodes.workflow_recipe.WorkflowRecipe(*, type: Literal[RecipeElementType.WORKFLOW] = RecipeElementType.WORKFLOW, inputs: Annotated[list[Annotated[str, BeforeValidator(func=_validate_label, json_schema_input_type=PydanticUndefined)]], AfterValidator(func=validate_unique)], outputs: Annotated[list[Annotated[str, BeforeValidator(func=_validate_label, json_schema_input_type=PydanticUndefined)]], AfterValidator(func=validate_unique)], description: str | None = None, nodes: dict[Annotated[str, BeforeValidator(func=_validate_label, json_schema_input_type=PydanticUndefined)], Annotated[AtomicRecipe | ForEachRecipe | IfRecipe | TryRecipe | WhileRecipe | WorkflowRecipe, FieldInfo(annotation=NoneType, required=True, discriminator='type')]], input_edges: dict[TargetHandle, InputSource], edges: dict[TargetHandle, SourceHandle], output_edges: dict[OutputTarget, SourceHandle | InputSource], reference: PythonReference | None = None)[source]
Bases:
NodeRecipeHold and execute a subgraph of nodes. This is a completely static graph; everything is known about it at the class level, and its retrospective version looks identical to its prospective version (modulo actually having all the output data).
Intended recipe realization: - WfMS are expected to make the IO of nodes available retrospectively, regardless of
how deeply nested in subgraphs they are.
- type
The node type – always “workflow”.
- Type:
Literal[base_models.RecipeElementType.WORKFLOW]
- inputs
The available input port names.
- outputs
The available output port names.
- nodes
The nodes of the subgraph.
- Type:
Recipes
- input_edges
Edges from workflow inputs to inputs of subgraph nodes.
- Type:
edge_models.InputEdges
- edges
Edges between subgraph nodes.
- Type:
edge_models.Edges
- output_edges
Edges from subgraph nodes back to workflow outputs.
- Type:
edge_models.OutputEdges
- reference
Info about the underlying python function (if any).
- Type:
base_models.PythonReference | None
- Properties:
- fully_qualified_name: The fully-qualified name of function from which the
recipe was derived (if any).
- edges: edge_models.Edges
- property fully_qualified_name: str | None
- input_edges: edge_models.InputEdges
- property inputs_with_defaults: Annotated[list[Annotated[str, BeforeValidator(func=_validate_label, json_schema_input_type=PydanticUndefined)]], AfterValidator(func=validate_unique)]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- nodes: Recipes
- output_edges: edge_models.OutputEdges
- reference: base_models.PythonReference | None
- type: Literal[base_models.RecipeElementType.WORKFLOW]