Skip to content

Commit

Permalink
Merge pull request #1378 from HaoZeke/addTowncrier
Browse files Browse the repository at this point in the history
ENH,MAINT: Add towncrier
  • Loading branch information
mattip committed Feb 10, 2024
2 parents 2a632a7 + cf4fa77 commit a9e1703
Show file tree
Hide file tree
Showing 8 changed files with 173 additions and 139 deletions.
253 changes: 114 additions & 139 deletions CHANGES.rst

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions changelog.d/+condaChannels.bugfix.rst
@@ -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
@@ -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
@@ -0,0 +1 @@
!.gitignore
2 changes: 2 additions & 0 deletions changelog.d/1372.bugfix.rst
@@ -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
@@ -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
@@ -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
@@ -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 a9e1703

Please sign in to comment.