Skip to content

Commit

Permalink
ENH: Add towncrier for management of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Feb 10, 2024
1 parent 7ef2f4e commit ff85d89
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
0.6.1 (2023-09-11)
----------------------------
------------------

Bug Fixes
^^^^^^^^^
Expand All @@ -18,7 +18,7 @@ Other Changes and Additions
- ``asv`` now uses Github Actions exclusively for Windows and Linux

0.6.0 (2023-08-20)
----------------------------
------------------

New Features
^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+condaChannels.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``conda-forge`` is no longer a default channel for ``mamba``. (#1373)
2 changes: 2 additions & 0 deletions changelog.d/+matrixReq.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed a bug where ``matrix`` requirements were dropped if an environment file
was specified. (#1373)
1 change: 1 addition & 0 deletions changelog.d/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
2 changes: 2 additions & 0 deletions changelog.d/1372.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The ``mamba`` plugin works correctly for newer versions (>=1.5) of
``libmambapy``
2 changes: 2 additions & 0 deletions changelog.d/1373.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The ``mamba`` plugin respects the ``MAMBARC`` environment if set, taking
channels and channel priority from the file in the environment variable.
26 changes: 26 additions & 0 deletions changelog.d/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Usage

`towncrier` is used for keeping track of the changelog. The relevant configuration aspects are:
- Each file can be formatted using reST
- The contents are rendered in bullets
- Each file should be labeled with the corresponding **pull request**, e.g. `NUM.TYPE.rst`
+ Where there is no clear corresponding pull request, `+` can be used instead of `NUM`

For mapping the types to headings, the following table can be used:


| **TYPE** | **Heading** |
| feat | New Features |
| api | API Changes |
| bugfix | Bug Fixes |
| misc | Other Changes and Additions |

## Release


```bash
# View the changes
towncrier build --draft --version 0.6.2 --date "$(date -u +%Y-%m-%d)"
# Modify CHANGES.rst
towncrier build --version 0.6.3 --date "$(date -u +%Y-%m-%d)"
```
25 changes: 25 additions & 0 deletions towncrier.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tool.towncrier]
directory = "changelog.d"
filename = "CHANGES.rst"
underlines = ["-", "^", "~"]
wrap = true

[[tool.towncrier.type]]
directory = "feat"
name = "New Features"
showcontent = true

[[tool.towncrier.type]]
directory = "api"
name = "API Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name = "Other Changes and Additions"
showcontent = true

0 comments on commit ff85d89

Please sign in to comment.