Skip to content

Commit

Permalink
Allow CWL-style id map for workflow inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Oct 9, 2018
1 parent 915c1a9 commit a8843ec
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 82 deletions.
111 changes: 52 additions & 59 deletions test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
NESTED_WORKFLOW_AUTO_LABELS = """
class: GalaxyWorkflow
inputs:
- id: outer_input
outer_input: data
outputs:
outer_output:
outputSource: second_cat/out_file1
Expand Down Expand Up @@ -1016,11 +1016,10 @@ def test_workflow_run_zip_collections(self):
with self.dataset_populator.test_history() as history_id:
workflow_id = self._upload_yaml_workflow("""
class: GalaxyWorkflow
inputs:
test_input_1: data
test_input_2: data
steps:
- label: test_input_1
type: input
- label: test_input_2
type: input
- label: first_cat
tool_id: cat1
state:
Expand Down Expand Up @@ -1088,8 +1087,8 @@ def test_filter_failed_mapping(self):
summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- type: collection
label: input_c
input_c: collection
steps:
- label: mixed_collection
tool_id: exit_code_from_file
Expand Down Expand Up @@ -1144,7 +1143,7 @@ def test_workflow_output_dataset(self):
summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
outputs:
wf_output_1:
outputSource: first_cat/out_file1
Expand All @@ -1171,7 +1170,7 @@ def test_workflow_output_dataset_collection(self):
summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1:
type: data_collection_input
collection_type: list
outputs:
Expand Down Expand Up @@ -1213,7 +1212,7 @@ def test_workflow_input_mapping(self):
summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
outputs:
wf_output_1:
outputSource: first_cat/out_file1
Expand Down Expand Up @@ -1255,7 +1254,7 @@ def test_workflow_run_input_mapping_with_output_collections(self):
summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: text_input
text_input: data
outputs:
wf_output_1:
outputSource: split_up/paired_output
Expand Down Expand Up @@ -1337,7 +1336,7 @@ def test_subworkflow_recover_mapping_1(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: outer_input
outer_input: data
outputs:
outer_output:
outputSource: second_cat/out_file1
Expand All @@ -1349,7 +1348,7 @@ def test_subworkflow_recover_mapping_1(self):
- run:
class: GalaxyWorkflow
inputs:
- id: inner_input
inner_input: data
outputs:
workflow_output:
outputSource: random_lines/out_file1
Expand Down Expand Up @@ -1395,7 +1394,7 @@ def test_subworkflow_recover_mapping_2(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: outer_input
outer_input: data
outputs:
outer_output:
outputSource: second_cat/out_file1
Expand All @@ -1407,7 +1406,7 @@ def test_subworkflow_recover_mapping_2(self):
- run:
class: GalaxyWorkflow
inputs:
- id: inner_input
inner_input: data
outputs:
workflow_output:
outputSource: inner_cat/out_file1
Expand Down Expand Up @@ -1452,7 +1451,7 @@ def test_recover_mapping_in_subworkflow(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: outer_input
outer_input: data
outputs:
outer_output:
outputSource: second_cat/out_file1
Expand All @@ -1464,7 +1463,7 @@ def test_recover_mapping_in_subworkflow(self):
- run:
class: GalaxyWorkflow
inputs:
- id: inner_input
inner_input: data
outputs:
workflow_output:
outputSource: split/output
Expand Down Expand Up @@ -1504,7 +1503,7 @@ def test_empty_list_mapping(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
outputs:
count_list:
outputSource: count_list/out_file1
Expand Down Expand Up @@ -1538,9 +1537,9 @@ def test_mapping_and_subcollection_mapping(self):
with self.dataset_populator.test_history() as history_id:
jobs_summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
text_input1: collection
steps:
- label: text_input1
type: input_collection
- tool_id: collection_type_source_map_over
in:
input_collect: text_input1
Expand All @@ -1560,7 +1559,7 @@ def test_empty_list_reduction(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
outputs:
count_multi_file:
outputSource: count_multi_file/out_file1
Expand Down Expand Up @@ -1735,8 +1734,8 @@ def test_pause_outputs_with_deleted_inputs(self):
workflow_id = self._upload_yaml_workflow("""
class: GalaxyWorkflow
inputs:
- id: input1
type: data_collection_input
input1:
type: collection
collection_type: list
steps:
- tool_id: cat
Expand Down Expand Up @@ -1775,9 +1774,9 @@ def test_run_with_implicit_connection(self):
with self.dataset_populator.test_history() as history_id:
run_summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
test_input: data
steps:
- label: test_input
type: input
- label: first_cat
tool_id: cat1
in:
Expand Down Expand Up @@ -1823,8 +1822,7 @@ def test_run_with_validated_parameter_connection_valid(self):
run_summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- label: text_input
type: text
text_input: text
steps:
- tool_id: validation_repeat
state:
Expand All @@ -1846,8 +1844,7 @@ def test_run_with_validated_parameter_connection_invalid(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- label: text_input
type: text
text_input: text
steps:
- tool_id: validation_repeat
state:
Expand All @@ -1865,10 +1862,8 @@ def test_run_with_text_connection(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- label: data_input
type: data
- label: text_input
type: text
data_input: data
text_input: text
steps:
- label: randomlines
tool_id: random_lines1
Expand Down Expand Up @@ -2071,8 +2066,8 @@ def test_run_rename_on_mapped_over_collection(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
type: data_collection_input
input1:
type: collection
collection_type: list
steps:
- tool_id: cat
Expand Down Expand Up @@ -2106,8 +2101,8 @@ def test_run_rename_based_on_inputs_on_mapped_over_collection(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
type: data_collection_input
input1:
type: collection
collection_type: list
steps:
- tool_id: cat
Expand Down Expand Up @@ -2137,7 +2132,7 @@ def test_run_rename_collection_output(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- tool_id: collection_creates_pair
in:
Expand Down Expand Up @@ -2193,7 +2188,7 @@ def test_run_rename_when_resuming_jobs(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- tool_id: fail_identifier
label: first_fail
Expand Down Expand Up @@ -2240,7 +2235,7 @@ def test_run_rename_based_on_input_recursive(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- tool_id: cat
label: first_cat
Expand All @@ -2265,8 +2260,8 @@ def test_run_rename_based_on_input_repeat(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
- id: input2
input1: data
input2: data
steps:
- tool_id: cat
label: first_cat
Expand Down Expand Up @@ -2299,8 +2294,8 @@ def test_run_rename_based_on_input_conditional(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: fasta_input
- id: fastq_input
fasta_input: data
fastq_input: data
steps:
- tool_id: mapper2
state:
Expand Down Expand Up @@ -2337,8 +2332,8 @@ def test_run_rename_based_on_input_collection(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: fasta_input
- id: fastq_inputs
fasta_input: data
fastq_inputs: data
steps:
- tool_id: mapper2
state:
Expand Down Expand Up @@ -2380,7 +2375,7 @@ def test_run_hide_on_collection_output(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- tool_id: collection_creates_pair
state:
Expand Down Expand Up @@ -2412,9 +2407,8 @@ def test_run_hide_on_mapped_over_collection(self):
steps:
- tool_id: cat
label: first_cat
state:
input1:
$link: input1
in:
input1: input1
outputs:
out_file1:
hide: true
Expand Down Expand Up @@ -2442,7 +2436,7 @@ def test_tag_auto_propagation(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- label: first_cat
tool_id: cat
Expand Down Expand Up @@ -2485,7 +2479,7 @@ def test_run_add_tag_on_collection_output(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- tool_id: collection_creates_pair
in:
Expand All @@ -2511,8 +2505,8 @@ def test_run_add_tag_on_mapped_over_collection(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
type: data_collection_input
input1:
type: collection
collection_type: list
steps:
- tool_id: cat
Expand Down Expand Up @@ -2544,7 +2538,7 @@ def test_run_remove_tag_on_collection_output(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
steps:
- tool_id: cat
label: first_cat
Expand Down Expand Up @@ -2614,7 +2608,7 @@ def test_run_with_delayed_runtime_pja(self):
workflow_id = self._upload_yaml_workflow("""
class: GalaxyWorkflow
inputs:
- id: test_input
test_input: data
steps:
- label: first_cat
tool_id: cat1
Expand Down Expand Up @@ -2667,7 +2661,7 @@ def test_delete_intermediate_datasets_pja_1(self):
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
input1: data
outputs:
wf_output_1:
outputSource: third_cat/out_file1
Expand Down Expand Up @@ -2969,8 +2963,7 @@ def _run_mapping_workflow(self):
summary = self._run_jobs("""
class: GalaxyWorkflow
inputs:
- type: collection
label: input_c
input_c: collection
steps:
- label: cat1
tool_id: cat1
Expand Down
4 changes: 2 additions & 2 deletions test/api/test_workflows_from_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_subworkflow_simple(self):
workflow_id = self._upload_yaml_workflow("""
class: GalaxyWorkflow
inputs:
- id: outer_input
outer_input: data
steps:
- tool_id: cat1
label: first_cat
Expand All @@ -123,7 +123,7 @@ def test_subworkflow_simple(self):
- run:
class: GalaxyWorkflow
inputs:
- id: inner_input
inner_input: data
steps:
- tool_id: random_lines1
state:
Expand Down
Loading

0 comments on commit a8843ec

Please sign in to comment.