Skip to content

Add towncrier README and config #14589

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

Closed
wants to merge 10 commits into from
Closed

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Jun 20, 2019

This is the start of a PR to do our changelog/what's new using towncrier. More info to follow...

@dstansby dstansby added this to the v3.2.0 milestone Jun 20, 2019
@tacaswell
Copy link
Member

👍 in principle.

@dstansby
Copy link
Member Author

When I get a little more time this will come with a proper description and email to dev mailing list.

@dstansby dstansby marked this pull request as ready for review June 25, 2019 17:05
@anntzer
Copy link
Contributor

anntzer commented Jun 25, 2019

Please consider moving the config to somewhere else than pyproject.toml (possible per twisted/towncrier#127), as that triggers specific pip behavior that's broken on some setups (pypa/pip#5317).

Copy link
Member

@pganssle pganssle left a comment

Choose a reason for hiding this comment

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

One other thing I'll note is that if you don't already have an easily-accessible guide to things like what tense these fragments will be in, whether they should have a period, etc, you should set that up ahead of time just to save everyone time.

I often end up having to correct the tenses or tweak these messages to make them understandable outside the context of the PR, and I always have to go through the old changelogs to figure out what tense / mood these patches are in (Is it "Added X" or "Adds X"...)

* ``api_chage``: A change which requires users to change code and is not
backwards compatible. (Not to be used for removal of deprecated features.)
* ``feature``: New user facing features and any new behavior.
* ``removal``: Removal of a deprecated part of the API.
Copy link
Member

Choose a reason for hiding this comment

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

It may be worth adding a misc category here. I find that a pretty significant fraction of my changelog.d files ends up being something like "changed tox.ini" or other miscellaneous stuff that isn't user-facing at all.

I currently don't actually have those misc entries go into the final changelog, but I'm considering putting them in under a <details> tag or something.

@pganssle
Copy link
Member

I can chime in to say that we've been doing this on dateutil and setuptools for some time now and it has been a major improvement in the workflow, at the cost of asking contributors to do a little more work ahead of time. A few things I would suggest:

  1. pip has a bot set up that automatically detects whether the news file is missing and requests that users add it if so. I recommend doing something similar.
  2. pip also has something set up with "stub" files for trivial changes that don't require a changelog. If you don't think your PR needs a changelog, you add an empty changelog file with the .trivial.rst ending to satisfy the bot. I've been considering using this. Another alternative is the way CPython does it, which is a label "Skip News" that core devs can apply to satisfy the bot.

One last thing to note is that I believe towncrier was developed for Twisted, which has a workflow that requires some slightly different matching between tickets and PRs. As a result, I find it somewhat annoying that my one-off PRs tend to require two commits (or at least two pushes), because I need to use the PR number in the stub for the issue. I have also occasionally had more than one PR for a single issue ticket in the same class, and I always forget how to work around that (if it's even possible). I don't find these annoying enough to not use towncrier, but it may be worth considering.

@pganssle
Copy link
Member

Please consider moving the config to somewhere else than pyproject.toml (possible per hawkowl/towncrier#127), as that triggers specific pip behavior that's broken on some setups (pypa/pip#5317).

I think it would be slightly better to add PEP 517 support for matplotlib (i.e. add a pyproject.toml file for the purpose it was intended). The biggest downsides I see to doing this are 1. installable edits will not use PEP 517 yet (it will fall back to the normal installation mode) and 2. pip does all PEP 517 builds in an isolated environment, which means you won't get any benefits from cached, incremental builds, which can be very annoying for big builds.

Not sure where the issue for tracking problem 2 is, but if it's a deal-breaker it's probably worth letting the pip developers know that, since eventually PEP 517 will be the only supported installation mechanism for pip, and this "opt-in" period is really to try and surface problems before they become major headaches for anyone.

@anntzer
Copy link
Contributor

anntzer commented Jun 25, 2019

I am all ears if you have a better suggestion as to how to better report 2) edit: the problem with install.user and pyproject.toml that I'm linking above, given that I opened the issue more than a year ago on the pip tracker, the issue has seen little activity, and at least from my personal POV it's definitely a blocker...

@dstansby
Copy link
Member Author

Please consider moving the config to somewhere else than pyproject.toml (possible per hawkowl/towncrier#127), as that triggers specific pip behavior that's broken on some setups (pypa/pip#5317).

@anntzer I've followed the links, and as far as I can tell this only works when calling towncrier from python (and not on the command line), am I missing something?

@anntzer
Copy link
Contributor

anntzer commented Jun 28, 2019

From https://github.com/hawkowl/towncrier/pull/127/files#diff-8495d47e3a84a0fc5cdb51fd186aafc4R25 you should just be able to call towncrier --pyproject=towncrier.toml (or whatever you call it)?

@jklymak
Copy link
Member

jklymak commented Jul 15, 2019

As discussed briefly on the call, it'd be nice if this was run during CI (however, that is done) so PR authors can see what this looks like...

@jklymak
Copy link
Member

jklymak commented Jul 16, 2019

I see you added a test entry. Where does the Changelog get rendered?

@dstansby
Copy link
Member Author

I see you added a test entry. Where does the Changelog get rendered?

I haven't worked out how to not use pyproject.toml yet, so doing the rendering is pending

@anntzer
Copy link
Contributor

anntzer commented Jul 18, 2019

Perhaps you can manually migrate a couple of currently existing whatsnews to changelog/ to make it easier to test this manually?

@dstansby
Copy link
Member Author

That's not the blocker, I don't think it's possible to have a custom towncrier config file at the moment, but I'm submitting a PR upstream to towncrier to fix that.

@anntzer
Copy link
Contributor

anntzer commented Jul 18, 2019

Ah, I see.
I would much prefer not using pyproject.toml (per the above), but if that turns out to be too complicated, I don't want to block the PR over that either.

@seberg
Copy link
Contributor

seberg commented Aug 8, 2019

So that we do not do all the work double. I have pinged the twisted mailing list about moving along towncrier, I hope that happens fairly soon. If not, I may indeed vendor a patched version into numpy (the pyproject.toml file is currently not my primary concern, but it may still come up and would be nice).

@dstansby
Copy link
Member Author

For reference this is waiting on twisted/towncrier#157 to go in to towncrier

@dstansby
Copy link
Member Author

Closing in favour of #15158

@dstansby dstansby closed this Sep 26, 2019
@QuLogic QuLogic modified the milestones: v3.3.0, unassigned Jul 9, 2020
@dstansby dstansby deleted the towncrier branch December 28, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants