diff --git a/CHANGELOG.md b/CHANGELOG.md index f37e2030..8925b1aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Added +* Make Code of Conduct optional [#464](https://github.com/NLeSC/python-template/pull/530) * New YAML files for copier questions [#529](https://github.com/NLeSC/python-template/pull/529) * 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) diff --git a/copier/questions/features.yml b/copier/questions/features.yml index 00219087..d7a72924 100644 --- a/copier/questions/features.yml +++ b/copier/questions/features.yml @@ -45,3 +45,8 @@ AddSonarCloud: type: bool default: "{{ template_profile != 'minimum' }}" help: Add SonarCloud (code analysis service) integration? +AddCodeConduct: + when: "{{ template_profile == 'ask' }}" + type: bool + default: "{{ template_profile != 'minimum' }}" + help: Add code of conduct? diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja index 51a953b8..41c66f05 100644 --- a/template/CONTRIBUTING.md.jinja +++ b/template/CONTRIBUTING.md.jinja @@ -1,6 +1,6 @@ # Contributing guidelines -We welcome any kind of contribution to our software, from simple comment or question to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/). Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md). +We welcome any kind of contribution to our software, from simple comment or question to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/). {% if AddCodeConduct -%}Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).{%- endif %} A contribution can be one of the following cases: diff --git a/template/project_setup.md.jinja b/template/project_setup.md.jinja index 72e4be95..f3914fab 100644 --- a/template/project_setup.md.jinja +++ b/template/project_setup.md.jinja @@ -73,7 +73,7 @@ help you decide which tool to use for packaging. - `sonar-project.properties` is the SonarCloud [configuration](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) file - `.github/workflows/sonarcloud.yml` is the GitHub action workflow which performs the SonarCloud analysis -{%- endif -%} +{%- endif %} ## Package version number @@ -100,12 +100,14 @@ help you decide which tool to use for packaging. - To allow others to cite your software, add a `CITATION.cff` file - It only makes sense to do this once there is something to cite (e.g., a software release with a DOI). - Follow the [making software citable](https://guide.esciencecenter.nl/#/citable_software/making_software_citable) section in the guide. -{%- endif -%} +{%- endif %} +{% if AddCodeConduct -%} ## CODE_OF_CONDUCT.md - Information about how to behave professionally - [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/documentation?id=code-of-conduct) +{%- endif %} ## CONTRIBUTING.md diff --git a/template/CODE_OF_CONDUCT.md.jinja b/template/{% if AddCodeConduct %}CODE_OF_CONDUCT.md{% endif %}.jinja similarity index 100% rename from template/CODE_OF_CONDUCT.md.jinja rename to template/{% if AddCodeConduct %}CODE_OF_CONDUCT.md{% endif %}.jinja