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

New lint test: params_used #1039

Merged
merged 2 commits into from
Apr 27, 2021
Merged

New lint test: params_used #1039

merged 2 commits into from
Apr 27, 2021

Conversation

ewels
Copy link
Member

@ewels ewels commented Apr 26, 2021

Check if all params returned from nextflow config are mentioned somewhere in main.nf.

Will need updating for DSL2 to run with... all .nf files maybe? Or in certain paths?

Closes #1038

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!
  • Documentation in docs is updated

@ewels ewels requested a review from KevinMenden April 26, 2021 22:02
@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #1039 (8b5928d) into dev (dee038f) will increase coverage by 0.09%.
The diff coverage is 93.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1039      +/-   ##
==========================================
+ Coverage   69.38%   69.48%   +0.09%     
==========================================
  Files          34       35       +1     
  Lines        4299     4319      +20     
==========================================
+ Hits         2983     3001      +18     
- Misses       1316     1318       +2     
Impacted Files Coverage Δ
nf_core/lint/merge_markers.py 87.50% <ø> (ø)
nf_core/lint/params_used.py 89.47% <89.47%> (ø)
nf_core/lint/__init__.py 76.79% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1588824...8b5928d. Read the comment docs.

Copy link
Contributor

@KevinMenden KevinMenden 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! 👌

Yes that were my first thoughts when reading this, that for DSL2 we'd have to adapt it. I guess if we have a final structure of DSL2 pipelines that should be easy. When looking for all .nf files in the repo that would include all the modules. For starters we could just omit the modules dir, not so sure about subworkflows 🤔 could imagine people using params in there ... but well let's cross that bridge when we get there

@drpatelh
Copy link
Member

Yup. Would have to scrape all .nf files in modules/, subworkflows and workflows/ recursively for DSL2. This is with the assumption that all pipelines adopt this structure too.

@drpatelh
Copy link
Member

But I think you will have to 🐻 in mind that you can also have local params in DSL2 that don't necessarily have to be defined in nextflow.config. From what I understand this won't be a problem for the way around that we are trying to do things here.

@ewels ewels merged commit 8b943c9 into nf-core:dev Apr 27, 2021
@ewels ewels deleted the lint-params_used branch April 27, 2021 11:46
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.

3 participants