Hi all, I've not previously need to use a conditional parameter in a unit test, but for the MIRA wrapper this is essential. Here's my first attempt and the error when running the test: https://bitbucket.org/peterjc/galaxy-central/commits/794ebc6cafecd3db9388f50... <tests> <test> <param name="job_method" value="denovo" /> <param name="job_type" value="est" /> <param name="job_qual" value="accurate" /> <param name="condBackbone.use" value="false" /> <param name="condSanger.use" value="true" /> <param name="condSanger.filename" value="tvc_mini.fastq" ftype="fastq" /> <param name="condRoche.use" value="false" /> <param name="condIllumina.use" value="false" /> <param name="condIonTorrent.use" value="false" /> <output name="out_fasta" file="tvc_contigs.fasta" ftype="fasta" /> </test> </tests> Note that I can't refer to the parameters by the final part of their name ("use") as this is ambiguous. The dot syntax is natural to match that used in the Cheetah templates, but does not appear to work in the tool tests: $ ./run_functional_tests.sh -id mira_assembler ... ====================================================================== ERROR: Assemble with MIRA v3.4 ( mira_assembler ) > Test-1 ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/test/functional/test_toolbox.py", line 171, in test_tool self.do_it( td, shed_tool_id=shed_tool_id ) File "/mnt/galaxy/galaxy-central/test/functional/test_toolbox.py", line 76, in do_it page_inputs = self.__expand_grouping(testdef.tool.inputs_by_page[0], all_inputs) File "/mnt/galaxy/galaxy-central/test/functional/test_toolbox.py", line 118, in __expand_grouping if declared_inputs[ value.test_param.name ] == case.value: KeyError: 'use' Is there something wrong with my test, or is this not yet supported? Thanks, Peter
Peter, My recommendation would be to append or prepend the conditional name to each "use" parameter's name attribute, then specify the test parameters like: <param name="useBackbone" value="false" /> There are good examples of how this is structured in tools/ngs_rna/cufflinks_wrapper.xml --Dave B. On 4/24/13 14:06:51.000, Peter Cock wrote:
Hi all,
I've not previously need to use a conditional parameter in a unit test, but for the MIRA wrapper this is essential. Here's my first attempt and the error when running the test:
https://bitbucket.org/peterjc/galaxy-central/commits/794ebc6cafecd3db9388f50...
<tests> <test> <param name="job_method" value="denovo" /> <param name="job_type" value="est" /> <param name="job_qual" value="accurate" /> <param name="condBackbone.use" value="false" /> <param name="condSanger.use" value="true" /> <param name="condSanger.filename" value="tvc_mini.fastq" ftype="fastq" /> <param name="condRoche.use" value="false" /> <param name="condIllumina.use" value="false" /> <param name="condIonTorrent.use" value="false" /> <output name="out_fasta" file="tvc_contigs.fasta" ftype="fasta" /> </test> </tests>
Note that I can't refer to the parameters by the final part of their name ("use") as this is ambiguous. The dot syntax is natural to match that used in the Cheetah templates, but does not appear to work in the tool tests:
$ ./run_functional_tests.sh -id mira_assembler ... ====================================================================== ERROR: Assemble with MIRA v3.4 ( mira_assembler ) > Test-1 ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/test/functional/test_toolbox.py", line 171, in test_tool self.do_it( td, shed_tool_id=shed_tool_id ) File "/mnt/galaxy/galaxy-central/test/functional/test_toolbox.py", line 76, in do_it page_inputs = self.__expand_grouping(testdef.tool.inputs_by_page[0], all_inputs) File "/mnt/galaxy/galaxy-central/test/functional/test_toolbox.py", line 118, in __expand_grouping if declared_inputs[ value.test_param.name ] == case.value: KeyError: 'use'
Is there something wrong with my test, or is this not yet supported?
Thanks,
Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
On Wed, Apr 24, 2013 at 8:34 PM, Dave Bouvier <dave@bx.psu.edu> wrote:
Peter,
My recommendation would be to append or prepend the conditional name to each "use" parameter's name attribute, then specify the test parameters like:
<param name="useBackbone" value="false" />
There are good examples of how this is structured in tools/ngs_rna/cufflinks_wrapper.xml
--Dave B.
Hi Dave, I'd considered that workaround, but it would break any old workflows using the wrapper with the current parameter names. I regard this as a bug or limitation of the test framework, but if not, things are confusingly inconsistent. If you think parameter names should be unique, it would make the Cheetah commands a bit shorter as the wouldn't need the conditional-name-dot prefixes. Regards, Peter
I regard this as a bug or limitation of the test framework, but if not, things are confusingly inconsistent. If you think parameter names should be unique, it would make the Cheetah commands a bit shorter as the wouldn't need the conditional-name-dot prefixes.
Definitely a Bug/Limitation of the testing framework. Parameter names need only be unique within a given context. The testing framework should be extended to address this.
I've updated the relevant trello card, my plan is to focus on improving the testing framework over the next few days. --Dave B. On 4/24/13 16:15:53.000, James Taylor wrote:
I regard this as a bug or limitation of the test framework, but if not, things are confusingly inconsistent. If you think parameter names should be unique, it would make the Cheetah commands a bit shorter as the wouldn't need the conditional-name-dot prefixes.
Definitely a Bug/Limitation of the testing framework. Parameter names need only be unique within a given context. The testing framework should be extended to address this.
On 4/24/13 16:15:53.000, James Taylor wrote:
I regard this as a bug or limitation of the test framework, but if not,
things are confusingly inconsistent. If you think parameter names should be unique, it would make the Cheetah commands a bit shorter as the wouldn't need the conditional-name-dot prefixes.
Definitely a Bug/Limitation of the testing framework. Parameter names need only be unique within a given context. The testing framework should be extended to address this.
On Wednesday, April 24, 2013, Dave Bouvier wrote:
I've updated the relevant trello card, my plan is to focus on
improving the testing framework over the next few days.
--Dave B.
Great - Thanks guys, Peter
On Wed, Apr 24, 2013 at 10:14 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
On Wednesday, April 24, 2013, Dave Bouvier wrote:
I've updated the relevant trello card, my plan is to focus on improving the testing framework over the next few days.
--Dave B.
Great - Thanks guys,
Peter
Hi Dave, What was the relevant Trello card, and does it cover other limitations like how to use repeat parameters in a test case? Thanks, Peter
On Mon, Apr 29, 2013 at 3:30 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
Hi Dave,
What was the relevant Trello card, and does it cover other limitations like how to use repeat parameters in a test case?
Thanks,
Peter
I've filed a Trello issue for the specific problem with conditional parameters: https://trello.com/card/disambiguated-conditional-parameters-not-supported-i... Peter
participants (3)
-
Dave Bouvier
-
James Taylor
-
Peter Cock