galaxyproject / galaxyproject/planemo

planemo lint does not validate file formats

Open
#678 2 comments 0 reactions 0 assignees View on GitHub
enhancement linting
Dominant language
Python
Stars
110
Forks
102
Avg merge
4d 21h
Merged PRs (30d)
13

Description

e.g. Using ``format="foobar"`` could be caught as an error during linting:

```
$ planemo --version
planemo, version 0.41.0.dev0
$ git diff
diff --git a/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml b/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
index 6bc8c54..34521e8 100644
--- a/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
+++ b/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
@@ -17,7 +17,7 @@ python $__tool_directory__/fastq_paired_unpaired.py '$input_fastq.extension' '$i
$output_singles


-
+


Separate (two FASTQ files, for the forward and reverse reads, in matching order).
$ planemo lint tools/fastq_paired_unpaired/fastq_paired_unpaired.xml ; echo "Return code $?"
Linting tool /mnt/shared/users/xxx/repositories/pico_galaxy/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
Applying linter tests... CHECK
.. CHECK: 2 test(s) found.
Applying linter output... CHECK
.. INFO: 4 outputs found.
Applying linter inputs... CHECK
.. INFO: Found 2 input parameters.
Applying linter help... CHECK
.. CHECK: Tool contains help section.
.. CHECK: Help contains valid reStructuredText.
Applying linter general... CHECK
.. CHECK: Tool defines a version [0.1.4].
.. CHECK: Tool defines a name [Divide FASTQ file into paired and unpaired reads].
.. CHECK: Tool defines an id [fastq_paired_unpaired].
.. CHECK: Tool targets 16.01 Galaxy profile.
Applying linter command... CHECK
.. INFO: Tool contains a command.
Applying linter citations... CHECK
.. CHECK: Found 1 likely valid citations.
Applying linter tool_xsd... CHECK
.. INFO: File validates against XML schema.
Return code 0
```

While this example is silly and artificial, it is based on a real issue from @tiagoantao using ``fastqsangergz`` rather than ``fastqsanger.gz`` https://github.com/galaxyproject/tools-iuc/issues/1323#issuecomment-303446756

Contributor guide

Open the contributing guide

Research direction

Start with the `planemo lint` command and reproduce the report using `tools/fastq_paired_unpaired/fastq_paired_unpaired.xml`, changing the input format to `foobar`. Trace the linter output to determine where format values are checked; done means the invalid format is rejected with a nonzero result while the existing `fastq` value continues to pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.