rnaseq
rnaseq copied to clipboard
Pytest workflow
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/rnaseq 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). - [ ] Usage Documentation in
docs/usage.mdis updated. - [ ] Output Documentation in
docs/output.mdis updated. - [ ]
CHANGELOG.mdis updated. - [ ]
README.mdis updated (including new tool citations and authors/contributors).
Alright I've hit a snag. So the tests can't seem to find anyting in bin/ if I use --symlink arg for pytest. Anyone know anything more about how nextflow copies over the bin/ dir?
To reproduce install pytest-workflow and run pytest --tag default --symlink --wt 3 --kwdof
afaik it doesn't - it just adds it to PATH. Check the .command.run script, in there should be a line defining PATH.
@grst Hmm the Path line is in there, and it looks right. Does PATH not like symlinks?
export PATH="/tmp/pytest_workflow_woixfhep/Run_default_pipeline_with_test_data/bin:\$PATH"
I'd assume that something goes wrong with mounting the directory in the Docker container.
@pditommaso Could I get your thoughts on why this is happening? I noticed that https://github.com/nextflow-io/nextflow/commit/1405a28f8fc2d1198a7c76d19bf96fcc968a72b0 Is in the 5v20.11.0-edge changed the way the bin dir is handled and I'm using that version because of the singularity https fix.
Created https://github.com/nextflow-io/nextflow/issues/1868
YAML linting is failing
To keep the code consistent with lots of contributors, we run automated code consistency checks. To fix this CI test, please run:
- Install
yaml-lint- Install
npmthen installyaml-lint(npm install -g yaml-lint)
- Install
- Fix the markdown errors
- Run the test locally:
yamllint $(find . -type f -name "*.yml" -o -name "*.yaml") - Fix any reported errors in your YAML files
- Run the test locally:
Once you push these changes the test should pass, and you can hide this comment :+1:
We highly recommend setting up yaml-lint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
Thanks again for your contribution!
Nope, it should just work! Steps in case I hadn't listed them out
- Convert end 2 end (the current ci) to pytest. This is done but definitely needs updating since I wrote it a few months ago.
- Start testing local modules
- Test local workflows
But would you eventually want to merge this PR, or should we get it in tools first and get it into each pipeline using template sync? Ofc, the tests would still need to be written, but I think it would be great to encourage pytest workflow as default for all pipelines.