New helper function `curlAndExtract` to help with ...
# nft-plugins
m
New helper function
curlAndExtract
to help with setting up databases before tests: https://github.com/nf-core/nft-utils/pull/55
👀 1
m
I like that
so we could actually remove the need to depend on the untar and unzip modules in our tests
party this 2
I actually started and stopped working on that idea, since it was not a priority for me cf https://github.com/nf-core/nft-utils/pull/29. But very glad to see that not only you found the time, but you implemented it WAY better than I would have
🙇 1
m
Some credits go to @Jim Downie who I saw was doing the `curl`+`tar` in pure Groovy in his tests, and separately implemented some nft-utils function with
ProcessBuilder
. All I had to do was piece things together (and TBH, GPT-5 did most of the leg work 😄 )
j
I would really love this to be a built-in option in nf-test... something like a
stage { }
block where you can stage files that can be shared across tests and refer to them as variables downstream
m
Using the function for regular module tests is a very good idea. It could simplify a lot
Copy code
$ find modules/ -name '*.test' | xargs grep -lw UNZIP | wc -l
16
$ find modules/ -name '*.test' | xargs grep -lw UNTAR | wc -l
107
stage {}
with a way of recording files/dirs so that they’re automatically cleaned up, without the developer having to write a
cleanup {}
block
party this 1
j
Tested, working well from my perspective!
🕺 1