Skip to content
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

Clean up pipeline tests #438

Merged
merged 8 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:

jobs:
test:
name: ${{ matrix.tags }} ${{ matrix.profile }} NF-${{ matrix.NXF_VER }}
name: ${{ matrix.tags }} | ${{ matrix.profile }} | NF-${{ matrix.NXF_VER }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -60,10 +60,15 @@ jobs:
python-version: "3.11"
architecture: "x64"

- name: Install pdiff to see diff between nf-test snapshots
run: |
python -m pip install --upgrade pip
pip install pdiff
- name: Cache pdiff
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
id: cache-pip-pdiff
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-pdiff

- name: Install pdiff
run: python -m pip install --upgrade pip pdiff cryptography

- name: Run nf-test
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#433](https://github.com/genomic-medicine-sweden/nallo/pull/433) - Updated docs and README.
- [#434](https://github.com/genomic-medicine-sweden/nallo/pull/434) - Updated the SVDB merge module to fix unstable CALL_SVS tests
- [#435](https://github.com/genomic-medicine-sweden/nallo/pull/435) - Updated and refactored processes and workflows related to variant ranking
- [#438](https://github.com/genomic-medicine-sweden/nallo/pull/438) - Updated pipeline tests to use functions in nft-utils instead of checking hardcoded paths
- [#440](https://github.com/genomic-medicine-sweden/nallo/pull/440) - Updated hifiasm to 0.20 with new default parameters for telomeres and scaffolding ([#295](https://github.com/genomic-medicine-sweden/nallo/issues/295))

### `Removed`
Expand All @@ -77,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#382](https://github.com/genomic-medicine-sweden/nallo/pull/382) - Fixed broken links and formatting in documentation
- [#393](https://github.com/genomic-medicine-sweden/nallo/pull/393) - Fixed minimap2 preset for ONT data being overwritten to `map-ont` when it should have been `lr:hq`, due to different settings in index and alignment processes [#392](https://github.com/genomic-medicine-sweden/nallo/issues/392)
- [#402](https://github.com/genomic-medicine-sweden/nallo/pull/402) - Fixed double sample names in HiFiCNV output
- [#438](https://github.com/genomic-medicine-sweden/nallo/pull/438) - Fixed missing/malformed software versions in `ADD_FOUND_IN_TAG`, `ADD_MOST_SEVERE_CSQ`, `ADD_MOST_SEVERE_PLI`, `SAMPLESHEET_PED`, `SOMALIER_PED` and `TRGT`

### Parameters

Expand Down
4 changes: 2 additions & 2 deletions modules/local/add_found_in_tag/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ process ADD_FOUND_IN_TAG {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
gawk: \$(awk -Wversion | sed '1!d; s/.*Awk //; s/,.*//')
busybox-awk: \$(awk 2>&1 | sed -n 's/.*v\\([^ ]*\\) (.*/\\1/p')
END_VERSIONS
"""

Expand All @@ -90,7 +90,7 @@ process ADD_FOUND_IN_TAG {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
gawk: \$(awk -Wversion | sed '1!d; s/.*Awk //; s/,.*//')
busybox-awk: \$(awk 2>&1 | sed -n 's/.*v\\([^ ]*\\) (.*/\\1/p')
END_VERSIONS
"""
}
338 changes: 329 additions & 9 deletions modules/local/add_found_in_tag/tests/main.nf.test.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/local/add_most_severe_consequence.nf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ process ADD_MOST_SEVERE_CSQ {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
add_most_severe_consequence: v1.0
add_most_severe_consequence: 1.0
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/local/add_most_severe_pli.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ process ADD_MOST_SEVERE_PLI {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
add_most_severe_pli: v1.0
add_most_severe_pli: 1.0
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/local/create_pedigree_file/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ process CREATE_PEDIGREE_FILE {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
create_pedigree_file: v1.0
create_pedigree_file: 1.0
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/local/trgt/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ process TRGT {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
trgt: \$(echo \$(trgt -V) | sed 's/TRGT //' )
trgt: \$(echo \$(trgt -V) | sed 's/trgt //' )
END_VERSIONS
"""
}
Expand Down
17 changes: 11 additions & 6 deletions nf-test.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
config {
// location for all nf-tests
testsDir "."
// nf-test directory including temporary files for each test
workDir System.getenv("NFT_WORKDIR") ?: ".nf-test"
// location of an optional nextflow.config file specific for executing tests
configFile "conf/test.config"
// run all test with defined profile(s) from the main nextflow.config
profile "test,docker"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you specify test,docker as the default profile here but only test in the tests themselves. I think, they should either be consistent or you set the profile only here. (Also, I don't know which one takes precedence)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I'll remove the profile part from the tests, and updated this to only profile "test".

// Include plugins
plugins {
load "[email protected]"
load "[email protected]"
load "[email protected]"
load "[email protected]"
}
testsDir "."
workDir ".nf-test"
configFile "tests/nextflow.config"
profile "docker"

}
Loading
Loading