Skip to content

Commit

Permalink
lint all components recursively in test.yml tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Jul 26, 2023
1 parent ac5c587 commit 241ba4c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nf_core/subworkflows/lint/subworkflow_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import logging
import os
from pathlib import Path

import yaml

Expand Down Expand Up @@ -53,7 +54,7 @@ def subworkflow_tests(_, subworkflow):
with open(subworkflow.test_yml, "r") as fh:
test_yml = yaml.safe_load(fh)

# Verify that tags are correct
# Verify that tags are correct. All included components in test main.nf should be specified in test.yml so pytests run for all of them
included_components = nf_core.subworkflows.SubworkflowTestYmlBuilder.parse_module_tags(
subworkflow, subworkflow.component_dir
)
Expand All @@ -75,6 +76,12 @@ def subworkflow_tests(_, subworkflow):
subworkflow.test_yml,
)
)
if component.startswith("subworkflows/"):
included_components += nf_core.subworkflows.SubworkflowTestYmlBuilder.parse_module_tags(
_,
Path(subworkflow.component_dir).parent.joinpath(component.replace("subworkflows/", "")),
)
included_components = list(set(included_components))

# Look for md5sums of empty files
for tfile in test.get("files", []):
Expand Down

0 comments on commit 241ba4c

Please sign in to comment.