Skip to content

Commit

Permalink
Apply code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
heisner-tillman committed Jun 4, 2024
1 parent 545d6b7 commit 27f42d4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/galaxy/schema/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ class WorkflowDictStepsBase(Model):
title="When",
description="The when expression for the step.",
)
# We should eventually clean this up, `Dict[str, PostJobAction]]` is probably the better form.
post_job_actions: Optional[Union[List[PostJobAction], Dict[str, PostJobAction]]] = Field(
None,
title="Post Job Actions",
Expand All @@ -424,11 +425,13 @@ class WorkflowDictStepsBase(Model):
title="Tool Version",
description="The version of the tool associated with the step.",
)
# TODO: Formalize an error type
errors: Optional[Union[List[str], str, Dict[str, Any]]] = Field(
None,
title="Errors",
description="An message indicating possible errors in the step.",
)
# TODO: split step types and make required for tool steps
tool_id: Optional[str] = Field( # Duplicate of `content_id` or viceversa?
None,
title="Tool ID",
Expand All @@ -439,6 +442,7 @@ class WorkflowDictStepsBase(Model):
title="Position",
description="Layout position of this step in the graph",
)
# TODO: model outputs
outputs: Optional[List[Dict[str, Any]]] = Field(
None,
title="Outputs",
Expand Down Expand Up @@ -520,11 +524,11 @@ class WorkflowDictRunStep(WorkflowDictStepsBase):


class WorkflowDictRunToolStep(WorkflowDictRunStep):
# TODO: remove everything that can be gotten through the tool store
model_class: Literal["tool"] = Field(
...,
title="Model Class",
description="The model class of the tool step.",
# description="The model class of the step, given it is a tool.",
)
id: str = Field(
...,
Expand Down Expand Up @@ -921,7 +925,7 @@ class WorkflowDictExportSummary(WorkflowDictBaseModel):
description="The version of the workflow format being used.",
)
annotation: WorkflowAnnotationField
tags: Union[TagCollection, Literal[""]] = Field(
tags: TagCollection = Field(
...,
title="Tags",
description="The tags associated with the workflow.",
Expand All @@ -931,7 +935,8 @@ class WorkflowDictExportSummary(WorkflowDictBaseModel):
title="UUID",
description="The UUID (Universally Unique Identifier) of the workflow.",
)
comments: List[Dict[str, Any]] = Field(
comments: List[WorkflowCommentModel] = Field(
# comments: List[Dict[str, Any]] = Field(
...,
title="Comments",
description="Comments associated with the workflow.",
Expand Down

0 comments on commit 27f42d4

Please sign in to comment.