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

Improve nf-test files detection Python script #99

Merged

Conversation

adamrtalbot
Copy link
Contributor

@adamrtalbot adamrtalbot commented Mar 4, 2024

Improvements to detect nf-test files Python script

Additions:

  • include.yaml file to specify files to include or exclude from test sets
  • Will include additional tests if major files have been modified, e.g. the .github/workflows/* files
  • Uses globbing for exclude statement to match multiple files.

Changes:

  • bump setup-nextflow
  • Adds pyyaml as dependency
  • Uses pathlib.Path object where possible to prevent coercion back and forth between strings
  • Splits find_files into two functions, find_changed_files and detect_nf_test_files

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!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/phageannotator branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Additions:
 - include.yaml file to specify files to include or exclude from test sets
 - Will include additional tests if major files have been modified, e.g. the .github/workflows/* files
 - Uses globbing for exclude statement to match multiple files.

Changes:
 - bump setup-nextflow
 - Adds pyyaml as dependency
 - Uses pathlib.Path object where possible to prevent coercion back and forth between strings
 - Splits find_files into two functions, find_changed_files and detect_nf_test_files
Copy link
Collaborator

@CarsonJM CarsonJM left a comment

Choose a reason for hiding this comment

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

Thanks again @adamrtalbot ! I've already been working on fixing those failing CI tests, so those will be fixed in the next PR

@CarsonJM CarsonJM merged commit 6876d49 into nf-core:dev Mar 4, 2024
100 of 112 checks passed
@adamrtalbot adamrtalbot deleted the detect_nf_test_files_python_improvements branch March 5, 2024 17:50
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