From 596695790c4fa480f6e8af5640e9c483ab25a458 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 1 Feb 2024 13:09:17 +0100 Subject: [PATCH 1/4] fix ignoring changes in partial template files --- nf_core/lint/files_unchanged.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/lint/files_unchanged.py b/nf_core/lint/files_unchanged.py index 399830faae..7f63973f16 100644 --- a/nf_core/lint/files_unchanged.py +++ b/nf_core/lint/files_unchanged.py @@ -176,7 +176,7 @@ def _tf(file_path: Union[str, Path]) -> Path: # Files that can be added to, but that must contain the template contents for files in files_partial: # Ignore if file specified in linting config - if any([f in ignore_files for f in files]): + if any([str(f) in ignore_files for f in files]): ignored.append(f"File ignored due to lint config: {self._wrap_quotes(files)}") # Ignore if we can't find the file From cffda640a6c1c4d2a37217b80bbad58765a7114e Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 1 Feb 2024 12:14:15 +0000 Subject: [PATCH 2/4] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aae1fecb69..a8d6f8eb8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Template +- fix ignoring changes in partial files ([#2722](https://github.com/nf-core/tools/pull/2722)) + ### Linting ### Modules From a6514457aa924121580e46df802362ca16d133f8 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 1 Feb 2024 13:16:34 +0100 Subject: [PATCH 3/4] fix changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d6f8eb8f..52f24f7da2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,14 @@ ### Template -- fix ignoring changes in partial files ([#2722](https://github.com/nf-core/tools/pull/2722)) - ### Linting ### Modules ### General +- fix ignoring changes in partially templated files (e.g. `.gitignore`) ([#2722](https://github.com/nf-core/tools/pull/2722)) + ## [v2.12.1 - Aluminium Wolf - Patch](https://github.com/nf-core/tools/releases/tag/2.12.1) - [2024-02-01] ### Linting From 9e219ebd623d467ab6c125d197acebb859710f73 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 1 Feb 2024 13:23:11 +0100 Subject: [PATCH 4/4] fix one more path --- nf_core/lint/files_exist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/lint/files_exist.py b/nf_core/lint/files_exist.py index 1bd6dba74c..ecd7bc4bbd 100644 --- a/nf_core/lint/files_exist.py +++ b/nf_core/lint/files_exist.py @@ -236,7 +236,7 @@ def pf(file_path: Union[str, Path]) -> Path: # Files that cause an error if they exist for file in files_fail_ifexists: - if file in ignore_files: + if str(file) in ignore_files: continue if pf(file).is_file(): failed.append(f"File must be removed: {self._wrap_quotes(file)}")