-
Notifications
You must be signed in to change notification settings - Fork 714
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
Snapshot content of version files instead of a hash #6505
Comments
How exactly would we assert for the versions then? I tried something like this:
We might need to adapt the linting or snapshot both md5 and the content. Otherwise this error occurs:
Of course only if we do not assert
Maybe there is a more elegant way? |
Luckily, we make the rules of the linter so we can ignore any errors like that and fix it right after we settle on a standard! I like Ideally I'd love for it to look like "sarscov2 [fasta_gz] - paired-end sorted bam": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test_ALEoutput.txt:md5,4abcbd60ae1dbf78138c97e5fed97f3e"
]
],
"1": [
"versions.yml:md5,949da9c6297b613b50e24c421576f3f1"
],
"ale": [
[
{
"id": "test",
"single_end": false
},
"test_ALEoutput.txt:md5,4abcbd60ae1dbf78138c97e5fed97f3e"
]
],
- "versions": [
- "versions.yml:md5,949da9c6297b613b50e24c421576f3f1"
- ]
+ "versions": {
+ "ale": "20180904"
+ }
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-03-19T09:06:19.589167"
}, |
I think we could write a lib function for this, either in this repo or the nf-test/utils plugin. Two other things to consider:
|
I definitely support snapshoting the version information itself, think that is much clearer than the md5sum. The stub test could get the versions, it only needs to be once, that sounds reasonable. And every module should have a stub and stub test (eventually), so sounds good to me. |
There's a function for yaml files in nf-test(that may have snuck in with 0.9.0) https://www.nf-test.com/docs/assertions/files/ |
Magic line is:
|
Currently we're snapshoting the versions.yml and getting a hash:
modules/modules/nf-core/ale/tests/main.nf.test.snap
Lines 26 to 28 in 17b8bed
The text was updated successfully, but these errors were encountered: