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

chore: introduce towncrier #471

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore: introduce towncrier #471

wants to merge 1 commit into from

Conversation

0xRAG
Copy link
Contributor

@0xRAG 0xRAG commented Feb 26, 2025

What changed?

This PR introduces towncrier to manage the AgentKit.py changelogs. While towncrier can support a monorepo setup, we currently do not treat the Python packages as a monorepo, so I decided to introduce towncrier to each Python package individually.

The following towncrier config options are modified:

filename = "CHANGELOG.md"    # What we currently use
directory = "changelog.d/"          # Standard used by some open source Python projects

[tool.towncrier.fragment.feature]
name = "Added"    # To align with our current changelog format

[tool.towncrier.fragment.bugfix]
name = "Fixed"    # To align with our current changelog format

Why?

Contributors can add independent changelog entries without having to worry about or deal with merge conflicts.

Maintainers can generate full changelogs with one command.

The intended contribution workflow is:

  • Developer makes a change to some code in a package
  • Developer runs poetry run towncrier create from the package folder with appropriate options to write a changelog entry
  • Developer checks in generated entry with their PR
  • Maintainer reviews the generated entry for version type and change content. Version type should be feature or bugfix (these are two of towncriers default types, and change content should be in past tense (e.g. "Added new feature", "Fixed the bug")

The release workflow is:

  • Maintainer runs poetry run towncrier which will consume changelog entries in .changelog.d/ and append to the CHANGELOG.md
  • Maintainer reviews the generated CHANGELOG.md for formatting and makes any changes necessary (for example adding a date to the release log line, if not present)
  • Maintainer bumps versions in the same way as they are done today
  • Maintainer opens PR with the result from above
  • Once merged, packages are released as they are today, using existing GitHub Actions

Next steps

  • Investigate tools similar changesets bot to automatically request contributors add a changeset

@0xRAG 0xRAG requested a review from murrlincoln as a code owner February 26, 2025 13:47
@github-actions github-actions bot added documentation Improvements or additions to documentation framework extension New framework extension needs triage labels Feb 26, 2025
CarsonRoscoe
CarsonRoscoe previously approved these changes Feb 26, 2025
Copy link
Contributor

@CarsonRoscoe CarsonRoscoe left a comment

Choose a reason for hiding this comment

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

Functionally and README wise, this LGTM, I am happy with this.

My one (minor) concern I want to raise is that towncrier has the user write the changelog info in vim. I think this is fine, if a user is technical enough to be contributing they should know how to i -> [type changes] -> esc:wq. But we need to acknowledge that we are adding a little bit of onboarding friction to contributors.

Base automatically changed from AGENT-190 to main February 26, 2025 20:34
@0xRAG 0xRAG dismissed CarsonRoscoe’s stale review February 26, 2025 20:34

The base branch was changed.

@cb-heimdall
Copy link

cb-heimdall commented Feb 26, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@0xRAG
Copy link
Contributor Author

0xRAG commented Feb 26, 2025

Functionally and README wise, this LGTM, I am happy with this.

My one (minor) concern I want to raise is that towncrier has the user write the changelog info in vim. I think this is fine, if a user is technical enough to be contributing they should know how to i -> [type changes] -> esc:wq. But we need to acknowledge that we are adding a little bit of onboarding friction to contributors.

That's a good point, and depends on how the user initiates towncrier. If they follow the guide in the contributing, they won't have to enter vim, as they will specify the changelog in a command line argument. Will keep an eye on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation framework extension New framework extension
Development

Successfully merging this pull request may close these issues.

3 participants