Skip to content

initial addition of towncrier#2431

Merged
nicoddemus merged 1 commit intopytest-dev:masterfrom
RonnyPfannschmidt:towncrier
May 30, 2017
Merged

initial addition of towncrier#2431
nicoddemus merged 1 commit intopytest-dev:masterfrom
RonnyPfannschmidt:towncrier

Conversation

@RonnyPfannschmidt
Copy link
Member

fixes #2390 but still needs to integrate towncrier into release drafting

@RonnyPfannschmidt
Copy link
Member Author

@nicoddemus i noticed we manually pass the version everywhere, that kinda prevents automation

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.347% when pulling c94c19a on RonnyPfannschmidt:towncrier into 17f6470 on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.347% when pulling 1fc257b on RonnyPfannschmidt:towncrier into 17f6470 on pytest-dev:master.

@nicoddemus
Copy link
Member

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.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Overall excellent changes, thanks @RonnyPfannschmidt!

* 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`;
Copy link
Member

Choose a reason for hiding this comment

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

typo, "bbugfix"

Copy link
Member

Choose a reason for hiding this comment

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

Also, ditto about formatting with monspaced font. 👍

Copy link
Member

Choose a reason for hiding this comment

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

(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)

- [ ] 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
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 it is worth formatting removal, feature etc in a monospaced font for emphasis.


- [ ] 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
Copy link
Member

Choose a reason for hiding this comment

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

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)
==================

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 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?

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this file be CHANGELOG.rst given the configuration in pyproject.toml?

Copy link
Member Author

Choose a reason for hiding this comment

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

nitpicking is graciously accepted and welcomed for changes like this one ^^

pyproject.toml Outdated
[tool.towncrier]
package = "pytest"
filename = "CHANGELOG.rst"
directory = "news/"
Copy link
Member

Choose a reason for hiding this comment

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

Small suggestion: since we are calling it CHANGELOG, perhaps this directory should be changes/? I don't feel strongly about it, just a thought.

Copy link
Member Author

Choose a reason for hiding this comment

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

good thinking, i started by copying from pip and did indeed miss some details

@invoke.task(help={
'version': 'version being released',
})
def changelog_update(ctx, version):
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps you can have a single changelog command, with a --draft option instead of two commands?

Copy link
Member Author

Choose a reason for hiding this comment

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

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

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.347% when pulling a49d954 on RonnyPfannschmidt:towncrier into 17f6470 on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.347% when pulling 02b2cde on RonnyPfannschmidt:towncrier into 17f6470 on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.347% when pulling fff5b09 on RonnyPfannschmidt:towncrier into 17f6470 on pytest-dev:master.

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
Copy link
Member

Choose a reason for hiding this comment

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

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).

Copy link
Member Author

Choose a reason for hiding this comment

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

@nicoddemus im planning to open a own pr against my branch and refer it here

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good! 👍


{% endif %}
{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %}
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure, is this an ordered dict sorted by the order the categories appear in the pyproject.toml file?

Copy link
Member Author

Choose a reason for hiding this comment

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

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):
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to call this from the pre_release tag?

Copy link
Member Author

Choose a reason for hiding this comment

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

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

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.347% when pulling 721df20 on RonnyPfannschmidt:towncrier into 17f6470 on pytest-dev:master.

@RonnyPfannschmidt
Copy link
Member Author

@nicoddemus
Copy link
Member

Just realized this: I think we should run rst-lint on the news snippets, what do you think?

@nicoddemus
Copy link
Member

Any updates on this? Looking forward to have this live! 😀

@RonnyPfannschmidt
Copy link
Member Author

@RonnyPfannschmidt RonnyPfannschmidt changed the title [dontmerge] initial addition of towncrier initial addition of towncrier May 30, 2017
- [ ] 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`
Copy link
Member

Choose a reason for hiding this comment

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

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. 😉

@nicoddemus
Copy link
Member

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. 👍

@nicoddemus
Copy link
Member

Awesome. Will merge as soon as CI passes.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.237% when pulling b74c626 on RonnyPfannschmidt:towncrier into 6117930 on pytest-dev:master.

@RonnyPfannschmidt RonnyPfannschmidt deleted the towncrier branch June 11, 2017 13:43
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.

Use automatic CHANGELOG management

3 participants