From dc369ac03ba658bae7ce155e6e3b0366b0c01853 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 19 Dec 2024 15:36:45 +0100 Subject: [PATCH 1/5] LICENSE copyright to nf-core community, lint LICENSE file is a warning instead of a failure --- nf_core/pipeline-template/LICENSE | 2 +- nf_core/pipelines/lint/files_unchanged.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/LICENSE b/nf_core/pipeline-template/LICENSE index 9fc4e61c3..306087456 100644 --- a/nf_core/pipeline-template/LICENSE +++ b/nf_core/pipeline-template/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) {{ author }} +Copyright (c) The nf-core community Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/nf_core/pipelines/lint/files_unchanged.py b/nf_core/pipelines/lint/files_unchanged.py index 300b3674b..8f936acb9 100644 --- a/nf_core/pipelines/lint/files_unchanged.py +++ b/nf_core/pipelines/lint/files_unchanged.py @@ -62,6 +62,7 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]: passed: List[str] = [] failed: List[str] = [] + warned: List[str] = [] ignored: List[str] = [] fixed: List[str] = [] could_fix: bool = False @@ -173,6 +174,12 @@ def _tf(file_path: Union[str, Path]) -> Path: shutil.copy(_tf(f), _pf(f)) passed.append(f"`{f}` matches the template") fixed.append(f"`{f}` overwritten with template file") + elif f.name in ["LICENSE", "LICENSE.md", "LICENCE", "LICENCE.md"]: + # Report LICENSE as a warning since we are not using the mainfest.author names + # TODO: Lint the content of the LICENSE file except the line containing author names + # to allow for people to opt-in listing author/maintainer names instead of using the "nf-core community" + warned.append(f"`{f}` does not match the template") + could_fix = True else: failed.append(f"`{f}` does not match the template") could_fix = True @@ -217,4 +224,11 @@ def _tf(file_path: Union[str, Path]) -> Path: # cleaning up temporary dir shutil.rmtree(tmp_dir) - return {"passed": passed, "failed": failed, "ignored": ignored, "fixed": fixed, "could_fix": could_fix} + return { + "passed": passed, + "failed": failed, + "warned": warned, + "ignored": ignored, + "fixed": fixed, + "could_fix": could_fix, + } From 05b1f846960bcd43b3bdf3f0065101362df95b1e Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 19 Dec 2024 14:50:33 +0000 Subject: [PATCH 2/5] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01abde0a6..d5480f570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351)) - Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358)) +- set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) ### Download From e00679f1d1ee47fdbe29e30cb57fe780c1555cfe Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 19 Dec 2024 15:52:57 +0100 Subject: [PATCH 3/5] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5480f570..a281ba959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,14 @@ - Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351)) - Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358)) -- set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) +- Set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) ### Download ### Linting +- Linting of pipeline LICENSE file is a warning to allow for autor/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) + ### Modules - fix including modules.config ([#3356](https://github.com/nf-core/tools/pull/3356)) From 136418f0fd844a77c9aeb6f36f8f14f77bcf8bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 20 Dec 2024 10:06:27 +0100 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- CHANGELOG.md | 2 +- nf_core/pipelines/lint/files_unchanged.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a281ba959..39b937943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### Linting -- Linting of pipeline LICENSE file is a warning to allow for autor/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) +- Linting of pipeline LICENSE file is a warning to allow for author/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) ### Modules diff --git a/nf_core/pipelines/lint/files_unchanged.py b/nf_core/pipelines/lint/files_unchanged.py index 8f936acb9..c1c3acd31 100644 --- a/nf_core/pipelines/lint/files_unchanged.py +++ b/nf_core/pipelines/lint/files_unchanged.py @@ -175,7 +175,7 @@ def _tf(file_path: Union[str, Path]) -> Path: passed.append(f"`{f}` matches the template") fixed.append(f"`{f}` overwritten with template file") elif f.name in ["LICENSE", "LICENSE.md", "LICENCE", "LICENCE.md"]: - # Report LICENSE as a warning since we are not using the mainfest.author names + # Report LICENSE as a warning since we are not using the manifest.author names # TODO: Lint the content of the LICENSE file except the line containing author names # to allow for people to opt-in listing author/maintainer names instead of using the "nf-core community" warned.append(f"`{f}` does not match the template") From 304728c3ce41b7c932b8f4b2058868a1d165ece2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 20 Dec 2024 09:15:53 +0000 Subject: [PATCH 5/5] use pipeline team in license for non-nf-core pipelines --- nf_core/pipeline-template/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/LICENSE b/nf_core/pipeline-template/LICENSE index 306087456..29e40a04d 100644 --- a/nf_core/pipeline-template/LICENSE +++ b/nf_core/pipeline-template/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) The nf-core community +Copyright (c) {% if is_nfcore %} The nf-core community {% else %} The {{ short_name }} team {% endif %} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal