tools icon indicating copy to clipboard operation
tools copied to clipboard

maintain anchors in pytest_modules.yml

Open mirpedrol opened this issue 3 years ago • 1 comments

When adding subworkflows, we need to add anchors in pytest_modules.yml to link subworkflows with their modules. When loading the yml file with pyyaml anchors are removed. Here we change to using ruamel.yaml to maintain anchors.

👀 Aliases (*) need to be added to pytests_modules.yml file

abacas:
  - modules/abacas/**
  - tests/modules/abacas/**

subworkflows/bam_stats_samtools: &subworkflows_bam_stats_samtools
  - subworkflows/nf-core/bam_stats_samtools/**
  - tests/subworkflows/nf-core/bam_stats_samtools/**

__anchors__:
  - *subworkflows_bam_stats_samtools

⚠️ Now the indenting is lost. Needs to be fixed in nf_core.utils.custom_yaml_dumper()

PR checklist

  • [ ] This comment contains a description of changes (with reason)
  • [ ] CHANGELOG.md is updated
  • [ ] If you've fixed a bug or added code that should be tested, add tests!
  • [ ] Documentation in docs is updated

mirpedrol avatar Sep 23 '22 14:09 mirpedrol

Codecov Report

Merging #1836 (53e6ee2) into dev (75143a4) will decrease coverage by 4.49%. The diff coverage is n/a.

:exclamation: Current head 53e6ee2 differs from pull request most recent head 3c62df4. Consider uploading reports for the commit 3c62df4 to get more accurate results

@@            Coverage Diff             @@
##              dev    #1836      +/-   ##
==========================================
- Coverage   69.25%   64.75%   -4.50%     
==========================================
  Files          59       34      -25     
  Lines        7148     4100    -3048     
==========================================
- Hits         4950     2655    -2295     
+ Misses       2198     1445     -753     
Impacted Files Coverage Δ
nf_core/modules/create.py
nf_core/lint/merge_markers.py
nf_core/create.py
nf_core/modules/bump_versions.py
nf_core/lint/actions_schema_validation.py
nf_core/modules/modules_json.py
nf_core/modules/list.py
nf_core/utils.py
nf_core/lint/actions_awstest.py
nf_core/modules/module_test.py
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 23 '22 15:09 codecov[bot]

I am closing this as we are now using tags to handle subworkflows testing instead of anchors

mirpedrol avatar Oct 19 '22 08:10 mirpedrol