Skip to content

Commit

Permalink
Bug fix: workflow cannot be without inputs and outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-kotliar committed Jul 8, 2020
1 parent ebc49bc commit 4fce3c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cwl_airflow/utilities/cwl.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,6 @@ def slow_cwl_load(workflow, cwl_args=None, only_tool=None):
return workflow_data.tool if only_tool else workflow_data


# Never used except tests
def embed_all_runs(
workflow_tool,
cwl_args=None,
Expand Down Expand Up @@ -780,7 +779,6 @@ def __embed(workflow_tool, cwl_args=None):
return workflow_tool_copy


# Never used except tests
def convert_to_workflow(command_line_tool, location=None):
"""
Converts CommandLineTool to Workflow. Copies minimum number of fields.
Expand All @@ -789,19 +787,21 @@ def convert_to_workflow(command_line_tool, location=None):

workflow_tool = {
"class": "Workflow",
"cwlVersion": command_line_tool["cwlVersion"]
"cwlVersion": command_line_tool["cwlVersion"],
"inputs": [],
"outputs": []
}

for input_id, input_data in get_items(command_line_tool["inputs"]):
workflow_tool.setdefault("inputs", []).append(
workflow_tool["inputs"].append(
{
"id": input_id,
"type": remove_field_from_dict(input_data["type"], "inputBinding") # "type" in WorkflowInputParameter cannot have "inputBinding"
}
)

for output_id, output_data in get_items(command_line_tool["outputs"]):
workflow_tool.setdefault("outputs", []).append(
workflow_tool["outputs"].append(
{
"id": output_id,
"type": output_data["type"],
Expand Down

0 comments on commit 4fce3c3

Please sign in to comment.