Skip to content

Commit

Permalink
Revise sections of changelog and add new internal category (PlasmaP…
Browse files Browse the repository at this point in the history
…y#2441)

* Separate trivial and internal towncrier sections

* Put features section first

* Rename sections

* Rename section

* Add changelog entry

* Recategorize changelog entry

* Edit changelog: 2441.internal.rst

* Edit changelog: 2441.doc.rst

* Edit changelog: 2441.trivial.rst

* Delete two temporary changelog entries

* Change changelog category

* Edit changelog: 2441.doc.rst

* Changed a changelog entry from trivial to internal

* Update changelog guide

* Update error messages for missing changelog entries

* Update Giles incorrect changelog comments
  • Loading branch information
namurphy authored Feb 9, 2024
1 parent 49d309b commit 6aa9179
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
3 changes: 3 additions & 0 deletions changelog/2441.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Added the ``internal`` category for changelog entries, which will be used to denote
refactorings with minimal impact on the API, and updated the |changelog guide| to
reflect these changes.
File renamed without changes.
11 changes: 7 additions & 4 deletions changelog/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ pull request to PlasmaPy's ``main`` branch.
* ``bugfix``: For changes that fix bugs or problems with the code.
* ``doc``: For changes to the documentation.
* ``feature``: For new user-facing features and any new behavior.
* ``internal``: For refactoring of the internal mechanics of the code
and tests in ways that do not change the application user interface.
* ``removal``: For feature deprecation and/or removal.
* ``trivial``: For changes that have no user-facing effects.
* ``trivial``: For minor changes that do not change the application
programming interface.

Pull request `#1198 <https://github.com/PlasmaPy/PlasmaPy/pull/1198>`__
includes an update to the documentation, so the file should be named
Expand Down Expand Up @@ -98,9 +101,9 @@ Changelog guidelines
understandable to someone with limited familiarity of the package.

* Changelog entries are not required for changes that are sufficiently
minor, such as typo fixes. When this is the case, a package maintainer
will add the :guilabel`no changelog entry needed` label to the pull
request.
minor, such as typo fixes or fixed hyperlinks. When this is the case,
a package maintainer will add the :guilabel`no changelog entry needed`
label to the pull request.

* Use the past tense to describe the change, and the present tense to
describe how the functionality currently works.
Expand Down
27 changes: 16 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ enabled = true
changelog_skip_label = "no changelog entry needed"
help_url = "https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"
changelog_missing = "Missing changelog entry (see `changelog/README.rst`)"
changelog_missing_long = "This pull request needs a changelog entry at `changelog/NUMBER.TYPE.rst`, where `NUMBER` is the pull request number and `TYPE` is one of `feature`, `trivial`, `doc`, `bugfix`, `breaking`, or `removal`.\n\nFor details, see: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"
changelog_missing_long = "Please add a changelog entry at `changelog/NUMBER.TYPE.rst`, where `NUMBER` is the pull request number and `TYPE` is one of `feature`, `trivial`, `doc`, `internal`, `bugfix`, `breaking`, or `removal`.\n\nMinor pull requests, such as typo fixes and hyperlink updates, do not need a changelog entry.\n\nFor details, see: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"
verify_pr_number = true
number_incorrect = "Changelog entry number ≠ PR number (see `changelog/README.rst`)"
number_incorrect_long = "The changelog entry number does not match this pull request's number.\n\nWhen purposefully editing the changelog entry for a different pull request, set the 'no changelog entry needed' label to ignore this check."
type_incorrect = "Incorrect changelog type (see `changelog/README.rst`)"
type_incorrect_long = "The filename of the changelog entry must be of the form `changelog/NUMBER.TYPE.rst` where `TYPE` is one of `feature`, `trivial`, `doc`, `bugfix`, `breaking`, or `removal`.\n\nFor details, see: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"
type_incorrect_long = "The filename of the changelog entry must be of the form `changelog/NUMBER.TYPE.rst` where `TYPE` is one of `feature`, `trivial`, `doc`, `internal`, `bugfix`, `breaking`, or `removal`.\n\nFor details, see: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"

[tool.ruff]
target-version = "py310"
Expand Down Expand Up @@ -419,18 +419,23 @@ issue_format = ":pr:`{issue}`" # Despite the name mismatch, we use this for link
wrap = true

[[tool.towncrier.type]]
directory = "breaking"
name = "Backwards Incompatible Changes"
directory = "feature"
name = "New Features"
showcontent = true

[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
directory = "doc"
name = "Documentation Improvements"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Features"
directory = "breaking"
name = "Backwards Incompatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Planned Removals"
showcontent = true

[[tool.towncrier.type]]
Expand All @@ -439,11 +444,11 @@ name = "Bug Fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
directory = "internal"
name = "Internal Changes and Refactorings"
showcontent = true

[[tool.towncrier.type]]
directory = "trivial"
name = "Trivial/Internal Changes"
name = "Additional Changes"
showcontent = true

0 comments on commit 6aa9179

Please sign in to comment.