initial addition of towncrier#2431
Conversation
|
@nicoddemus i noticed we manually pass the version everywhere, that kinda prevents automation |
What automation do you have in mind? I went with the approach of passing the version to the tasks because part of the tasks was about creating the tag. If you are thinking about automatically do the entire release after pushing a tag, I personally like the idea, but I think others are not so fan of it. |
nicoddemus
left a comment
There was a problem hiding this comment.
Overall excellent changes, thanks @RonnyPfannschmidt!
.github/PULL_REQUEST_TEMPLATE.md
Outdated
| * name it $issue_id.$type | ||
| * if you dont have an issue_id change it to the pr id after creating the pr | ||
| * type is one of removal, feature, bugfix, vendor, doc, trivial | ||
| - [ ] Target: for bbugfix, vendor, doc or trivial fixes, target `master`; for removals or features target `features`; |
There was a problem hiding this comment.
Also, ditto about formatting with monspaced font. 👍
There was a problem hiding this comment.
(Sorry if I sound pedantic here, it is just that this will be seen for everyone contributing from now on so I think it pays to be precise and clear)
.github/PULL_REQUEST_TEMPLATE.md
Outdated
| - [ ] Add a new news fragment into the news folder | ||
| * name it $issue_id.$type | ||
| * if you dont have an issue_id change it to the pr id after creating the pr | ||
| * type is one of removal, feature, bugfix, vendor, doc, trivial |
There was a problem hiding this comment.
I think it is worth formatting removal, feature etc in a monospaced font for emphasis.
.github/PULL_REQUEST_TEMPLATE.md
Outdated
|
|
||
| - [ ] Target: for bug or doc fixes, target `master`; for new features, target `features`; | ||
| - [ ] Add a new news fragment into the news folder | ||
| * name it $issue_id.$type |
There was a problem hiding this comment.
I would add a simple example:
* name it `$issue_id.$type` (for example `2369.bugfix`)
NEWS.rst
Outdated
| @@ -0,0 +1,6 @@ | |||
| 3.1.1.dev18+g17f6470 (2017-05-23) | |||
| ================== | |||
|
|
|||
There was a problem hiding this comment.
I think this doesn't show anything because of the doc change correct? Could you add a few dummy entries for bugfix, features, etc so we can spot any problems with the template?
There was a problem hiding this comment.
Shouldn't this file be CHANGELOG.rst given the configuration in pyproject.toml?
There was a problem hiding this comment.
nitpicking is graciously accepted and welcomed for changes like this one ^^
pyproject.toml
Outdated
| [tool.towncrier] | ||
| package = "pytest" | ||
| filename = "CHANGELOG.rst" | ||
| directory = "news/" |
There was a problem hiding this comment.
Small suggestion: since we are calling it CHANGELOG, perhaps this directory should be changes/? I don't feel strongly about it, just a thought.
There was a problem hiding this comment.
good thinking, i started by copying from pip and did indeed miss some details
tasks/generate.py
Outdated
| @invoke.task(help={ | ||
| 'version': 'version being released', | ||
| }) | ||
| def changelog_update(ctx, version): |
There was a problem hiding this comment.
Perhaps you can have a single changelog command, with a --draft option instead of two commands?
There was a problem hiding this comment.
makes sense as well, in that case we should not have a draft option, but a write option in order to opt in instead of out
i think i should invoke the write version from the prerelease step
| fix problems like typo corrections or such. | ||
| To add a new change log entry, please see | ||
| https://pip.pypa.io/en/latest/development/#adding-a-news-entry | ||
| we named the news folder changelog |
There was a problem hiding this comment.
Did you plan to run this once with some dummy entries for review only? Then before merging you can discard that commit (like I did with the pre-release tasks).
There was a problem hiding this comment.
@nicoddemus im planning to open a own pr against my branch and refer it here
|
|
||
| {% endif %} | ||
| {% if sections[section] %} | ||
| {% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %} |
There was a problem hiding this comment.
Just to make sure, is this an ordered dict sorted by the order the categories appear in the pyproject.toml file?
There was a problem hiding this comment.
my understandign is, that it is ordered
| 'version': 'version being released', | ||
| 'write_out': 'write changes to the actial changelog' | ||
| }) | ||
| def changelog(ctx, version, write_out=False): |
There was a problem hiding this comment.
Did you mean to call this from the pre_release tag?
There was a problem hiding this comment.
yes, i got sidetracked because it looked like invoke can run dependent taks, bt it cant pass dependent data along with them, so its useless
|
Just realized this: I think we should run |
|
Any updates on this? Looking forward to have this live! 😀 |
|
@nicoddemus its working now - see https://github.com/RonnyPfannschmidt/pytest/pull/1/files |
.github/PULL_REQUEST_TEMPLATE.md
Outdated
| - [ ] Add a new news fragment into the changelog folder | ||
| * name it `$issue_id.$type` for example (588.bug) | ||
| * if you dont have an issue_id change it to the pr id after creating the pr | ||
| * type is one of `removal`, `feature`, `bugfix`, `vendor`, `doc`, `trivial` |
There was a problem hiding this comment.
Final nitpick before merging, I think we should add:
* Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."
To ensure a consistent-looking changelog.
Also the bullet points in here themselves could use the same treatment. 😉
|
Except for my last nitpick regarding the text in the issue template, this LGTM and ready for merging. Would you like to rebase before merging? Excited to see this live. 👍 |
05620b4 to
b74c626
Compare
|
Awesome. Will merge as soon as CI passes. |
fixes #2390 but still needs to integrate towncrier into release drafting