Lint for incorrect `.mix(XXX.out.versions.first())` subworklow calls
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description of feature
It would be nice to have a linting check that every subworkflow and module called within a given script has their versions mixed into the ch_versions channel and sent downstream.
This would help developers to ensure they do not forget version reporting for all steps of the pipeline - something which is very important for nf-core pipelines in terms of reprdocubility etc.
I could envision this as picking up all the names in all the include calls (typically at the top of a workflow script), the nsearching for each name with a .out.versions suffix through that given script.
If e.g. FOO.out.versions then you get a lint warning to ensure versions are reported for that module/subworkflow.
Furthermore, an additional check could be made so that for subworkflows that the string does not include .first() at the end as we do for modules - subworkflows should have N > 1 modules, thus you don't want to pick just the first entry of all of those modules.
(EDIT I didn't realise there was a lint check for the first suggestion, I guess because I never forget to mix my versions 😎)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing lint check for .out.versions references and the code that distinguishes included modules from subworkflows. Verify the subworkflow case and define completion as warning when its version channel call incorrectly ends with .first(); run the relevant lint tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100