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

check: Adding line number to error messages. #392

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

smoe
Copy link
Contributor

@smoe smoe commented Jul 1, 2024

Hello,

ported this to dev but was running master when I got an error message that was triggered by an empty last line in the sample sheet. Found that only after adding line numbers to the error message and thought that this may be of interest to everyone to have. So, here it comes.

The change are the addition of an iterator and the formatting of the error message's context from "Line" to "Line {}".format(lineNo). For the error message on an invalid number of columns I also added the actual number of columns that were found.

Best,
Steffen

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
    Would be happy to do so but need a bit of an instruction on how you want to integrate that into the testing on samplesheets that is already performed.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
    Tested the script on a local file.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).
    Not required.

Copy link

github-actions bot commented Jul 3, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 80a12ac

+| ✅ 227 tests passed       |+
#| ❔   2 tests were ignored |#
!| ❗   4 tests had warnings |!

❗ Test warnings:

  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline

❔ Tests ignored:

  • nextflow_config - Config default ignored: params.bamtools_filter_pe_config
  • nextflow_config - Config default ignored: params.bamtools_filter_se_config

✅ Tests passed:

Run details

  • nf-core/tools version 2.14.1
  • Run at 2024-07-03 14:05:48

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

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

Thanks for contributing @smoe! 😄
Would be nice if you could address my suggestions 🙏

CHANGELOG.md Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
bin/check_samplesheet.py Outdated Show resolved Hide resolved
@smoe
Copy link
Contributor Author

smoe commented Jul 3, 2024

Thanks for contributing @smoe! 😄 Would be nice if you could address my suggestions 🙏

All accepted, very nice, many thanks! Let me quickly rebase this to reduce the number of commits. I presume you are happy with me squashing this all into one.

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

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

Thanks @smoe!
LGTM! 🚀

Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com>
@smoe smoe force-pushed the adding_line_numbers_to_check_dev branch from 848b9f1 to 80a12ac Compare July 3, 2024 13:42
@JoseEspinosa JoseEspinosa merged commit c3e1861 into nf-core:dev Jul 3, 2024
9 checks passed
@smoe smoe deleted the adding_line_numbers_to_check_dev branch July 3, 2024 15:11
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.

2 participants