I have a question about stub runs. I added stub se...
# nostupidquestions
d
I have a question about stub runs. I added stub sections to each local module of nf-core/ampliseq in github.com/nf-core/ampliseq/pull/1142, but I thought I might need more. My aim is to have faster tests (and requiring almost no resources) for AI-powered development. To improve testing, I would like to have a possibility to use nf-test with stub runs of the complete pipeline and check against a snapshot. Do other pipeline use end-to-end stub runs with snapshot matching? If yes, I could take one of those as example. Maybe we have a docu in nf-core that I missed? I feel like thats a stupid question that I should know the anwer to already (but I dont), so I put it here.
m
At least as far as I’m aware stub tests only create empty output files by nf-core convention. This does create a limitation that content based execution doesn’t fire, but there is nothing stopping us from changing that convention and outputting a minimal file that could trigger downstream execution based on content.
d
The stub runs in ampliseq as in the above mentioned PR do work (when circumventing the pipeline’s safeguard for empty files). But I realized that the main aim of stub runs in end-to-end pipeline runs (as I would like to run them), i.e. making sure that channels work, must test that a module indeed is used and not skipped because a channel is suddenly empty (and no error is produced). So I would need to check e.g. produced files (or at least a version entry) with a snapshot. Otherwise the stub test is too easily passing but pipeline behavior changes, I think. There seems to be no info in the nf-core docs to it. I found meanwhile github.com/nf-core/metatdenovo/blob/…/stub.nf.test that seems to largely do what I want to. Maybe I do something similar…
Investigating more, it seems you are right, empty files can have problematic effects. I think I’ll look into the route of metatdenovo more.
As feedback, if anyone ever searches for that: It turned out that the empty files in stubs were in some cases a show stopper, in some not. But the coverage is still not bad. It was implemented here and limitations are detailed here.