diff --git a/CHANGELOG.md b/CHANGELOG.md index 8925b1aa..6bd7cda8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## [Unreleased] ### Added - +* Make developer documentation optional [#467](https://github.com/NLeSC/python-template/pull/541) * 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) diff --git a/copier/questions/features.yml b/copier/questions/features.yml index d7a72924..e1ef00f7 100644 --- a/copier/questions/features.yml +++ b/copier/questions/features.yml @@ -50,3 +50,8 @@ AddCodeConduct: type: bool default: "{{ template_profile != 'minimum' }}" help: Add code of conduct? +AddDevDoc: + when: "{{ template_profile == 'ask' }}" + type: bool + default: "{{ template_profile != 'minimum' }}" + help: Add developer documentation? diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja index 41c66f05..03296187 100644 --- a/template/CONTRIBUTING.md.jinja +++ b/template/CONTRIBUTING.md.jinja @@ -31,7 +31,9 @@ The sections below outline the steps in each case. 1. (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue; 1. (**important**) wait until some kind of consensus is reached about your idea being a good idea; 1. if needed, fork the repository to your own Github profile and create your own feature branch off of the latest main commit. While working on your feature branch, make sure to stay up to date with the main branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/)); +{% if AddDevDoc -%} 1. install dependencies (see the [development documentation](README.dev.md#development_install)); +{%- endif %} 1. make sure the existing tests still work by running ``pytest``; 1. add your own tests (if necessary); 1. update or expand the documentation; diff --git a/template/next_steps.md.jinja b/template/next_steps.md.jinja index 8d0aa499..152b7d52 100644 --- a/template/next_steps.md.jinja +++ b/template/next_steps.md.jinja @@ -38,9 +38,11 @@ A short while after you push your commits to GitHub for the first time, a few is automatically ([here]({{repository_url}}/issues?q=author%3Aapp%2Fgithub-actions)). Resolve them to complete the setup of your repository. +{% if AddDevDoc -%} ## Project development documentation The [README.dev.md](README.dev.md) contains developer documentation. +{%- endif %} ## Project layout explained diff --git a/template/README.dev.md.jinja b/template/{% if AddDevDoc %}README.dev.md{% endif %}.jinja similarity index 100% rename from template/README.dev.md.jinja rename to template/{% if AddDevDoc %}README.dev.md{% endif %}.jinja