| 1 |
# Fragments for the changelog |
| 2 |
|
| 3 |
This directory contains fragments for the future [NEWS](../NEWS.md) file. |
| 4 |
|
| 5 |
## Introduction |
| 6 |
|
| 7 |
We use <code>[towncrier]</code> to produce useful, summarized news files. |
| 8 |
|
| 9 |
There are 3 sections types: |
| 10 |
|
| 11 |
- API: `changes/api` |
| 12 |
- Tools: `changes/tools` |
| 13 |
- Build System: `changes/build` |
| 14 |
|
| 15 |
There are 4 news fragments types: |
| 16 |
|
| 17 |
- Breaking changes: `.breaking` |
| 18 |
- Deprecated: `.deprecated` |
| 19 |
- New: `.feature` |
| 20 |
- Fixes: `.bugfix` |
| 21 |
|
| 22 |
[towncrier]: https://pypi.org/project/towncrier/ |
| 23 |
|
| 24 |
## Adding a fragment |
| 25 |
|
| 26 |
Add a short description of the change in a file `changes/SECTION/ID.FRAGMENT.md`, |
| 27 |
where: |
| 28 |
|
| 29 |
- `SECTION` and `FRAGMENT` values are described in the [previous section](#introduction). |
| 30 |
- `ID` is the corresponding issue identifier on Github, if relevant. If there is |
| 31 |
no such issue, then `ID` should start with `+` and some identifier that make |
| 32 |
the file unique in the directory. |
| 33 |
|
| 34 |
Examples: |
| 35 |
- A _bug fix_ for the _issue #463_ is an _API_ change, so the corresponding file |
| 36 |
should be named `changes/api/463.bugfix.md`. |
| 37 |
- A _new feature_ for _tools_ like #448 corresponds to e.g. |
| 38 |
`changes/tools/+add-verbose-opt.feature.md`. |
| 39 |
|
| 40 |
Guidelines for the fragment files: |
| 41 |
|
| 42 |
- Use the [Markdown] markup. |
| 43 |
- Use past tense, e.g. “Fixed a segfault”. |
| 44 |
- Look at the previous releases [NEWS](../NEWS.md) file for further examples. |
| 45 |
|
| 46 |
[Markdown]: https://daringfireball.net/projects/markdown/ |
| 47 |
|
| 48 |
## Build the changelog |
| 49 |
|
| 50 |
Install <code>[towncrier]</code> from Pypi: |
| 51 |
|
| 52 |
```bash |
| 53 |
python3 -m pip install towncrier |
| 54 |
``` |
| 55 |
|
| 56 |
Then build the changelog: |
| 57 |
|
| 58 |
```bash |
| 59 |
# Only check the result. Useful after adding a new fragment. |
| 60 |
towncrier build --draft --version 1.8.0 |
| 61 |
# Write the changelog & delete the news fragments |
| 62 |
towncrier build --yes --version 1.8.0 |
| 63 |
``` |