From 149a633dc80483ad98dd6870303c533f00eef36e Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 15:59:54 +0200 Subject: [PATCH 01/10] add year and the copyright owner to the generated Apache 2.0 license file --- template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja b/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja index 0183c52a..7d423b82 100644 --- a/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyy] [name of copyright owner] + Copyright {{ '%Y' | strftime }} {{ copyright_holder }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 6559729dfc34f5083baff4497f80a8e74583c356 Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 16:02:24 +0200 Subject: [PATCH 02/10] add year and the copyright owner to the generated GNU Public license v3 license file --- template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja index f288702d..31f55294 100644 --- a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }} This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From 16b3a04dfd6330a3f141eb8285e209d807be9460 Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 16:03:27 +0200 Subject: [PATCH 03/10] add year and the copyright owner to the generated Other license file --- template/{% if license == 'Other' %}LICENSE{% endif %}.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja b/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja index 8716c7ae..df35cc43 100644 --- a/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja @@ -1 +1 @@ -Add your own license +Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }} From 60775bf2b44178f8a814f7fa25ae59d42bfb2de8 Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 16:05:12 +0200 Subject: [PATCH 04/10] update the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd611f86..f43fa190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476) ### Changed +* license files includes year and copyright owner information [#629](https://github.com/NLeSC/python-template/pull/629) * added value field to license options [#617](https://github.com/NLeSC/python-template/pull/617) * fix filename typo of githooks [#611](https://github.com/NLeSC/python-template/pull/609) * next_steps.md is shown as a copier message [#609](https://github.com/NLeSC/python-template/pull/609) From 8f22f98e6fddc9339ed4b10c4e115c380691d944 Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 17:51:54 +0200 Subject: [PATCH 05/10] ask copyright holder in all profiles --- copier/questions/essential.yml | 5 +++++ copier/questions/package_details.yml | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/copier/questions/essential.yml b/copier/questions/essential.yml index 6bb14c7e..8c289443 100644 --- a/copier/questions/essential.yml +++ b/copier/questions/essential.yml @@ -42,3 +42,8 @@ license: Other (add your own license): value: Other default: "Apachev2" +copyright_holder: + type: str + placeholder: Netherlands eScience Center + help: Who is the copyright holder? + when: "{{ template_profile != 'minimum' and AddPackageDetails }}" diff --git a/copier/questions/package_details.yml b/copier/questions/package_details.yml index 79fdb68d..10874bd6 100644 --- a/copier/questions/package_details.yml +++ b/copier/questions/package_details.yml @@ -53,11 +53,7 @@ code_of_conduct_email: {% if not (code_of_conduct_email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %} Please enter a valid email address {% endif %} -copyright_holder: - type: str - placeholder: Netherlands eScience Center - help: Who is the copyright holder? - when: "{{ template_profile != 'minimum' and AddPackageDetails }}" + # calculated fields for GitHub repository: From a2459a2a5d4f3f481c6d9797063635b57cb83f9e Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 17:53:18 +0200 Subject: [PATCH 06/10] update the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f43fa190..91f3f572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476) ### Changed +* copyright owner is asked in all profiles [#629](https://github.com/NLeSC/python-template/pull/629) * license files includes year and copyright owner information [#629](https://github.com/NLeSC/python-template/pull/629) * added value field to license options [#617](https://github.com/NLeSC/python-template/pull/617) * fix filename typo of githooks [#611](https://github.com/NLeSC/python-template/pull/609) From 09574caa831afe2978a1359fa43058b5d7f5bdde Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Wed, 28 Aug 2024 17:54:51 +0200 Subject: [PATCH 07/10] add a validator to copyright holder --- copier/questions/essential.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/copier/questions/essential.yml b/copier/questions/essential.yml index 8c289443..82209113 100644 --- a/copier/questions/essential.yml +++ b/copier/questions/essential.yml @@ -46,4 +46,7 @@ copyright_holder: type: str placeholder: Netherlands eScience Center help: Who is the copyright holder? - when: "{{ template_profile != 'minimum' and AddPackageDetails }}" + validator: >- + {% if not copyright_holder %} + This field cannot be empty + {% endif %} From 9ffb7f185198d9afdef0cc796f2089fcbb923107 Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Mon, 2 Sep 2024 13:05:09 +0200 Subject: [PATCH 08/10] create the NOTICE file only for Apache license --- ...inja => {% if license == 'Apachev2' %}NOTICE{% endif %}.jinja} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename template/{NOTICE.jinja => {% if license == 'Apachev2' %}NOTICE{% endif %}.jinja} (100%) diff --git a/template/NOTICE.jinja b/template/{% if license == 'Apachev2' %}NOTICE{% endif %}.jinja similarity index 100% rename from template/NOTICE.jinja rename to template/{% if license == 'Apachev2' %}NOTICE{% endif %}.jinja From 5fbeee332daaf28a78ba21729a56d60c5c119a7f Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Mon, 2 Sep 2024 17:24:32 +0200 Subject: [PATCH 09/10] add year and copyright owner to GNU v3 --- template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja index 31f55294..63c5f3ef 100644 --- a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) + Copyright (C) {{ '%Y' | strftime }}, {{ copyright_holder }} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by From e5ad01071da15dcac958702de25702a18d4121c0 Mon Sep 17 00:00:00 2001 From: "Faruk D." Date: Mon, 2 Sep 2024 17:25:47 +0200 Subject: [PATCH 10/10] remove the comma in GNU v3 license --- template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja index 63c5f3ef..c0f825cd 100644 --- a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) {{ '%Y' | strftime }}, {{ copyright_holder }} + Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by