Workflow Step Serialization

ParsedStep -> YAML dict translation for workflow steps. Each step type has a serializer that turns its api_kwargs (carried on a ParsedStep) back into the dict shape expected in a workflow YAML file.

Also exposes workflow_config_to_dict(), the workflow-level entry point that serializes a full WorkflowConfig.

vivarium.cluster_tools.dagger.config.serialization.serialize_bash_step_to_yaml(step)[source]

Serialize a bash-step ParsedStep to a YAML-ready dict.

Return type:

dict[str, Any]

Parameters:

step (ParsedStep)

vivarium.cluster_tools.dagger.config.serialization.serialize_simulation_step_to_yaml(step)[source]

Serialize a simulation-step ParsedStep to a YAML-ready dict.

Return type:

dict[str, Any]

Parameters:

step (ParsedStep)

vivarium.cluster_tools.dagger.config.serialization.serialize_pytest_step_to_yaml(step)[source]

Serialize a pytest-step ParsedStep to a YAML-ready dict.

Return type:

dict[str, Any]

Parameters:

step (ParsedStep)

vivarium.cluster_tools.dagger.config.serialization.serialize_python_step_to_yaml(step)[source]

Serialize a python-step ParsedStep to a YAML-ready dict.

Return type:

dict[str, Any]

Parameters:

step (ParsedStep)

vivarium.cluster_tools.dagger.config.serialization.serialize_notebook_step_to_yaml(step)[source]

Serialize a notebook-step ParsedStep to a YAML-ready dict.

Return type:

dict[str, Any]

Parameters:

step (ParsedStep)

vivarium.cluster_tools.dagger.config.serialization.STEP_TYPE_YAML_SERIALIZERS: dict[str, Callable[[ParsedStep], dict[str, Any]]] = {'bash': <function serialize_bash_step_to_yaml>, 'notebook': <function serialize_notebook_step_to_yaml>, 'pytest': <function serialize_pytest_step_to_yaml>, 'python': <function serialize_python_step_to_yaml>, 'simulation': <function serialize_simulation_step_to_yaml>}

Maps each YAML step_type to its ParsedStep -> YAML dict serializer.

vivarium.cluster_tools.dagger.config.serialization.workflow_config_to_dict(config)[source]

Serialize a WorkflowConfig to a dict suitable for YAML output.

Return type:

dict[str, Any]

Parameters:

config (WorkflowConfig)