I'm currently looking into adding a project on nf-...
# nf-test
n
I'm currently looking into adding a project on nf-test development. Can you post your most urgent issues and feature requests in this thread? I'm having a hard time deciding what is important in the more than 100 issues of the repository 😁
I already added topic support to the list
m
topic is the first on my list
šŸ‘ 1
j
Better docs 😬
(e.g. when should we use
.get().get()
vs
[][]
n
Using
[]
is exactly the same as
.get()
. That's Java šŸ˜›
But I agree that the docs could use more examples and clarifications!
m
I only use
[][]
j
I only use
.get()
🫠
😁 1
Couple of useful, easy-to-implement things: • Global variable (like
$launchDir
) that refers to the main
.nf-test/
directory (rather than
.nf-test/tests/<hash>
) • This PR, or an equivalent but better implementation: https://github.com/askimed/nf-test/pull/330 Some things that are maybe more complicated: • Option to stage files for use in a test in a
stage { }
block, so that all tests in a file can use files that get staged once. Then you can refer to the variables in the input string with standard
${var}
notation? Bonus points if there are options for gzipping/ungzipping, etc.. • Running tests over a matrix of profiles/configs - this could be useful to avoid or separate e.g. conda tests from docker and singularity tests, where there are modules that don't support conda (leading to snapshot mismatch).
(oh, and document the
cleanup { }
block - it's currently a hidden feature)
party this 3
j
Fix the test coverage functionality?
n
Thanks! These are really helpful! I hope I won't be the only one in this project šŸ˜…
m
the bad warning message about a plugin not being installed
n
Good one!
j
Oh, on a similar note: an option to disable the warnings about dependent scripts not being available when starting nf-test would be nice. We are using nft-utils to temporarily install nf-core modules that our modules/subworkflows depend on, but this means that a bunch of Nextflow files we have don't actually exist in the workflow directory and so we get a bunch of ugly warnings, e.g.:
Copy code
Warning: Module /home/runner/work/nf-core-modules/nf-core-modules/subworkflows/sanger-tol/fasta_bam_scaffolding_yahs/tests/main.nf.test: Dependency '/home/runner/work/nf-core-modules/nf-core-modules/subworkflows/sanger-tol/fasta_bam_scaffolding_yahs/tests/../../../../modules/nf-core/samtools/view/main.nf' not found.
šŸ‘ 1
n
Also a good one! Is there an issue for this already?
j
I don't think there's an issue for anything I've suggested 🤣
I can make that a task for tomorrow if you want
n
That would be awesome!
j
Made issues for all my suggestions šŸ˜‡ • https://github.com/askimed/nf-test/issues/343 - fix dependency warnings • https://github.com/askimed/nf-test/issues/342 - matrix testing • https://github.com/askimed/nf-test/issues/341 - file staging • https://github.com/askimed/nf-test/issues/340 - global variable for
.nf-test/
dir • https://github.com/askimed/nf-test/issues/302 - document cleanup block
šŸ™Œ 1
m
out of curiosity: how difficult is the nf-test code base for somebody with very limited java knowledge?
n
I've not actually written any Java myself yet in there but it's medium level I'd say
Using AI to help you understand the codebase works pretty well though
m
I mainly wrote the nft-plugins using AI
Calling my JAVA knowledge limited would be very nice
šŸ˜† 1
To be fair, I did learn JAVA during my master degree. And I made a project using BioJava, but that was 2009, and I haven't really used JAVA since apart from whatever groovy I used in my nextflow libs and such