Skip to content

Commit

Permalink
Add code to extract input_subdomain
Browse files Browse the repository at this point in the history
fix #17
add code to parse data_collection_input and data_input objects from the workflow invocation for the input_subdomaiRremove debugging text
  • Loading branch information
HadleyKing authored and nsoranzo committed Apr 21, 2020
1 parent 15fb84a commit bee1753
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions lib/galaxy/webapps/galaxy/api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,9 +1135,27 @@ def export_invocation_bco(self, trans, invocation_id, **kwd):
tools.append(software_prerequisite['uri']['uri'])
except Exception:
continue
# method to grab the workflow inputs? [WIP] TODO
if step.workflow_step.type != 'tool':
input_subdomain.append(step.workflow_step)

if step.workflow_step.type == 'data_input':
for output_assoc in step.output_datasets:
encoded_dataset_id = trans.security.encode_id(output_assoc.dataset.id)
input_obj = {
'filename': step.workflow_step.label,
'uri': url_for('history_content', history_id=encoded_history_id, id=encoded_dataset_id, qualified=True),
'access_time': step.workflow_step.update_time.isoformat(),
}
input_subdomain.append(input_obj)

if step.workflow_step.type == 'data_collection_input':
encoded_dataset_id = trans.security.encode_id(step.workflow_step.id)
input_obj = []
input_obj = {
'filename': step.workflow_step.label,
'uri': url_for('history_content', history_id=encoded_history_id, id=encoded_dataset_id, qualified=True),
'access_time': step.workflow_step.update_time.isoformat(),
}
input_subdomain.append(input_obj)

usability_domain = []
for a in stored_workflow.annotations:
usability_domain.append(a.annotation)
Expand All @@ -1163,7 +1181,7 @@ def export_invocation_bco(self, trans, invocation_id, **kwd):
}

galaxy_extension = [] # TODO
input_subdomain = [] # TODO
input_subdomain = input_subdomain # TODO

ret_dict = {
'bco_id': url_for('invocation_export_bco', invocation_id=invocation_id, qualified=True),
Expand Down

0 comments on commit bee1753

Please sign in to comment.