Sateesh_Peri
12/09/2024, 4:34 AM$meta.id -> ${meta.id}
2. Ternary operators to be clearly separated on new lines starting with ? & :
old
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/abritamr:1.0.14--pyhdfd78af_0':
'biocontainers/abritamr:1.0.14--pyhdfd78af_0' }"
new
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/b6/b6078836553c48db86c8a1d126ca764bc812b11aaeb7222299fe7be3a06ed68e/data'
: 'community.wave.seqera.io/library/abritamr:6aee07e42fbc9d88' }"
3. For nf-test assertions, instead of process.out which results in output elements captured twice in the snapshot (indexed & named), capture each output element explicitly. This might be a bit more work but, it also makes sure that the test creator is conscious of the output being captured in the snapshot and easily manipulate channels that are non-deterministic and also result in only one set of capture i.e., named
old
{ assert snapshot(process.out).match() }
new
{ assert snapshot(
process.out.matches,
process.out.partials,
process.out.virulence,
process.out.out,
process.out.txt,
process.out.versions,
path(process.out.versions[0]).yaml
).match() },
4. Along with process.out.versions also capture the version number of the tool explicitly in the snapshot with path(process.out.versions[0]).yaml. This is to help a reviewer with quick and easy validation that the version in environment.yml matches with the one captured in snapshot and helps with easy reviews during version bumps
old
[
"versions.yml:md5,763ada34dd99832aebcc535acacdc3d1"
],
new
[
"versions.yml:md5,763ada34dd99832aebcc535acacdc3d1"
],
{
"ABRITAMR_RUN": "1.0.19"
}
5. All modules to have STUB and - stub tests - mandatory
These were some thoughts I had in mind to achieve more consistency across modules. example implementation PR here. We might be already doing some of these but, would be nice to get consensus and update PR review guidelines accordinglymashehu
12/09/2024, 7:43 AM? to make them easier to identify and understand, see this deep dive from prettier (it’s about nested ones, but holds true here as well I think) https://prettier.io/blog/2023/11/13/curious-ternariesmashehu
12/09/2024, 7:49 AMmashehu
12/09/2024, 7:49 AMMaxime Garcia
12/09/2024, 8:07 AMMaxime Garcia
12/09/2024, 8:08 AMMaxime Garcia
12/09/2024, 8:09 AMMaxime Garcia
12/09/2024, 8:09 AMMaxime Garcia
12/09/2024, 8:10 AMNicolas Vannieuwkerke
12/09/2024, 8:25 AMJonathan Manning
12/09/2024, 11:01 AMSimon Pearce
12/09/2024, 12:59 PMpath(process.out.versions[0]).yaml, don't see any benefit from having the md5sum too.Edmund
12/11/2024, 3:26 PMMaxime Garcia
12/11/2024, 5:03 PMEdmund
12/11/2024, 5:25 PMMaxime Garcia
12/11/2024, 5:27 PMMaxime Garcia
12/11/2024, 5:28 PMSateesh_Peri
12/12/2024, 12:26 AM4. being just the yaml just that, we have to remove the lint warning for versions md5 not being thereMaxime Garcia
12/12/2024, 7:53 AMMaxime Garcia
12/12/2024, 7:53 AMSateesh_Peri
12/16/2024, 8:07 AMSateesh_Peri
12/16/2024, 8:10 AMprocess.out for now as publish outputs get updated
4. path(process.out.versions[0]).yaml is better. update tools lint check for this rather than versions md5
5. seems mandatory already
agree ?Famke Bäuerle
12/16/2024, 8:16 AMprocess.out ?Sateesh_Peri
12/16/2024, 8:20 AMprocess.out,
path(process.out.versions[0]).yamlFamke Bäuerle
12/16/2024, 9:12 AMSateesh_Peri
12/16/2024, 9:15 AMprocess.out should do ?Maxime Garcia
12/16/2024, 9:15 AMMaxime Garcia
12/16/2024, 9:16 AMEdmund
12/16/2024, 4:36 PMassertAll(
{nf-core-best-practices},
{assert somethingelse}
)
and the nf-core-best-practices is
process.out,
path(process.out.versions[0]).yamlEdmund
12/16/2024, 4:36 PMprocess.outSimon Pearce
12/19/2024, 9:59 AMassert process.success onto its own line, outside of the assertAll, so that if the module fails it doesn't try and compare the snapshots.