Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.workflow.refactor package

Submodules

galaxy.workflow.refactor.execute module

class galaxy.workflow.refactor.execute.WorkflowRefactorExecutor(raw_workflow_description, workflow, module_injector)[source]

Bases: object

__init__(raw_workflow_description, workflow, module_injector)[source]
refactor(refactor_request: RefactorActions)[source]
static normalize_input_connections_to_list(all_input_connections, input_name, add_if_missing=False)[source]

galaxy.workflow.refactor.schema module

class galaxy.workflow.refactor.schema.StepReferenceByOrderIndex(*, order_index: int)[source]

Bases: BaseModel

order_index: int
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.StepReferenceByLabel(*, label: str)[source]

Bases: BaseModel

label: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.InputReferenceByOrderIndex(*, order_index: int, input_name: str)[source]

Bases: StepReferenceByOrderIndex

input_name: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.InputReferenceByLabel(*, label: str, input_name: str)[source]

Bases: StepReferenceByLabel

input_name: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.OutputReferenceByOrderIndex(*, order_index: int, output_name: str | None = 'output')[source]

Bases: StepReferenceByOrderIndex

output_name: str | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.OutputReferenceByLabel(*, label: str, output_name: str | None = 'output')[source]

Bases: StepReferenceByLabel

output_name: str | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.Position(*, left: float, top: float)[source]

Bases: BaseModel

left: float
top: float
to_dict()[source]
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.BaseAction[source]

Bases: BaseModel

Refactoring actions.

model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.Action(*, action_type: str)[source]

Bases: BaseAction

action_type: str
classmethod return_action(values)[source]
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateStepLabelAction(*, action_type: typing_extensions.Literal[update_step_label], label: str, step: StepReferenceByOrderIndex | StepReferenceByLabel)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_step_label]
label: str
step: StepReferenceByOrderIndex | StepReferenceByLabel
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateStepPositionAction(*, action_type: typing_extensions.Literal[update_step_position], step: StepReferenceByOrderIndex | StepReferenceByLabel, position_shift: Position)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_step_position]
step: StepReferenceByOrderIndex | StepReferenceByLabel
position_shift: Position
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.AddStepAction(*, action_type: typing_extensions.Literal[add_step], type: str, tool_state: Dict[str, Any] | None = None, label: str | None = None, position: Position | None = None)[source]

Bases: BaseAction

Add a new action to the workflow.

After the workflow is updated, an order_index will be assigned and this step may cause other steps to have their output_index adjusted.

action_type: typing_extensions.Literal[add_step]
type: str
tool_state: Dict[str, Any] | None
label: str | None
position: Position | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.ConnectAction(*, action_type: typing_extensions.Literal[connect], input: InputReferenceByOrderIndex | InputReferenceByLabel, output: OutputReferenceByOrderIndex | OutputReferenceByLabel)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[connect]
input: InputReferenceByOrderIndex | InputReferenceByLabel
output: OutputReferenceByOrderIndex | OutputReferenceByLabel
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.DisconnectAction(*, action_type: typing_extensions.Literal[disconnect], input: InputReferenceByOrderIndex | InputReferenceByLabel, output: OutputReferenceByOrderIndex | OutputReferenceByLabel)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[disconnect]
input: InputReferenceByOrderIndex | InputReferenceByLabel
output: OutputReferenceByOrderIndex | OutputReferenceByLabel
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.AddInputAction(*, action_type: typing_extensions.Literal[add_input], type: str, label: str | None = None, position: Position | None = None, collection_type: str | None = None, restrictions: List[str] | None = None, restrict_on_connections: bool | None = None, suggestions: List[str] | None = None, optional: bool | None = False, default: Any | None = None)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[add_input]
type: str
label: str | None
position: Position | None
collection_type: str | None
restrictions: List[str] | None
restrict_on_connections: bool | None
suggestions: List[str] | None
optional: bool | None
default: Any | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.ExtractInputAction(*, action_type: typing_extensions.Literal[extract_input], input: InputReferenceByOrderIndex | InputReferenceByLabel, label: str | None = None, position: Position | None = None)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[extract_input]
input: InputReferenceByOrderIndex | InputReferenceByLabel
label: str | None
position: Position | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.ExtractUntypedParameter(*, action_type: typing_extensions.Literal[extract_untyped_parameter], name: str, label: str | None = None, position: Position | None = None)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[extract_untyped_parameter]
name: str
label: str | None
position: Position | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.RemoveUnlabeledWorkflowOutputs(*, action_type: typing_extensions.Literal[remove_unlabeled_workflow_outputs])[source]

