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]

Initialize self. See help(type(self)) for accurate signature.

refactor(refactor_request: galaxy.workflow.refactor.schema.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: pydantic.main.BaseModel

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

Bases: pydantic.main.BaseModel

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

Bases: galaxy.workflow.refactor.schema.StepReferenceByOrderIndex

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

Bases: galaxy.workflow.refactor.schema.StepReferenceByLabel

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

Bases: galaxy.workflow.refactor.schema.StepReferenceByOrderIndex

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

Bases: galaxy.workflow.refactor.schema.StepReferenceByLabel

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

Bases: pydantic.main.BaseModel

left: float
top: float
to_dict()[source]
class galaxy.workflow.refactor.schema.BaseAction[source]

Bases: pydantic.main.BaseModel

Refactoring actions.

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[update_step_label]
label: str
step: Union[galaxy.workflow.refactor.schema.StepReferenceByOrderIndex, galaxy.workflow.refactor.schema.StepReferenceByLabel]
class galaxy.workflow.refactor.schema.UpdateStepPositionAction(*, action_type: typing_extensions.Literal[update_step_position], step: Union[galaxy.workflow.refactor.schema.StepReferenceByOrderIndex, galaxy.workflow.refactor.schema.StepReferenceByLabel], position: galaxy.workflow.refactor.schema.Position)[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.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: Optional[Dict[str, Any]]
label: Optional[str]
position: Optional[galaxy.workflow.refactor.schema.Position]
class galaxy.workflow.refactor.schema.ConnectAction(*, action_type: typing_extensions.Literal[connect], input: Union[galaxy.workflow.refactor.schema.InputReferenceByOrderIndex, galaxy.workflow.refactor.schema.InputReferenceByLabel], output: Union[galaxy.workflow.refactor.schema.OutputReferenceByOrderIndex, galaxy.workflow.refactor.schema.OutputReferenceByLabel])[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[add_input]
type: str
label: Optional[str]
position: Optional[galaxy.workflow.refactor.schema.Position]
collection_type: Optional[str]
restrictions: Optional[List[str]]
restrict_on_connections: Optional[bool]
suggestions: Optional[List[str]]
optional: Optional[bool]
default: Optional[Any]
class galaxy.workflow.refactor.schema.ExtractInputAction(*, action_type: typing_extensions.Literal[extract_input], input: Union[galaxy.workflow.refactor.schema.InputReferenceByOrderIndex, galaxy.workflow.refactor.schema.InputReferenceByLabel], label: str = None, position: galaxy.workflow.refactor.schema.Position = None)[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[extract_input]
input: Union[galaxy.workflow.refactor.schema.InputReferenceByOrderIndex, galaxy.workflow.refactor.schema.InputReferenceByLabel]
label: Optional[str]
position: Optional[galaxy.workflow.refactor.schema.Position]
class galaxy.workflow.refactor.schema.ExtractUntypedParameter(*, action_type: typing_extensions.Literal[extract_untyped_parameter], name: str, label: str = None, position: galaxy.workflow.refactor.schema.Position = None)[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[extract_untyped_parameter]
name: str
label: Optional[str]
position: Optional[galaxy.workflow.refactor.schema.Position]
class galaxy.workflow.refactor.schema.RemoveUnlabeledWorkflowOutputs(*, action_type: typing_extensions.Literal[remove_unlabeled_workflow_outputs])[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[update_creator]
creator: Any
class galaxy.workflow.refactor.schema.Report(*, markdown: str)[source]

Bases: pydantic.main.BaseModel

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[update_output_label]
output: Union[galaxy.workflow.refactor.schema.OutputReferenceByOrderIndex, galaxy.workflow.refactor.schema.OutputReferenceByLabel]
output_label: str
class galaxy.workflow.refactor.schema.FillStepDefaultsAction(*, action_type: typing_extensions.Literal[fill_step_defaults], step: Union[galaxy.workflow.refactor.schema.StepReferenceByOrderIndex, galaxy.workflow.refactor.schema.StepReferenceByLabel])[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

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

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[upgrade_tool]
step: Union[galaxy.workflow.refactor.schema.StepReferenceByOrderIndex, galaxy.workflow.refactor.schema.StepReferenceByLabel]
tool_version: Optional[str]
class galaxy.workflow.refactor.schema.UpgradeAllStepsAction(*, action_type: typing_extensions.Literal[upgrade_all_steps])[source]

Bases: galaxy.workflow.refactor.schema.BaseAction

action_type: typing_extensions.Literal[upgrade_all_steps]
class galaxy.workflow.refactor.schema.RefactorActions(*, actions: List[galaxy.workflow.refactor.schema.Action], dry_run: bool = False)[source]

Bases: pydantic.main.BaseModel

actions: List[galaxy.workflow.refactor.schema.Action]
dry_run: bool
class galaxy.workflow.refactor.schema.RefactorActionExecutionMessageTypeEnum(value)[source]

Bases: str, enum.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: galaxy.workflow.refactor.schema.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)[source]

Bases: pydantic.main.BaseModel

message: str
message_type: galaxy.workflow.refactor.schema.RefactorActionExecutionMessageTypeEnum
step_label: Optional[str]
order_index: Optional[int]
input_name: Optional[str]
output_name: Optional[str]
from_step_label: Optional[str]
from_order_index: Optional[int]
output_label: Optional[str]
class galaxy.workflow.refactor.schema.RefactorActionExecution(*, action: galaxy.workflow.refactor.schema.Action, messages: List[galaxy.workflow.refactor.schema.RefactorActionExecutionMessage])[source]

Bases: pydantic.main.BaseModel

action: galaxy.workflow.refactor.schema.Action
messages: List[galaxy.workflow.refactor.schema.RefactorActionExecutionMessage]
galaxy.workflow.refactor.schema.action_class

alias of galaxy.workflow.refactor.schema.RemoveUnlabeledWorkflowOutputs