Skip to content

Commit

Permalink
πŸ“πŸ’„ Split the "process" change log entry to 3
Browse files Browse the repository at this point in the history
Previously, the change log had a section called "Process". And some of
the incoming pull requests would add change notes there when they
couldn't be put into other categories. Using it like that is not a
good idea. This patch rethinks the categorization and the audiences of
a few common change types and defines respective categories that
replace "Process".

The new categories are:

  * `packaging` -- news for downstream re-packagers

  * `contrib` -- news for regular project participants

  * `misc` -- public change log for things that don't fit anywhere but
    are useful

Resolves #12555
  • Loading branch information
webknjaz committed Jul 15, 2024
1 parent 1b8c1fd commit bbc6990
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 3 deletions.
39 changes: 37 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,44 @@ repos:
- id: news-fragment-filenames
name: NEWS fragment
language: fail
entry: NEWS fragment files must be named *.(process|removal|feature|bugfix|vendor|doc|trivial).rst
exclude: ^news/(.gitignore|.*\.(process|removal|feature|bugfix|vendor|doc|trivial).rst)
entry: >-
NEWS fragment files must be named
####.(
removal
|feature
|bugfix
|vendor
|doc
|packaging
|contrib
|misc
|trivial
)(.#)?(.rst)?
exclude: >-
(?x)
^
news/(
\.gitignore
|(\d+|[0-9a-f]{8}|[0-9a-f]{7}|[0-9a-f]{40}|\+[^.]+)\.(
removal
|feature
|bugfix
|vendor
|doc
|packaging
|contrib
|misc
|trivial
)(\.\d+)?(\.rst)?
|README\.rst
|\.towncrier-template\.rst\.j2
)
$
files: ^news/
types: []
types_or:
- file
- symlink

ci:
autofix_prs: false
Expand Down
18 changes: 18 additions & 0 deletions docs/html/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,24 @@ otherwise notable can be done using a ``news/<name>.process.rst`` file. This is
not typically used, but can be used for things like changing version schemes,
updating deprecation policy, etc.

Changes to the packaging metadata and tooling of pip itself should be documented
in :file:`news/{name}.packaging.rst` files. This can include notes for
downstreams about unobvious side effects and tooling, as well as changes in the
test invocation considerations and runtime assumptions.

When your change is something that influence how contributors and core
committers interact with the project, record that and actionable updates via a
:file:`news/{name}.contrib.rst` file. Stuff that affects the contributor
experience, like running tests, building the docs, setting up the development
environment would go here. It's useful for occasional contributors to learn the
gist of what's changed since the last time they were active.

If you feel like that your change would affect the end-users in noticeable ways
but it's difficult to assign any of the above categories to it, it is possible
to add a :file:`news/{name}.misc.rst` file to still present the change's effect
in the change log. Unlike :file:`news/{name}.trivial.rst` entries, this change
log fragment type will show up publicly in the released change log document.


Updating your branch
====================
Expand Down
28 changes: 28 additions & 0 deletions news/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
*
!.gitignore
!*.bugfix
!*.bugfix.rst
!*.bugfix.*.rst
!*.contrib
!*.contrib.rst
!*.contrib.*.rst
!*.doc
!*.doc.rst
!*.doc.*.rst
!*.feature
!*.feature.rst
!*.feature.*.rst
!*.misc
!*.misc.rst
!*.misc.*.rst
!*.packaging
!*.packaging.rst
!*.packaging.*.rst
!*.removal
!*.removal.rst
!*.removal.*.rst
!*.trivial
!*.trivial.rst
!*.trivial.*.rst
!*.trivial
!*.vendor.rst
!*.vendor.*.rst
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,19 @@ type = [
{ name = "Bug Fixes", directory = "bugfix", showcontent = true },
{ name = "Vendored Libraries", directory = "vendor", showcontent = true },
{ name = "Improved Documentation", directory = "doc", showcontent = true },
{ name = "Process", directory = "process", showcontent = true },

# Notes for downstreams about unobvious side effects and tooling. Changes
# in the test invocation considerations and runtime assumptions.
{ name = "Packaging updates and notes for downstreams", directory = "packaging", showcontent = true },

# Stuff that affects the contributor experience. e.g. Running tests,
# building the docs, setting up the development environment.
{ name = "Contributor-facing changes", directory = "contrib", showcontent = true },

# Changes that are hard to assign to any of the above categories.
{ name = "Miscellaneous internal changes", directory = "misc", showcontent = true },

# A way for the contributors to fool the changelog fragment presence check.
{ name = "Trivial Changes", directory = "trivial", showcontent = false },
]

Expand Down

0 comments on commit bbc6990

Please sign in to comment.