Skip to content

Commit

Permalink
Remove some model objects added in galaxyproject#5013 but unused befo…
Browse files Browse the repository at this point in the history
…re the PR was

merged. Also, fix the typo:

  WorkflowRequestInputStepParmeter -> WorkflowRequestInputStepParameter

Both found by @nsoranzo in galaxyproject#6757.
  • Loading branch information
natefoo committed Oct 9, 2018
1 parent f317be2 commit c0961ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
29 changes: 2 additions & 27 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4440,7 +4440,7 @@ def add_input(self, content, step_id):
request_to_content.workflow_step_id = step_id
self.input_dataset_collections.append(request_to_content)
else:
request_to_content = WorkflowRequestInputStepParmeter()
request_to_content = WorkflowRequestInputStepParameter()
request_to_content.parameter_value = content
request_to_content.workflow_step_id = step_id
self.input_step_parameters.append(request_to_content)
Expand Down Expand Up @@ -4548,20 +4548,6 @@ def to_dict(self, view='collection', value_mapper=None):
return rval


class WorkflowInvocationStepJobAssociation(Dictifiable):
dict_collection_visible_keys = ('id', 'job_id', 'workflow_invocation_step_id')
dict_element_visible_keys = ('id', 'job_id', 'workflow_invocation_step_id')


class WorkflowRequest(Dictifiable):
dict_collection_visible_keys = ['id', 'name', 'type', 'state', 'history_id', 'workflow_id']
dict_element_visible_keys = ['id', 'name', 'type', 'state', 'history_id', 'workflow_id']

def to_dict(self, view='collection', value_mapper=None):
rval = super(WorkflowRequest, self).to_dict(view=view, value_mapper=value_mapper)
return rval


class WorkflowRequestInputParameter(Dictifiable):
""" Workflow-related parameters not tied to steps or inputs.
"""
Expand Down Expand Up @@ -4603,7 +4589,7 @@ class WorkflowRequestToInputDatasetCollectionAssociation(Dictifiable):
dict_collection_visible_keys = ['id', 'workflow_invocation_id', 'workflow_step_id', 'dataset_collection_id', 'name']


class WorkflowRequestInputStepParmeter(Dictifiable):
class WorkflowRequestInputStepParameter(Dictifiable):
""" Workflow step parameter inputs.
"""
dict_collection_visible_keys = ['id', 'workflow_invocation_id', 'workflow_step_id', 'parameter_value']
Expand Down Expand Up @@ -5202,17 +5188,6 @@ def __init__(self, id=None, user=None, tool_id=None, tag_id=None, user_tname=Non
self.user_value = None


class WorkRequestTagAssociation(ItemTagAssociation):
def __init__(self, id=None, user=None, workflow_request_id=None, tag_id=None, user_tname=None, value=None):
self.id = id
self.user = user
self.workflow_request_id = workflow_request_id
self.tag_id = tag_id
self.user_tname = user_tname
self.value = None
self.user_value = None


# Item annotation classes.
class HistoryAnnotationAssociation(object):
pass
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/model/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@
Column("value", TEXT),
Column("type", Unicode(255)))

model.WorkflowRequestInputStepParmeter.table = Table(
model.WorkflowRequestInputStepParameter.table = Table(
"workflow_request_input_step_parameter", metadata,
Column("id", Integer, primary_key=True),
Column("workflow_invocation_id", Integer, ForeignKey("workflow_invocation.id"), index=True),
Expand Down Expand Up @@ -2294,7 +2294,7 @@ def simple_mapping(model, **kwds):
history=relation(model.History, backref=backref('workflow_invocations', uselist=True)),
input_parameters=relation(model.WorkflowRequestInputParameter),
step_states=relation(model.WorkflowRequestStepState),
input_step_parameters=relation(model.WorkflowRequestInputStepParmeter),
input_step_parameters=relation(model.WorkflowRequestInputStepParameter),
input_datasets=relation(model.WorkflowRequestToInputDatasetAssociation),
input_dataset_collections=relation(model.WorkflowRequestToInputDatasetCollectionAssociation),
subworkflow_invocations=relation(model.WorkflowInvocationToSubworkflowInvocationAssociation,
Expand Down Expand Up @@ -2329,7 +2329,7 @@ def simple_mapping(model, **kwds):
workflow_invocation=relation(model.WorkflowInvocation),
workflow_step=relation(model.WorkflowStep))

simple_mapping(model.WorkflowRequestInputStepParmeter,
simple_mapping(model.WorkflowRequestInputStepParameter,
workflow_invocation=relation(model.WorkflowInvocation),
workflow_step=relation(model.WorkflowStep))

Expand Down
3 changes: 0 additions & 3 deletions lib/galaxy/tools/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,6 @@ def record_success(self, execution_slice, job, outputs):

def new_collection_execution_slices(self):
for job_index, (param_combination, dataset_collection_elements) in enumerate(six.moves.zip(self.param_combinations, self.walk_implicit_collections())):
# Two options here - check if the element has been populated or check if the
# a WorkflowInvocationStepJobAssociation exists. Not sure which is better but
# for now I have the first so lets check.
found_result = False
for dataset_collection_element in dataset_collection_elements.values():
if dataset_collection_element.element_object is not None:
Expand Down

0 comments on commit c0961ec

Please sign in to comment.