From e7485b0ef789b09d86fc04fe843f5857c6a389e8 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 18 Nov 2025 12:43:25 +0100 Subject: [PATCH 1/2] modules lint: handle meta.ymls without topics field --- nf_core/modules/lint/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nf_core/modules/lint/__init__.py b/nf_core/modules/lint/__init__.py index 579bce05e6..0fb151e90a 100644 --- a/nf_core/modules/lint/__init__.py +++ b/nf_core/modules/lint/__init__.py @@ -303,6 +303,7 @@ def update_meta_yml_file(self, mod): if "output" in meta_yml: correct_outputs = self.obtain_outputs(mod.outputs) meta_outputs = self.obtain_outputs(meta_yml["output"]) + if "topics" in meta_yml: correct_topics = self.obtain_topics(mod.topics) meta_topics = self.obtain_topics(meta_yml["topics"]) @@ -370,7 +371,8 @@ def _find_meta_info(meta_yml, element_name, is_output=False) -> dict: corrected_meta_yml["output"][ch_name][i][element_name] = _find_meta_info( meta_yml["output"], element_name, is_output=True ) - elif "topics" in meta_yml and correct_topics != meta_topics: + + if "topics" in meta_yml and correct_topics != meta_topics: log.debug( f"Correct topics: '{correct_topics}' differ from current topics: '{meta_topics}' in '{mod.meta_yml}'" ) From 1543e096d21ca62ce00c730855f90cddf1248840 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 18 Nov 2025 11:48:04 +0000 Subject: [PATCH 2/2] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d902443d8e..9f1abd1996 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ - Add `topics` to the template + update linting ([#3779](https://github.com/nf-core/tools/pull/3779)) - Preserve the value of self.modules_repo across nested calls ([#3881](https://github.com/nf-core/tools/pull/3881)) +- modules lint: handle meta.ymls without topics field ([#3909](https://github.com/nf-core/tools/pull/3909)) ### Subworkflows