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

Make nf-core modules lint use new config file #2221

Merged
merged 3 commits into from
Mar 29, 2023
Merged

Conversation

sersorrel
Copy link
Member

@sersorrel sersorrel commented Mar 28, 2023

Previously nf-core modules lint would use a weird mixture of .nf-core-lint.yml (deprecated) and .nf-core.yml; I believe this PR removes all references to the former, except for the code in nf_core/utils.py that prints a warning if only the deprecated file is present.

For example, running nf-core modules lint fastqc on a freshly-created repo with the fastqc module shows a warning about fastqc being out of date, even with the following .nf-core.yml:

repository_type: pipeline
lint:
  main_nf: false

(if you instead put that lint config in .nf-core-lint.yml, you get... a weird crash "AttributeError: 'NFCoreModule' object has no attribute 'process_name'", but you do also get "INFO Ignoring lint test: main_nf".)

With this PR, the deprecated config file is ignored (like the rest of the lint commands), and you can only ignore the lint/cause the crash by including the lint config in .nf-core.yml.

I'm not sure how to write a test for this – if it's worth doing so I can give it a go (I guess some relevant existing tests are probably in tests/modules/lint.py?)

Fixes #2212

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #2221 (dfe2057) into dev (f3b5d1e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #2221      +/-   ##
==========================================
- Coverage   71.95%   71.95%   -0.01%     
==========================================
  Files          77       77              
  Lines        8363     8358       -5     
==========================================
- Hits         6018     6014       -4     
+ Misses       2345     2344       -1     
Impacted Files Coverage Δ
nf_core/__main__.py 58.81% <ø> (ø)
nf_core/lint/nextflow_config.py 77.45% <ø> (ø)
nf_core/components/components_command.py 71.32% <100.00%> (-0.30%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 🙂

@sersorrel sersorrel merged commit 4e84806 into dev Mar 29, 2023
@sersorrel sersorrel deleted the deprecated-lint-config branch March 29, 2023 12:23
@sersorrel sersorrel linked an issue Mar 29, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated .nf-core-lint.yaml still used by nf-core modules lint
2 participants