-
Notifications
You must be signed in to change notification settings - Fork 705
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
Reorganise pipeline tests into flat structure #1280
Conversation
Changes: - Move all test files from tests/tests/ to test/*.nf.test - Makes structure more flat and discovery easier at the cost of looking more untidy. - To be discussed in PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, but missing most of the snaps, no?
There are no snaps. You're welcome to write snaps for the pipeline tests, I gave up after about 10 hours. |
Without knowing what has been discussed before...how many different tests do you expect a pipeline will have? Since all modules and subworkflows should already have been tested, most unit tests are done (except for local ones) and the total number of tests should not be more than a dozen or so? And do you intend to stick with having one file per test? BTW: Don't you want to get rid of the hardcoded |
For most pipelines 3-10. For rnaseq 10-20, for Sarek 200+
Yep, I've removed a few tests on the basis that the subworkflow covers the use case. The main reason for a pipeline level test is a big parameter like
I can't actually remember why we didn't do this in the first place 🤔 |
OK so
But turns out we can just remove it and it retrieves it from the |
That number for Sarek sounds excessive, but would clearly argue against your proposed flat structure, then? At least if we are talking about so many files in a single folder....one might also not want to run each of them every time, so some sort of easy subset mechanism would be desirable. I don't know about
Appreciated, and I agree that integration tests are paramount! Yet, a single |
I like! Not sure if there will be too many snaps one day, but I think we cross that bridge when we get there.
Yeah this is how long hic took me as well. I'm wondering if we make a compromise and just snapshot the featurecounts output or something? It's far enough down stream that any changes will get caught. I also find myself copying the same list of things to snapshot and assert across files. I wonder if we could drop them in |
You can use tags, names or paths to select nf-test files. I originally grouped them into directories ( Regarding snapshots, I'm going to work on that some other time. But yes, some form of specific snapshot will be needed. For now, we just want to recreate the existing pipeline tests. |
OK my decision so far, let's go with this flat structure. Individual pipeline developers can create some more granularity with tags/directories/naming if they like, we won't enforce a very strict structure here. |
Changes:
The key question is, how do we want to organise the pipeline level tests for pipelines with lots of tests?
Answers below please...
PR checklist
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).nextflow run . -profile debug,test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).