Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💅📝 Restructure the changelog for clarity #8066

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

webknjaz
Copy link
Member

This synchronizes the changelog setup from some other aio-libs projects.

Specifically, the new Towncrier fragment types are set up to be
bugfix, feature, deprecation, breaking, doc, packaging,
contrib, misc.

Previously, the misc fragments were rendered without the entry
context, just as a list of PR numbers. With this change, the change
note text is displayed as usual.

This also implements support for commits as change note references.
They are rendered separately. When there are several change note
fragment files symlinked, with numbers and commit hashes pointing to
the same changelog category, all of them are enumerated. PRs/issue
numbers a listed in a paragraph that is separate from the commit
links.

Are there changes in behavior for the user?

The changelog will be nicer.

Related issue number

N/A

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES/ folder
    • name it <issue_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

    • if you don't have an issue number, change it to the pull request
      number after creating the PR

      • .bugfix: A bug fix for something the maintainers deemed an
        improper undesired behavior that got corrected to match
        pre-agreed expectations.
      • .feature: A new behavior, public APIs. That sort of stuff.
      • .deprecation: A declaration of future API removals and breaking
        changes in behavior.
      • .breaking: When something public is removed in a breaking way.
        Could be deprecated in an earlier release.
      • .doc: Notable updates to the documentation structure or build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and tooling. Changes in the test invocation considerations and
        runtime assumptions.
      • .contrib: Stuff that affects the contributor experience. e.g.
        Running tests, building the docs, setting up the development
        environment.
      • .misc: Changes that are hard to assign to any of the above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      Use the past tense or the present tense a non-imperative mood,
      referring to what's changed compared to the last released version
      of this project.

This also implements support for commits as change note references.
They are rendered separately. When there are several change note
fragment files symlinked, with numbers and commit hashes pointing to
the same changelog category, all of them are enumerated. PRs/issue
numbers a listed in a paragraph that is separate from the commit
links.
@webknjaz webknjaz added enhancement documentation Improvements or additions to documentation infra backport-3.9 labels Jan 28, 2024
@webknjaz webknjaz requested a review from asvetlov as a code owner January 28, 2024 01:27
Copy link

codecov bot commented Jan 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a379e63) 97.48% compared to head (a2a4a92) 97.48%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8066   +/-   ##
=======================================
  Coverage   97.48%   97.48%           
=======================================
  Files         107      107           
  Lines       32600    32600           
  Branches     3800     3800           
=======================================
  Hits        31781    31781           
  Misses        616      616           
  Partials      203      203           
Flag Coverage Δ
CI-GHA 97.40% <ø> (ø)
OS-Linux 97.07% <ø> (ø)
OS-Windows 95.57% <ø> (ø)
OS-macOS 96.71% <ø> (-0.19%) ⬇️
Py-3.10.11 95.50% <ø> (ø)
Py-3.10.13 96.88% <ø> (ø)
Py-3.11.7 96.53% <ø> (-0.03%) ⬇️
Py-3.12.1 96.66% <ø> (ø)
Py-3.8.10 95.47% <ø> (ø)
Py-3.8.18 96.81% <ø> (ø)
Py-3.9.13 95.47% <ø> (ø)
Py-3.9.18 96.84% <ø> (-0.01%) ⬇️
Py-pypy7.3.15 96.40% <ø> (ø)
VM-macos 96.71% <ø> (-0.19%) ⬇️
VM-ubuntu 97.07% <ø> (ø)
VM-windows 95.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@webknjaz webknjaz force-pushed the docs/change-note-guidelines branch from 8cd09e2 to d1da933 Compare January 28, 2024 01:42
webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Jan 28, 2024
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Jan 28, 2024
Specifically, the new Towncrier fragment types are set up to be
`bugfix`, `feature`, `deprecation`, `breaking`, `doc`, `packaging`,
`contrib`, `misc`.

Previously, the `misc` fragments were rendered without the entry
context, just as a list of PR numbers. With this change, the change
note text is displayed as usual.
webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Jan 28, 2024
@webknjaz webknjaz force-pushed the docs/change-note-guidelines branch from d1da933 to 7ec9225 Compare January 28, 2024 01:59
@webknjaz webknjaz force-pushed the docs/change-note-guidelines branch from 7ec9225 to a2a4a92 Compare January 28, 2024 02:09
@webknjaz webknjaz merged commit cba3469 into aio-libs:master Jan 28, 2024
25 of 29 checks passed
Copy link
Contributor

patchback bot commented Jan 28, 2024

Backport to 3.9: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply cba3469 on top of patchback/backports/3.9/cba346995b953b23421079ee0bccdfe85d736e7a/pr-8066

Backporting merged PR #8066 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.9/cba346995b953b23421079ee0bccdfe85d736e7a/pr-8066 upstream/3.9
  4. Now, cherry-pick PR 💅📝 Restructure the changelog for clarity #8066 contents into that branch:
    $ git cherry-pick -x cba346995b953b23421079ee0bccdfe85d736e7a
    If it'll yell at you with something like fatal: Commit cba346995b953b23421079ee0bccdfe85d736e7a is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x cba346995b953b23421079ee0bccdfe85d736e7a
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR 💅📝 Restructure the changelog for clarity #8066 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.9/cba346995b953b23421079ee0bccdfe85d736e7a/pr-8066
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link
Contributor

patchback bot commented Jan 28, 2024

Backport to 3.10: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply cba3469 on top of patchback/backports/3.10/cba346995b953b23421079ee0bccdfe85d736e7a/pr-8066

