planemo lint cryptic WARNING and fail

Hi All,

This is the galaxy wrapper I am trying to write a unit test for:
https://github.com/elmbeech/physicelldataloader/blob/galaxy/pcdl/pcdl_get_version.xml

Using planemo test pcdl_get_version.xml --update_test_data, the unit test passes flawless.

Using planemo lint pcdl_get_version.xml I get a warning and the linting fails.

(pcdlenv) bb8@milleniumfalcon:~/physicelldataloader/pcdl$ planemo lint pcdl_get_version.xml
Linting tool /home/bb8/physicelldataloader/pcdl/pcdl_get_version.xml
.. WARNING (TestsCaseValidation): Test 1: failed to validate test parameters against inputs - tests won't run on a modern Galaxy tool profile version. Validation errors are [1 validation error for PydanticModelFor[pcdl_get_version]
positional_arguments.path
  Field required [type=missing, input_value={}, input_type=dict]]
.. CHECK (TestsNoValid): 1 test(s) found.
.. INFO (OutputsNumber): 1 outputs found.
.. INFO (InputsNum): Found 2 input parameters.
.. CHECK (HelpPresent): Tool contains help section.
.. CHECK (HelpValidRST): Help contains valid reStructuredText.
.. CHECK (ToolIDValid): Tool defines an id [pcdl_get_version].
.. CHECK (ToolNameValid): Tool defines a name [pcdl_get_version].
.. CHECK (ToolProfileValid): Tool specifies profile version [21.05].
.. CHECK (ToolVersionValid): Tool defines a version [3.0.0+galaxy0].
.. INFO (CommandInfo): Tool contains a command.
.. CHECK (CitationsFound): Found 1 citations.
Failed linting

I tried to add the missing fields, searched all the documents, greped, and googled for hours to figure out what I have to change to get rid of this warning and pass the liniting too. Without success. I am sure this is a piece of cake for a seasoned galaxy developer.

Could you please point me in the right direction?
Thank you, Elmar

Hi @bb-8,
the error is rather cryptic indeed :roll_eyes:
Maybe try to specify the galaxy datatypes for all your test collection elements with ftype="txt" for example inside each element tag.
Just a guess though.

that a good idea! i will try this later in the day and report here.

Hi @wm75,

I tried, but it is not solving any problem.
Not sure how to take this further.
Could this be an error in the linter?

Elmar

That test is not valid, collection is not valid inside a param tag, so as far as the galaxy test framework is concerned you haven’t provided anything to section.path. Galaxy Tool XML File — Galaxy Project 25.1.dev0 documentation is how you specify an output collection test.

Oops, this is not an output collection, what was missing was just the section for a valid test definition:

diff --git a/pcdl/pcdl_get_version.xml b/pcdl/pcdl_get_version.xml
index c051b34..3face29 100644
--- a/pcdl/pcdl_get_version.xml
+++ b/pcdl/pcdl_get_version.xml
@@ -40,40 +40,44 @@
 
     <tests>
         <test expect_num_outputs="1">
-            <param name="path">
-                <collection type="list">
-                    <element name="initial_attached_cells_graph.txt" value="initial_attached_cells_graph.txt" />
-                    <element name="initial_cell_neighbor_graph.txt" value="initial_cell_neighbor_graph.txt" />
-                    <element name="initial_cells.mat" value="initial_cells.mat" />
-                    <element name="initial_mesh0.mat" value="initial_mesh0.mat" />
-                    <element name="initial_microenvironment0.mat" value="initial_microenvironment0.mat" />
-                    <element name="initial_spring_attached_cells_graph.txt" value="initial_spring_attached_cells_graph.txt" />
-                    <element name="initial.svg" value="initial.svg" />
-                    <element name="initial.xml" value="initial.xml" />
-                    <element name="legend.svg" value="legend.svg" />
-                    <element name="output00000000_attached_cells_graph.txt" value="output00000000_attached_cells_graph.txt" />
-                    <element name="output00000000_cell_neighbor_graph.txt" value="output00000000_cell_neighbor_graph.txt" />
-                    <element name="output00000000_cells.mat" value="output00000000_cells.mat" />
-                    <element name="output00000000_microenvironment0.mat" value="output00000000_microenvironment0.mat" />
-                    <element name="output00000000_spring_attached_cells_graph.txt" value="output00000000_spring_attached_cells_graph.txt" />
-                    <element name="output00000000.xml" value="output00000000.xml" />
-                    <element name="output00000001_attached_cells_graph.txt" value="output00000001_attached_cells_graph.txt" />
-                    <element name="output00000001_cell_neighbor_graph.txt" value="output00000001_cell_neighbor_graph.txt" />
-                    <element name="output00000001_cells.mat" value="output00000001_cells.mat" />
-                    <element name="output00000001_microenvironment0.mat" value="output00000001_microenvironment0.mat" />
-                    <element name="output00000001_spring_attached_cells_graph.txt" value="output00000001_spring_attached_cells_graph.txt" />
-                    <element name="output00000001.xml" value="output00000001.xml" />
-                    <element name="final_attached_cells_graph.txt" value="final_attached_cells_graph.txt" />
-                    <element name="final_cell_neighbor_graph.txt" value="final_cell_neighbor_graph.txt" />
-                    <element name="final_cells.mat" value="final_cells.mat" />
-                    <element name="final_microenvironment0.mat" value="final_microenvironment0.mat" />
-                    <element name="final_spring_attached_cells_graph.txt" value="final_spring_attached_cells_graph.txt" />
-                    <element name="final.svg" value="final.svg" />
-                    <element name="final.xml" value="final.xml" />
-                    <element name="PhysiCell_settings.xml" value="PhysiCell_settings.xml" />
-                </collection>
-            </param>
-            <param name="verbose" value="true" />
+            <section name="positional_arguments">
+                <param name="path">
+                    <collection type="list">
+                        <element name="initial_attached_cells_graph.txt" value="initial_attached_cells_graph.txt" />
+                        <element name="initial_cell_neighbor_graph.txt" value="initial_cell_neighbor_graph.txt" />
+                        <element name="initial_cells.mat" value="initial_cells.mat" />
+                        <element name="initial_mesh0.mat" value="initial_mesh0.mat" />
+                        <element name="initial_microenvironment0.mat" value="initial_microenvironment0.mat" />
+                        <element name="initial_spring_attached_cells_graph.txt" value="initial_spring_attached_cells_graph.txt" />
+                        <element name="initial.svg" value="initial.svg" />
+                        <element name="initial.xml" value="initial.xml" />
+                        <element name="legend.svg" value="legend.svg" />
+                        <element name="output00000000_attached_cells_graph.txt" value="output00000000_attached_cells_graph.txt" />
+                        <element name="output00000000_cell_neighbor_graph.txt" value="output00000000_cell_neighbor_graph.txt" />
+                        <element name="output00000000_cells.mat" value="output00000000_cells.mat" />
+                        <element name="output00000000_microenvironment0.mat" value="output00000000_microenvironment0.mat" />
+                        <element name="output00000000_spring_attached_cells_graph.txt" value="output00000000_spring_attached_cells_graph.txt" />
+                        <element name="output00000000.xml" value="output00000000.xml" />
+                        <element name="output00000001_attached_cells_graph.txt" value="output00000001_attached_cells_graph.txt" />
+                        <element name="output00000001_cell_neighbor_graph.txt" value="output00000001_cell_neighbor_graph.txt" />
+                        <element name="output00000001_cells.mat" value="output00000001_cells.mat" />
+                        <element name="output00000001_microenvironment0.mat" value="output00000001_microenvironment0.mat" />
+                        <element name="output00000001_spring_attached_cells_graph.txt" value="output00000001_spring_attached_cells_graph.txt" />
+                        <element name="output00000001.xml" value="output00000001.xml" />
+                        <element name="final_attached_cells_graph.txt" value="final_attached_cells_graph.txt" />
+                        <element name="final_cell_neighbor_graph.txt" value="final_cell_neighbor_graph.txt" />
+                        <element name="final_cells.mat" value="final_cells.mat" />
+                        <element name="final_microenvironment0.mat" value="final_microenvironment0.mat" />
+                        <element name="final_spring_attached_cells_graph.txt" value="final_spring_attached_cells_graph.txt" />
+                        <element name="final.svg" value="final.svg" />
+                        <element name="final.xml" value="final.xml" />
+                        <element name="PhysiCell_settings.xml" value="PhysiCell_settings.xml" />
+                    </collection>
+                </param>
+            </section>
+            <section name="options">
+                <param name="verbose" value="true" />
+            </section>
             <output name="version_txt" file="version_txt.txt" ftype="txt">
                 <assert_contents>
                     <has_text text="version:" />

2 Likes

Thank you, @mvdbeek and @wm75 for helping!
@mvdbeek, this fixed the problem. You are a wizard!

And I understand now that I have to repeat the section structure in the test part too.
I somehow missed that when I wrote this first test.