Skip to content

Commit a9182eb

Browse files
committed
Fix workflow init metadata handling
1 parent 7ab441b commit a9182eb

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

planemo/commands/cmd_workflow_job_init.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ def _build_commented_yaml(job, metadata):
6060
if collection_type:
6161
comment_parts.append(f"collection_type: {collection_type}")
6262
if input_format:
63+
if isinstance(input_format, list):
64+
input_format = ", ".join(input_format)
6365
comment_parts.append(f"format: {input_format}")
6466
if input_doc:
6567
comment_parts.append(f"doc: {input_doc}")

planemo/galaxy/workflows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def job_template(workflow_path, **kwds):
685685
}
686686
],
687687
}
688-
elif input_type in ["string", "int", "float", "boolean", "color"]:
688+
elif input_type in ["string", "int", "integer", "float", "boolean", "color"]:
689689
template[i_label] = "todo_param_value"
690690
else:
691691
template[i_label] = {
@@ -785,7 +785,7 @@ def _build_template_and_metadata_from_inputs(
785785
"collection_type": coll_type,
786786
"elements": _collection_elements_for_type(coll_type),
787787
}
788-
elif input_type in ["string", "int", "float", "boolean", "color"]:
788+
elif input_type in ["string", "int", "integer", "float", "boolean", "color"]:
789789
# Use default value if available, otherwise use placeholder or false for booleans
790790
if has_default:
791791
template[i_label] = default_value

tests/data/wf14-unlinted-best-practices.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class: GalaxyWorkflow
22
label: bp (imported from uploaded file)
33
uuid: 66708ffe-c08c-4647-a7e9-fc7f731206a1
44
inputs:
5-
null:
5+
input1:
66
optional: false
77
position:
88
bottom: 730.3166656494141

0 commit comments

Comments
 (0)