-
-
Notifications
You must be signed in to change notification settings - Fork 11k
ENH: use towncrier to build the release note #13908
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
Conversation
I am wondering if we can do a tiny CI check to avoid bad file naming? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Lets not worry too much about some extra bells and whistles. It would be good to set this up to make it easier to merge some PRs and other things can be added later. @charris does this seem good to you?
doc/RELEASE_WALKTHROUGH.rst.txt
Outdated
@@ -38,6 +38,10 @@ to the maintenance branch, and later will be forward ported to master. | |||
Finish the Release Note | |||
----------------------- | |||
|
|||
.. note: | |||
|
|||
This has changed now that we use ``towncrier`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a bit cryptic without information on where to look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding the path to the README.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should definitely make for a better contributor workflow :)
changelog/README.rst
Outdated
If you are unsure what pull request type to use, don't hesitate to ask in your | ||
PR. | ||
|
||
Note that the ``towncrier`` tool will automatically reflow your text, so it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true for our template, so this should probably be removed -- you removed the automatic insertion of list items from the pytest template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing
It seems towncrier requires a |
setup.py
Outdated
@@ -364,7 +364,7 @@ def parse_setuppy_commands(): | |||
|
|||
|
|||
def setup_package(): | |||
src_path = os.path.dirname(os.path.abspath(sys.argv[0])) | |||
src_path = os.path.dirname(os.path.abspath(__file__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using pyproject.yaml
, setup.py
is now called via exec(compile(code, __file__, 'exec'), locals())
in python pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp6g6mz9bq
. Since it is not called directly on the command line in a subprocess but via exec
, sys.argv[0]
is no longer ./setup.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, just tracked down this too, but did not manage to quite get to the bottom of everything, maybe we can fix it tomorrow, or push towncrier to give an alternative toml file... (I commented on an issue there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks harmless to me - functions in setup.py
aren't public API, and any use-case involving symlinks to setup.py seems incredibly contrived
@@ -0,0 +1,60 @@ | |||
[build-system] | |||
# Minimum requirements for the build system to execute. | |||
requires = ["setuptools", "wheel", "cython"] # PEP 508 specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tempting to do the PEP 508 stuff in a separate PR, just to give it a little more visibility. This looks harmless, but it might be good to seed discussion about any further PEP508 changes
Adding the pyproject.toml file seemed non-controversial on the mailing list. Can this go in as-is? |
I have opened twisted/towncrier#156 which adds |
When #14053 goes in this will need a rebase |
OK, rebased and squashed this. Will likely merge soon. |
OK, I will merge this. happy to revert and clean up everything if someone is unhappy with that (sorry in that case). But there are a few PRs that I would like to get going, and they need release notes, so being unclear about how to write them best right now is not helpful. (EDIT: last push only removed bogus blank line from setup.py) |
Ok, I noticed that there is at least one typo and the final release notes are indented a bit funnily (template issue probably). These are small things and I will probably create a quick update PR soon. |
Hmmm, I am a bit disappointed. It seems to me that towncrier expects release notes to always come in a bullet point format. But we often have longer text and currently use a subheading format. And right now, I think I would prefer to keep it like that. I think I will look into pushing some fixes for that upstream... Does not need to stop us using it for the moment though, at least we cannot possibly run into issues with merge conflicts... |
Add infrastructure and instructions to use towncrier to build the release note from a directory of fragments.
python -mtowncrier --draft
(once there are some fragments in./changelog
) will preview the current release note status.Running
python -mtowncrier
will overwrite./doc/release/latest-note.rst
, delete all the fragments from./changelog
, and stage the changes for a git commit.A fragment is a file in
./changelog
with a name like139999.changes.rst
with a title line and content like