Skip to content

Commit

Permalink
Typing for execution tracker.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Sep 2, 2024
1 parent 9f3ed27 commit b2acfa1
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions lib/galaxy/tools/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,14 @@ def __init__(


class ExecutionTracker:
def __init__(self, trans, tool, mapping_params, collection_info, completed_jobs=None):
def __init__(
self,
trans,
tool: "Tool",
mapping_params: MappingParameters,
collection_info: Optional[MatchingCollections],
completed_jobs: Optional[CompletedJobsT] = None,
):
# Known ahead of time...
self.trans = trans
self.tool = tool
Expand Down Expand Up @@ -574,7 +581,14 @@ def new_collection_execution_slices(self):
# Seperate these because workflows need to track their jobs belong to the invocation
# in the database immediately and they can be recovered.
class ToolExecutionTracker(ExecutionTracker):
def __init__(self, trans, tool, mapping_params, collection_info, completed_jobs=None):
def __init__(
self,
trans,
tool: "Tool",
mapping_params: MappingParameters,
collection_info: Optional[MatchingCollections],
completed_jobs: Optional[CompletedJobsT] = None,
):
super().__init__(trans, tool, mapping_params, collection_info, completed_jobs=completed_jobs)

# New to track these things for tool output API response in the tool case,
Expand Down Expand Up @@ -606,7 +620,15 @@ def new_collection_execution_slices(self):


class WorkflowStepExecutionTracker(ExecutionTracker):
def __init__(self, trans, tool, mapping_params, collection_info, invocation_step, completed_jobs=None):
def __init__(
self,
trans,
tool: "Tool",
mapping_params: MappingParameters,
collection_info: Optional[MatchingCollections],
invocation_step: model.WorkflowInvocationStep,
completed_jobs: Optional[CompletedJobsT] = None,
):
super().__init__(trans, tool, mapping_params, collection_info, completed_jobs=completed_jobs)
self.invocation_step = invocation_step

Expand Down

0 comments on commit b2acfa1

Please sign in to comment.