Bases: BaseAction

action_type: typing_extensions.Literal[remove_unlabeled_workflow_outputs]
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateNameAction(*, action_type: typing_extensions.Literal[update_name], name: str)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_name]
name: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateAnnotationAction(*, action_type: typing_extensions.Literal[update_annotation], annotation: str)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_annotation]
annotation: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateLicenseAction(*, action_type: typing_extensions.Literal[update_license], license: str)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_license]
license: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateCreatorAction(*, action_type: typing_extensions.Literal[update_creator], creator: Any = None)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_creator]
creator: Any
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.Report(*, markdown: str)[source]

Bases: BaseModel

markdown: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateReportAction(*, action_type: typing_extensions.Literal[update_report], report: Report)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_report]
report: Report
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpdateOutputLabelAction(*, action_type: typing_extensions.Literal[update_output_label], output: OutputReferenceByOrderIndex | OutputReferenceByLabel, output_label: str)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[update_output_label]
output: OutputReferenceByOrderIndex | OutputReferenceByLabel
output_label: str
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.FillStepDefaultsAction(*, action_type: typing_extensions.Literal[fill_step_defaults], step: StepReferenceByOrderIndex | StepReferenceByLabel)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[fill_step_defaults]
step: StepReferenceByOrderIndex | StepReferenceByLabel
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.FileDefaultsAction(*, action_type: typing_extensions.Literal[fill_defaults])[source]

Bases: BaseAction

action_type: typing_extensions.Literal[fill_defaults]
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpgradeSubworkflowAction(*, action_type: typing_extensions.Literal[upgrade_subworkflow], step: StepReferenceByOrderIndex | StepReferenceByLabel, content_id: str | None = None)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[upgrade_subworkflow]
step: StepReferenceByOrderIndex | StepReferenceByLabel
content_id: str | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpgradeToolAction(*, action_type: typing_extensions.Literal[upgrade_tool], step: StepReferenceByOrderIndex | StepReferenceByLabel, tool_version: str | None = None)[source]

Bases: BaseAction

action_type: typing_extensions.Literal[upgrade_tool]
step: StepReferenceByOrderIndex | StepReferenceByLabel
tool_version: str | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.UpgradeAllStepsAction(*, action_type: typing_extensions.Literal[upgrade_all_steps])[source]

Bases: BaseAction

action_type: typing_extensions.Literal[upgrade_all_steps]
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.RefactorActions(*, actions: List[AddInputAction | galaxy.workflow.refactor.schema.AddStepAction | galaxy.workflow.refactor.schema.ConnectAction | galaxy.workflow.refactor.schema.DisconnectAction | galaxy.workflow.refactor.schema.ExtractInputAction | galaxy.workflow.refactor.schema.ExtractUntypedParameter | galaxy.workflow.refactor.schema.FileDefaultsAction | galaxy.workflow.refactor.schema.FillStepDefaultsAction | galaxy.workflow.refactor.schema.UpdateAnnotationAction | galaxy.workflow.refactor.schema.UpdateCreatorAction | galaxy.workflow.refactor.schema.UpdateNameAction | galaxy.workflow.refactor.schema.UpdateLicenseAction | galaxy.workflow.refactor.schema.UpdateOutputLabelAction | galaxy.workflow.refactor.schema.UpdateReportAction | galaxy.workflow.refactor.schema.UpdateStepLabelAction | galaxy.workflow.refactor.schema.UpdateStepPositionAction | galaxy.workflow.refactor.schema.UpgradeSubworkflowAction | galaxy.workflow.refactor.schema.UpgradeToolAction | galaxy.workflow.refactor.schema.UpgradeAllStepsAction | galaxy.workflow.refactor.schema.RemoveUnlabeledWorkflowOutputs[AddInputAction | AddStepAction | ConnectAction | DisconnectAction | ExtractInputAction | ExtractUntypedParameter | FileDefaultsAction | FillStepDefaultsAction | UpdateAnnotationAction | UpdateCreatorAction | UpdateNameAction | UpdateLicenseAction | UpdateOutputLabelAction | UpdateReportAction | UpdateStepLabelAction | UpdateStepPositionAction | UpgradeSubworkflowAction | UpgradeToolAction | UpgradeAllStepsAction | RemoveUnlabeledWorkflowOutputs]], dry_run: bool = False)[source]

