Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error_retry label not recognized as standard label for certain module structures #3160

Open
Felix-Kummer opened this issue Sep 6, 2024 · 2 comments
Labels
bug Something isn't working good-first-issue linting

Comments

@Felix-Kummer
Copy link

Description of the bug

Running nf-core lint on certain pipelines returns Non-standard labels found: error_retry even though the error_retry label is defined in conf/base.conf.
This behaviour only appears when the modules that have the error_retry label are structured as single .nf file in the modules directory (e.g. modules/local/force-mosaic.nf).
The warning does not appear for modules that are structured using a directory that contains a main.nf file (e.g. modules/local/force-mosaic/main.nf).
An example where this behaviour appears is the rangeland pipeline.

Command used and terminal output

$ nf-core lint

│ force-higher_level              │ modules/local/force-higher_level.nf             │ Non-standard labels found: error_retry                                             │
│ force-preprocess                │ modules/local/force-preprocess.nf               │ Non-standard labels found: error_retry                                             │
│ higher_level_force_config       │ modules/local/higher_level_force_config.nf      │ Non-standard labels found: error_retry                                             │
│ merge                           │ modules/local/merge.nf                          │ Non-standard labels found: error_retry                                             │
│ preprocess_force_config         │ modules/local/preprocess_force_config.nf        │ Non-standard labels found: error_retry

System information

nextflow version 24.04.4.5917
nf-core/tools version 2.14.1
Local executor on Ubuntu Linux

@Felix-Kummer Felix-Kummer added the bug Something isn't working label Sep 6, 2024
@mirpedrol
Copy link
Member

Hi @Felix-Kummer, thanks for reporting. This linting test checks the nf-core standard labels. We should skip the tests for local modules, as you can add custom labels as in your case.

@Felix-Kummer
Copy link
Author

But error_retry is defined in the templates conf/base.conf. Shouldn't that be a standard label?
The bug/issue is likely related to the structure of local modules.
If they have a separate directory under modules/local (e.g. modules/local/force-mosaic/main.nf instead of modules/local/force-mosaic.nf) the warning does not appear.
The warning only appearing for local modules that don't have this structure suggest that the linter evaluates linting tests differently for different directory structures.

I get that having a separate directory and a main.nf file is the preferred structure but its not strictly enforced anywhere.
The question is whether structures like modules/local/force-mosaic/main.nf should still be allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue linting
Projects
None yet
Development

No branches or pull requests

2 participants