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

Add check to lint for deprecated syntax #104

Merged
merged 2 commits into from Aug 9, 2018
Merged

Add check to lint for deprecated syntax #104

merged 2 commits into from Aug 9, 2018

Conversation

senthil10
Copy link
Contributor

nextflow had an update in syntax for process specific configuration. Idea is to encourage the new syntax (withName: processName) as it is more flexible. So point out the deprecated syntax ($processName) in warning while linting.

It is fairly easy now (thanks to how nextflow lists the current user defined configuration). For instance

With deprecated syntax:
[u'process.$makeHISATindex.cpus', u'process.$workflow_summary_mqc.cache', u'process.$makeSTARindex.time', u'process.$star.time', u'process.$hisat2Align.time']
With cool new syntax:
[u"process. 'withName:makeHISATindex'.cpus", u"process. 'withName:workflow_summary_mqc'.cache", u"process. 'withName:makeSTARindex'.time", u"process. 'withName:star'.time", u"process. 'withName:hisat2Align'.time"]

@senthil10 senthil10 requested a review from ewels August 8, 2018 12:00
@codecov-io
Copy link

codecov-io commented Aug 8, 2018

Codecov Report

Merging #104 into dev will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             dev     #104      +/-   ##
=========================================
+ Coverage   91.7%   91.73%   +0.03%     
=========================================
  Files          7        7              
  Lines        687      690       +3     
=========================================
+ Hits         630      633       +3     
  Misses        57       57
Impacted Files Coverage Δ
nf_core/lint.py 97.68% <100%> (+0.02%) ⬆️

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 d536ca1...f3d68e7. Read the comment docs.

@senthil10
Copy link
Contributor Author

senthil10 commented Aug 8, 2018

Ran a local test with my old version for rnaseq package and after @apeltzer have fixed old syntax in PR #51

Lint on old syntax
$ nf-core lint /Users/senthilkumar.panneerselvam/opt/rnaseq

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

Running pipeline tests  [#####################---------------]   60%  0d 00:00:01  'check_ci_confiRunning pipeline tests  [#########################-----------]   70%  0d 00:00:01  'check_readme' Running pipeline tests  [############################--------]   80%  0d 00:00:01  'check_conda_enRunning pipeline tests  [################################----]   90%  0d 00:00:02  'check_conda_doRunning pipeline tests  [####################################]  100%  'check_conda_singularityfileRunning pipeline tests  [####################################]  100%  None

INFO: ===========
 LINTING RESULTS
=================
  80 tests passed  21 tests had warnings   0 tests failed

WARNING: Test Warnings:
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$makeHISATindex
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$get_software_versions
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$hisat2Align
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$preseq
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$makeSTARindex
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$fastqc
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$hisat2_sortOutput
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$multiqc
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$star
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$genebody_coverage
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$sample_correlation
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$markDuplicates
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$dupradar
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$rseqc
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$trim_galore
  http://nf-co.re/errors#4: Process configuration is done with deprecated_syntax: process.$workflow_summary_mqc
  http://nf-co.re/errors#8: Conda package is not latest available: trim-galore=0.4.5, 0.5.0 available
  http://nf-co.re/errors#8: Conda package is not latest available: picard=2.18.7, 2.18.11 available
  http://nf-co.re/errors#8: Conda package is not latest available: samtools=1.8, 1.9 available
  http://nf-co.re/errors#8: Conda package is not latest available: subread=1.6.1, 1.6.2 available
  http://nf-co.re/errors#8: Conda package is not latest available: multiqc=1.5, 1.6 available
Lint on new syntax
$ nf-core lint /Users/senthilkumar.panneerselvam/Downloads/rnaseq

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

Running pipeline tests  [#####################---------------]   60%  0d 00:00:01  'check_ci_confiRunning pipeline tests  [#########################-----------]   70%  0d 00:00:01  'check_readme' Running pipeline tests  [############################--------]   80%  0d 00:00:01  'check_conda_enRunning pipeline tests  [################################----]   90%  0d 00:00:02  'check_conda_doRunning pipeline tests  [####################################]  100%  'check_conda_singularityfileRunning pipeline tests  [####################################]  100%  None

INFO: ===========
 LINTING RESULTS
=================
  80 tests passed   5 tests had warnings   0 tests failed

WARNING: Test Warnings:
  http://nf-co.re/errors#8: Conda package is not latest available: trim-galore=0.4.5, 0.5.0 available
  http://nf-co.re/errors#8: Conda package is not latest available: picard=2.18.7, 2.18.11 available
  http://nf-co.re/errors#8: Conda package is not latest available: samtools=1.8, 1.9 available
  http://nf-co.re/errors#8: Conda package is not latest available: subread=1.6.1, 1.6.2 available
  http://nf-co.re/errors#8: Conda package is not latest available: multiqc=1.5, 1.6 available

@senthil10 senthil10 requested a review from apeltzer August 8, 2018 12:57
Copy link
Member

@apeltzer apeltzer left a comment

Choose a reason for hiding this comment

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

Nice work! I think this can go in :-)

@apeltzer apeltzer merged commit db5d5e0 into nf-core:dev Aug 9, 2018
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.

None yet

3 participants