Skip to content

Commit 03be1ed

Browse files
committed
📝💅 Split trivial change log category into 3
The new change note types are `packaging`, `contrib` and `misc`. `packaging` is intended for the audience of downstream redistributors. The `contrib` notes are meant to be documenting news affecting the project contributors, their development, and processes. Finally, `misc` is for things that don't fit anywhere but are still desired to be documented for some reason.
1 parent 45a89ec commit 03be1ed

File tree

3 files changed

+65
-6
lines changed

3 files changed

+65
-6
lines changed

.pre-commit-config.yaml

+35-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,41 @@ repos:
6666
- id: changelogs-rst
6767
name: changelog filenames
6868
language: fail
69-
entry: 'changelog files must be named ####.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst'
70-
exclude: changelog/(\d+\.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst|README.rst|_template.rst)
69+
entry: >-
70+
changelog files must be named
71+
####.(
72+
breaking
73+
| deprecation
74+
| feature
75+
| improvement
76+
| bugfix
77+
| vendor
78+
| doc
79+
| packaging
80+
| contrib
81+
| misc
82+
)(.#)?(.rst)?
83+
exclude: >-
84+
(?x)
85+
^
86+
changelog/(
87+
\.gitignore
88+
|\d+\.(
89+
breaking
90+
|deprecation
91+
|feature
92+
|improvement
93+
|bugfix
94+
|vendor
95+
|doc
96+
|packaging
97+
|contrib
98+
|misc
99+
)(\.\d+)?(\.rst)?
100+
|README\.rst
101+
|_template\.rst
102+
)
103+
$
71104
files: ^changelog/
72105
- id: py-deprecated
73106
name: py library is deprecated

changelog/README.rst

+13-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,22 @@ Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
2020
* ``deprecation``: feature deprecation.
2121
* ``breaking``: a change which may break existing suites, such as feature removal or behavior change.
2222
* ``vendor``: changes in packages vendored in pytest.
23-
* ``trivial``: fixing a small typo or internal change that might be noteworthy.
23+
* ``packaging``: notes for downstreams about unobvious side effects
24+
and tooling. changes in the test invocation considerations and
25+
runtime assumptions.
26+
* ``contrib``: stuff that affects the contributor experience. e.g.
27+
Running tests, building the docs, setting up the development
28+
environment.
29+
* ``misc``: changes that are hard to assign to any of the above
30+
categories.
2431

2532
So for example: ``123.feature.rst``, ``456.bugfix.rst``.
2633

34+
.. tip::
35+
36+
See :file:`pyproject.toml` for all available categories
37+
(``tool.towncrier.type``).
38+
2739
If your PR fixes an issue, use that number here. If there is no issue,
2840
then after you submit the PR and get the PR number you can add a
2941
changelog using that instead.

pyproject.toml

+17-3
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,23 @@ name = "Improved documentation"
423423
showcontent = true
424424

425425
[[tool.towncrier.type]]
426-
# Changes that might not even be worth exposing to the end users.
427-
directory = "trivial"
428-
name = "Trivial/internal changes"
426+
# Notes for downstreams about unobvious side effects and tooling. Changes
427+
# in the test invocation considerations and runtime assumptions.
428+
directory = "packaging"
429+
name = "Packaging updates and notes for downstreams"
430+
showcontent = true
431+
432+
[[tool.towncrier.type]]
433+
# Stuff that affects the contributor experience. e.g. Running tests,
434+
# building the docs, setting up the development environment.
435+
directory = "contrib"
436+
name = "Contributor-facing changes"
437+
showcontent = true
438+
439+
[[tool.towncrier.type]]
440+
# Changes that are hard to assign to any of the above categories.
441+
directory = "misc"
442+
name = "Miscellaneous internal changes"
429443
showcontent = true
430444

431445
[tool.mypy]

0 commit comments

Comments
 (0)