Skip to content

Commit

Permalink
Merge pull request #2558 from mashehu/fix-swf-tags
Browse files Browse the repository at this point in the history
parse include statement for plugin/nf-validation correctly
  • Loading branch information
mashehu authored Dec 7, 2023
2 parents 59d50b9 + 00e57b5 commit 43bd070
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nf_core/components/nfcore_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ def _get_included_components(self, main_nf: Union[Path, str]):
#'../../../modules/nf-core/hisat2/align/main'
#'../bam_sort_stats_samtools/main'
#'../subworkflows/nf-core/bam_sort_stats_samtools/main'
#'plugin/nf-validation'
component = line.strip().split()[-1].split(self.org)[-1].split("main")[0].strip("/")
component = component.replace("'../", "subworkflows/")
component = component.replace("'", "")
included_components.append(component)
return included_components

Expand Down
1 change: 1 addition & 0 deletions nf_core/subworkflows/lint/subworkflow_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def subworkflow_tests(_, subworkflow: NFCoreComponent):
included_components = []
if subworkflow.main_nf.is_file():
included_components = subworkflow._get_included_components(subworkflow.main_nf)
log.debug(f"Included components: {included_components}")
log.debug(f"Required tags: {required_tags}")
missing_tags = []
for tag in required_tags + included_components:
Expand Down

0 comments on commit 43bd070

Please sign in to comment.