Backporting merged PR #8066 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.10/cba346995b953b23421079ee0bccdfe85d736e7a/pr-8066 upstream/3.10
  4. Now, cherry-pick PR 💅📝 Restructure the changelog for clarity #8066 contents into that branch:
    $ git cherry-pick -x cba346995b953b23421079ee0bccdfe85d736e7a
    If it'll yell at you with something like fatal: Commit cba346995b953b23421079ee0bccdfe85d736e7a is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x cba346995b953b23421079ee0bccdfe85d736e7a
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR 💅📝 Restructure the changelog for clarity #8066 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.10/cba346995b953b23421079ee0bccdfe85d736e7a/pr-8066
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Jan 28, 2024
webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Jan 28, 2024
@webknjaz
Copy link
Member Author

webknjaz commented Jan 28, 2024

webknjaz added a commit that referenced this pull request Jan 28, 2024
…larity (#8067)

**This is a backport of PR #8066 as merged into master
(cba3469).**

PR #8066

(cherry picked from commit cba3469)

<!-- Thank you for your contribution! -->

## What do these changes do?

<!-- Please give a short brief about these changes. -->

## Are there changes in behavior for the user?

<!-- Outline any notable behaviour for the end users. -->

## Related issue number

<!-- Are there any issues opened that will be resolved by merging this
change? -->
<!-- Remember to prefix with 'Fixes' if it should close the issue (e.g.
'Fixes #123'). -->

## Checklist

- [ ] I think the code is well written
- [ ] Unit tests for the changes exist
- [ ] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
  * The format is &lt;Name&gt; &lt;Surname&gt;.
  * Please keep alphabetical order, the file is sorted by names.
- [ ] Add a new news fragment into the `CHANGES/` folder
  * name it `<issue_or_pr_num>.<type>.rst` (e.g. `588.bugfix.rst`)
  * if you don't have an issue number, change it to the pull request
    number after creating the PR
    * `.bugfix`: A bug fix for something the maintainers deemed an
      improper undesired behavior that got corrected to match
      pre-agreed expectations.
    * `.feature`: A new behavior, public APIs. That sort of stuff.
    * `.deprecation`: A declaration of future API removals and breaking
      changes in behavior.
    * `.breaking`: When something public is removed in a breaking way.
      Could be deprecated in an earlier release.
    * `.doc`: Notable updates to the documentation structure or build
      process.
    * `.packaging`: Notes for downstreams about unobvious side effects
      and tooling. Changes in the test invocation considerations and
      runtime assumptions.
    * `.contrib`: Stuff that affects the contributor experience. e.g.
      Running tests, building the docs, setting up the development
      environment.
    * `.misc`: Changes that are hard to assign to any of the above
      categories.
  * Make sure to use full sentences with correct case and punctuation,
    for example:
    ```rst
    Fixed issue with non-ascii contents in doctest text files
    -- by :user:`contributor-gh-handle`.
    ```

    Use the past tense or the present tense a non-imperative mood,
    referring to what's changed compared to the last released version
    of this project.
webknjaz added a commit that referenced this pull request Jan 28, 2024
…arity (#8068)

**This is a backport of PR #8066 as merged into master
(cba3469).**

PR #8066

(cherry picked from commit cba3469)

<!-- Thank you for your contribution! -->

## What do these changes do?

<!-- Please give a short brief about these changes. -->

## Are there changes in behavior for the user?

<!-- Outline any notable behaviour for the end users. -->

## Related issue number

<!-- Are there any issues opened that will be resolved by merging this
change? -->
<!-- Remember to prefix with 'Fixes' if it should close the issue (e.g.
'Fixes #123'). -->

## Checklist

- [ ] I think the code is well written
- [ ] Unit tests for the changes exist
- [ ] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
  * The format is &lt;Name&gt; &lt;Surname&gt;.
  * Please keep alphabetical order, the file is sorted by names.
- [ ] Add a new news fragment into the `CHANGES/` folder
  * name it `<issue_or_pr_num>.<type>.rst` (e.g. `588.bugfix.rst`)
  * if you don't have an issue number, change it to the pull request
    number after creating the PR
    * `.bugfix`: A bug fix for something the maintainers deemed an
      improper undesired behavior that got corrected to match
      pre-agreed expectations.
    * `.feature`: A new behavior, public APIs. That sort of stuff.
    * `.deprecation`: A declaration of future API removals and breaking
      changes in behavior.
    * `.breaking`: When something public is removed in a breaking way.
      Could be deprecated in an earlier release.
    * `.doc`: Notable updates to the documentation structure or build
      process.
    * `.packaging`: Notes for downstreams about unobvious side effects
      and tooling. Changes in the test invocation considerations and
      runtime assumptions.
    * `.contrib`: Stuff that affects the contributor experience. e.g.
      Running tests, building the docs, setting up the development
      environment.
    * `.misc`: Changes that are hard to assign to any of the above
      categories.
  * Make sure to use full sentences with correct case and punctuation,
    for example:
    ```rst
    Fixed issue with non-ascii contents in doctest text files
    -- by :user:`contributor-gh-handle`.
    ```

    Use the past tense or the present tense a non-imperative mood,
    referring to what's changed compared to the last released version
    of this project.
@webknjaz
Copy link
Member Author

@Dreamsorcerer with this update, we should be able to change the misc fragments to more accurate types. Also, there's another activity I started doing in other projects — checking the changelog draft and mass-correcting the writing style inconsistencies. Like, making the sentences complete, switching them to the past tense (or a present tense-based alternative referring to the changes since the previous release in a non-imperative mood; e.g. using phrasing like "X now does Y" etc). This helps make the resulting released change log section more coherent. Would you mind looking into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR documentation Improvements or additions to documentation enhancement infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant