From 72c85eb013ef56e8eec26d1647ad3e6b17b9dd02 Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Fri, 23 Aug 2024 15:44:07 +0200 Subject: [PATCH 1/2] Add contributing question --- copier.yml | 6 ++++++ template/README.md.jinja | 2 ++ template/project_setup.md.jinja | 2 ++ ...% if AddContribution %}CONTRIBUTING.md{% endif %}.jinja} | 0 4 files changed, 10 insertions(+) rename template/{CONTRIBUTING.md.jinja => {% if AddContribution %}CONTRIBUTING.md{% endif %}.jinja} (100%) diff --git a/copier.yml b/copier.yml index f478764c..70ee6328 100644 --- a/copier.yml +++ b/copier.yml @@ -120,6 +120,12 @@ AddSonarCloud: default: "{{ template_profile != 'minimum' }}" help: Add SonarCloud (code analysis service) integration? +AddContributing: + when: "{{ template_profile == 'ask' }}" + type: bool + default: "{{ template_profile != 'minimum' }}" + help: Add contributing guidelines? + # internal fields _subdirectory: template diff --git a/template/README.md.jinja b/template/README.md.jinja index a85606c5..91669afd 100644 --- a/template/README.md.jinja +++ b/template/README.md.jinja @@ -48,10 +48,12 @@ python -m pip install . Include a link to your project's full documentation here. +{% if AddContributing -%} ## Contributing If you want to contribute to the development of {{ package_name }}, have a look at the [contribution guidelines](CONTRIBUTING.md). +{%- endif %} ## Credits diff --git a/template/project_setup.md.jinja b/template/project_setup.md.jinja index 72e4be95..15a58293 100644 --- a/template/project_setup.md.jinja +++ b/template/project_setup.md.jinja @@ -107,10 +107,12 @@ help you decide which tool to use for packaging. - Information about how to behave professionally - [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/documentation?id=code-of-conduct) +{% if AddContributing -%} ## CONTRIBUTING.md - Information about how to contribute to this software package - [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/documentation?id=contribution-guidelines) +{%- endif %} ## MANIFEST.in diff --git a/template/CONTRIBUTING.md.jinja b/template/{% if AddContribution %}CONTRIBUTING.md{% endif %}.jinja similarity index 100% rename from template/CONTRIBUTING.md.jinja rename to template/{% if AddContribution %}CONTRIBUTING.md{% endif %}.jinja From 8bbfa2c829fedb3640479d3b7fbca140bbef148b Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Fri, 23 Aug 2024 17:23:07 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2871540f..76442a72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased ### Added +* Make contributing guidelines optional [#465]() * Make zenodo next step instructions optional [#520](https://github.com/NLeSC/python-template/pull/520) * Make SonarCloud optional [#515](https://github.com/NLeSC/python-template/pull/515) * Make citation optional [#471](https://github.com/NLeSC/python-template/pull/471)