Bases: BaseModel

actions: List[AddInputAction | galaxy.workflow.refactor.schema.AddStepAction | galaxy.workflow.refactor.schema.ConnectAction | galaxy.workflow.refactor.schema.DisconnectAction | galaxy.workflow.refactor.schema.ExtractInputAction | galaxy.workflow.refactor.schema.ExtractUntypedParameter | galaxy.workflow.refactor.schema.FileDefaultsAction | galaxy.workflow.refactor.schema.FillStepDefaultsAction | galaxy.workflow.refactor.schema.UpdateAnnotationAction | galaxy.workflow.refactor.schema.UpdateCreatorAction | galaxy.workflow.refactor.schema.UpdateNameAction | galaxy.workflow.refactor.schema.UpdateLicenseAction | galaxy.workflow.refactor.schema.UpdateOutputLabelAction | galaxy.workflow.refactor.schema.UpdateReportAction | galaxy.workflow.refactor.schema.UpdateStepLabelAction | galaxy.workflow.refactor.schema.UpdateStepPositionAction | galaxy.workflow.refactor.schema.UpgradeSubworkflowAction | galaxy.workflow.refactor.schema.UpgradeToolAction | galaxy.workflow.refactor.schema.UpgradeAllStepsAction | galaxy.workflow.refactor.schema.RemoveUnlabeledWorkflowOutputs[AddInputAction | AddStepAction | ConnectAction | DisconnectAction | ExtractInputAction | ExtractUntypedParameter | FileDefaultsAction | FillStepDefaultsAction | UpdateAnnotationAction | UpdateCreatorAction | UpdateNameAction | UpdateLicenseAction | UpdateOutputLabelAction | UpdateReportAction | UpdateStepLabelAction | UpdateStepPositionAction | UpgradeSubworkflowAction | UpgradeToolAction | UpgradeAllStepsAction | RemoveUnlabeledWorkflowOutputs]]
dry_run: bool
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.RefactorActionExecutionMessageTypeEnum(value)[source]

Bases: str, Enum

An enumeration.

tool_version_change = 'tool_version_change'
tool_state_adjustment = 'tool_state_adjustment'
connection_drop_forced = 'connection_drop_forced'
workflow_output_drop_forced = 'workflow_output_drop_forced'
class galaxy.workflow.refactor.schema.RefactorActionExecutionMessage(*, message: str, message_type: RefactorActionExecutionMessageTypeEnum, step_label: str | None = None, order_index: int | None = None, input_name: str | None = None, output_name: str | None = None, from_step_label: str | None = None, from_order_index: int | None = None, output_label: str | None = None)[source]

Bases: BaseModel

message: str
message_type: RefactorActionExecutionMessageTypeEnum
step_label: str | None
order_index: int | None
input_name: str | None
output_name: str | None
from_step_label: str | None
from_order_index: int | None
output_label: str | None
model_config: ClassVar[ConfigDict] = {}

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

class galaxy.workflow.refactor.schema.RefactorActionExecution(*, action: AddInputAction | AddStepAction | ConnectAction | DisconnectAction | ExtractInputAction | ExtractUntypedParameter | FileDefaultsAction | FillStepDefaultsAction | UpdateAnnotationAction | UpdateCreatorAction | UpdateNameAction | UpdateLicenseAction | UpdateOutputLabelAction | UpdateReportAction | UpdateStepLabelAction | UpdateStepPositionAction | UpgradeSubworkflowAction | UpgradeToolAction | UpgradeAllStepsAction | RemoveUnlabeledWorkflowOutputs, messages: List[RefactorActionExecutionMessage])[source]

Bases: BaseModel

action: AddInputAction | AddStepAction | ConnectAction | DisconnectAction | ExtractInputAction | ExtractUntypedParameter | FileDefaultsAction | FillStepDefaultsAction | UpdateAnnotationAction | UpdateCreatorAction | UpdateNameAction | UpdateLicenseAction | UpdateOutputLabelAction | UpdateReportAction | UpdateStepLabelAction | UpdateStepPositionAction | UpgradeSubworkflowAction | UpgradeToolAction | UpgradeAllStepsAction | RemoveUnlabeledWorkflowOutputs
messages: List[RefactorActionExecutionMessage]
model_config: ClassVar[ConfigDict] = {}

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

galaxy.workflow.refactor.schema.action_class

alias of RemoveUnlabeledWorkflowOutputs