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

use towncrier to generate CHANGELOG #2607

Merged
merged 1 commit into from
Sep 11, 2022
Merged

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Sep 6, 2022

Uses towncrier to generate the CHANGELOG.

To see rendered CHANGELOG, see the netlify deploy preview at https://deploy-preview-2607--pyo3.netlify.app/main/changelog.html

@davidhewitt
Copy link
Member Author

davidhewitt commented Sep 6, 2022

TODO:

  • Update contributing guide
  • Update PR templates
  • Remove date from "Unreleased" header on rendered netlify build

@davidhewitt
Copy link
Member Author

I'm quite happy with how this works! Anyone got any concerns before I merge this?

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No concerns, just a small question, otherwise LGTM!

## Generate towncrier release notes

pip install towncrier
towncrier build --yes --version Unreleased --date TBC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When doing a new release, do we need to update this version argument?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not for the Netlify build which will always contain the latest not-yet-released changes.

We will however have to run towncrier build when creating a release which will remove the news fragments from version control after having merged their contents into the changelog.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, the release step to update the real CHANGELOG is manual.

I'm going to take a moment in the next week or two to make some notes on how to do releases, even though I hope to continue to be doing them for the foreseeable future!

@adamreichold
Copy link
Member

After reading the towncrier docs for a bit, this seems to mainly take care of writing the changelog, i.e. the formatting and parts of the editorial work, but will involve the same amount of additional work for developers making changes (meaning that in addition to the commit message, a news fragment which is basically the content part of a changelog item needs to be written).

To me this is certainly an improvement insofar it removes the Markdown busy work of keeping PyO3's high volume changelog in shape. But if this is automated at all, I would personally try to go for something that is based on the Git commit messages to reduce the number of steps involved in documenting changes. (Of course, it should not directly represent the commit log as the target audience is different, but it would be nice if it would derive the changelog item from the commit log using e.g. some mini language to use in the commit messages.)

@adamreichold
Copy link
Member

I also really like that towncrier nicely integrates with the existing work instead of forcing us to redo the changelog or have a legacy and current one.

@aganders3
Copy link
Contributor

This looks good to me, I'm glad it's working out!

@davidhewitt
Copy link
Member Author

But if this is automated at all, I would personally try to go for something that is based on the Git commit messages to reduce the number of steps involved in documenting changes.

I went back and forth on this (see #2509), the advantage of encouraging cleaner commit history would be nice.

However the drawback of coupling to git commits is I think it forces contributors to learn how to add their release notes even earlier else be forced to squash / rebase.

Also, being able to fix up typos in release notes in follow up PRs is a huge plus for me.

So overall I'm leaning towards this approach, and it sounds like everyone is generally happy with it, so will click merge now! Can easily revert / revisit later given this is just internal tooling 🙂

@adamreichold
Copy link
Member

However the drawback of coupling to git commits is I think it forces contributors to learn how to add their release notes even earlier else be forced to squash / rebase.

I agree that this is a significant drawback that I did not consider. I also very much agree that it is more useful to make thing easy for new contributors than to streamline things for the old hands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants