Skip to content

Commit cbe034e

Browse files
committed
Make changelog optional
Fixes #462
1 parent 81fb2e2 commit cbe034e

6 files changed

Lines changed: 18 additions & 4 deletions

copier.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,15 @@ AddGitHubActions:
7777
default: "{{ template_profile != 'minimum' }}"
7878
help: GitHub actions to test the package and the documentation
7979

80+
AddChangeLog:
81+
when: "{{ template_profile == 'ask' }}"
82+
type: bool
83+
default: "{{ template_profile != 'minimum' }}"
84+
help: Add a change log to keep track of changes in the package
8085

8186
# internal fields
8287
_subdirectory: template
8388

84-
8589
# user messages
8690
_message_before_copy: |
8791
Thanks for generating a project using our template.

template/CONTRIBUTING.md.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ The sections below outline the steps in each case.
3535
1. make sure the existing tests still work by running ``pytest``;
3636
1. add your own tests (if necessary);
3737
1. update or expand the documentation;
38+
{% if AddChangeLog -%}
3839
1. update the `CHANGELOG.md` file with your change;
40+
{%- endif %}
3941
1. [push](http://rogerdudler.github.io/git-guide/) your feature branch to (your fork of) the {{ package_name }} repository on GitHub;
4042
1. create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/).
4143

@@ -47,7 +49,9 @@ To create a release you need write permission on the repository.
4749

4850
1. Check the author list in [`CITATION.cff`](CITATION.cff)
4951
1. Bump the version using `bump-my-version bump <major|minor|patch>`. For example, `bump-my-version bump major` will increase major version numbers everywhere it's needed (code, meta, etc.) in the repo. Alternatively the version can be manually changed in {{ package_name }}/__init__.py, pyproject.toml, CITATION.cff and docs/conf.py (and other places it was possibly added).
52+
{% if AddChangeLog -%}
5053
1. Update the `CHANGELOG.md` to include changes made
54+
{%- endif %}
5155
1. Go to the [GitHub release page]({{ repository_url }}/releases)
5256
1. Press draft a new release button
5357
1. Fill version, title and description field

template/README.dev.md.jinja

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ This section describes how to make a release in 3 parts:
133133

134134
### (1/3) Preparation
135135

136+
{% if AddChangeLog -%}
136137
1. Update the <CHANGELOG.md> (don't forget to update links at bottom of page)
137-
2. Verify that the information in [`CITATION.cff`](CITATION.cff) is correct.
138-
3. Make sure the [version has been updated](#versioning).
139-
4. Run the unit tests with `pytest -v`
138+
{%- endif %}
139+
1. Verify that the information in [`CITATION.cff`](CITATION.cff) is correct.
140+
1. Make sure the [version has been updated](#versioning).
141+
1. Run the unit tests with `pytest -v`
140142

141143
### (2/3) PyPI
142144

template/project_setup.md.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ help you decide which tool to use for packaging.
8585
- The project is set up with a logging example.
8686
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=logging)
8787

88+
{% if AddChangeLog -%}
8889
## CHANGELOG.md
8990

9091
- Document changes to your software package
9192
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/releases?id=changelogmd)
93+
{%- endif %}
9294

9395
## CITATION.cff
9496

template/pyproject.toml.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ publishing = [
7171
[project.urls]
7272
Repository = "{{ repository_url }}"
7373
Issues = "{{ repository_url }}/issues"
74+
{% if AddChangeLog -%}
7475
Changelog = "{{ repository_url }}/CHANGELOG.md"
76+
{%- endif %}
7577

7678
[tool.pytest.ini_options]
7779
testpaths = ["tests"]

template/CHANGELOG.md renamed to template/{% if AddChangeLog %}CHANGELOG.md{% endif %}

File renamed without changes.

0 commit comments

Comments
 (0)