Hi all! I opened a PR in modules to update a tool....
# tools
t
Hi all! I opened a PR in modules to update a tool. In the process I also swapped to using a topic for versions. Now linting fails with the following error:
Copy code
╭─ [✗] 1 Module Test Failed ───────────────────────────────────────────────────╮
│                  ╷                            ╷                              │
│ Module name      │ File path                  │ Test message                 │
│╶─────────────────┼────────────────────────────┼─────────────────────────────╴│
│ multivcfanalyzer │ modules/nf-core/multivcfa… │ wrong_version_output:        │
│                  │                            │ Versions topic output is not │
│                  │                            │ correctly formatted,         │
│                  │                            │ expected tuple               │
│                  │                            │ val("${task.process}"),      │
│                  │                            │ val('<tool>'),               │
│                  │                            │ eval("<version_command>") or │
│                  │                            │ tuple                        │
│                  │                            │ val("${task.process}"),      │
│                  │                            │ val('<tool>'),               │
│                  │                            │ val('<version>')             │
│                  ╵                            ╵                              │
╰──────────────────────────────────────────────────────────────────────────────╯
The error confuses me, since I followed the instructions in the Blog to make the update, and the actual LoC looks formatted identically to me:
Copy code
tuple val("${task.process}"), val('multivcfanalyzer'), eval('multivcfanalyzer -h | head -n 1 | cut -f 3 -d " "') , emit: versions_multivcfanalyzer, topic: versions
tuple val("${task.process}"), val('tabix')           , eval('tabix -h 2>&1 | grep Version | cut -f 2 -d " "')    , emit: versions_tabix           , topic: versions
Is this a potential issue with linting, or am I being obtuse? 😅 P.S.: Updating the container links to sequera wave links also gives linting warnings for
container_links
and
main_nf_container
. I assume those are okay to ignore here? Full relevant PR here: https://github.com/nf-core/modules/pull/10137
quick look 1
m
found the probllem, the comma should be moved to after the
val('<tool>')
, otherwise our regex fails https://github.com/nf-core/tools/blob/main/nf_core/modules/lint/main_nf.py#L744 (should probably improve that)
t
sigh ok. so much for harshil aligning my channels xD
thank you for looking into it! 😄
m