tools
tools copied to clipboard
Allowing non nf-core hosted packages to not fail linting
Is your feature request related to a problem? Please describe
No
Describe the solution you'd like
I'm working on several projects where we aren't targeting submitting to nf-core but I would really like to take advantage of the tooling that nf-core provides in order to create a standardized project.
So far everything works great and I can remove nf-core specific things, however it would be really nice to be able to use the nf-core linter, ideally in CI. However, at least 2 lint checks will always fail if the project isn't a nf-core hosted project:
nextflow_config: Config manifest.name did not begin with nf-core/: autometa
nextflow_config: Config variable manifest.homePage did not begin with https://github.com/nf-core/: https://github.com/KwanLab/Autometa
Describe alternatives you've considered
nf-core standard would be able to be adopted by a larger community if there was maybe a flag on the linter to ignore tests that only apply to nf-core hosted projects
A bit of a blunt hammer but a .nf-core-lint.yml
file containing nextflow_config: false
works
Documentation:
https://nf-co.re/tools/#linting-config
@chasemc Any possibility of revisiting this, or is it unaligned with nf-core goals?
Seems to me you could add a quick conditional around the code block on line 206 of lint/nextflow_config.py
:
if "manifest.name" not in ignored:
#check that the pipeline name starts with nf-core
try:
...
This would allow users to pop manifest.name
in their .nf-core.yml
file and pass the lint.
Agreed, there should be a more fine-grained way to do this without disabling the entire config check.
Reopening this issue so that it doesn't get lost again.
Additional context - you can ignore specific config parameter names for the present / not-present checks:
https://github.com/nf-core/tools/blob/e0d00d3e09a996f59eb5ce6ebc4795452a5b1d39/nf_core/lint/nextflow_config.py#L157-L161
However, the failures in this issue do not have if
clauses to allow them to be ignored:
https://github.com/nf-core/tools/blob/e0d00d3e09a996f59eb5ce6ebc4795452a5b1d39/nf_core/lint/nextflow_config.py#L206-L216
It's just a case of going through this code and checking ignore_configs
so should be fairly easy.
Not sure about the linting, but a hard problem lately is syncing to TEMPLATE which tries to re-add a bunch of nf-core branding.
@chasemc could you open a new issue about this please? That'll be a separate task.