-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
initial addition of towncrier #2431
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| initial addition of towncrier |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix issue with non-ascii contents in doctest text files. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix encoding errors for unicode warnings in Python 2. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| {% for section in sections %} | ||
| {% set underline = "-" %} | ||
| {% if section %} | ||
| {{section}} | ||
| {{ underline * section|length }}{% set underline = "~" %} | ||
|
|
||
| {% endif %} | ||
| {% if sections[section] %} | ||
| {% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my understandign is, that it is ordered |
||
|
|
||
| {{ definitions[category]['name'] }} | ||
| {{ underline * definitions[category]['name']|length }} | ||
|
|
||
| {% if definitions[category]['showcontent'] %} | ||
| {% for text, values in sections[section][category]|dictsort(by='value') %} | ||
| - {{ text }}{% if category != 'vendor' %} ({{ values|sort|join(', ') }}){% endif %} | ||
|
|
||
| {% endfor %} | ||
| {% else %} | ||
| - {{ sections[section][category]['']|sort|join(', ') }} | ||
|
|
||
|
|
||
| {% endif %} | ||
| {% if sections[section][category]|length == 0 %} | ||
|
|
||
| No significant changes. | ||
|
|
||
|
|
||
| {% else %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% else %} | ||
|
|
||
| No significant changes. | ||
|
|
||
|
|
||
| {% endif %} | ||
| {% endfor %} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| [tool.towncrier] | ||
| package = "pytest" | ||
| filename = "CHANGELOG.rst" | ||
| directory = "changelog/" | ||
| template = "changelog/_template.rst" | ||
|
|
||
| [[tool.towncrier.type]] | ||
| directory = "removal" | ||
| name = "Deprecations and Removals" | ||
| showcontent = true | ||
|
|
||
| [[tool.towncrier.type]] | ||
| directory = "feature" | ||
| name = "Features" | ||
| showcontent = true | ||
|
|
||
| [[tool.towncrier.type]] | ||
| directory = "bugfix" | ||
| name = "Bug Fixes" | ||
| showcontent = true | ||
|
|
||
| [[tool.towncrier.type]] | ||
| directory = "vendor" | ||
| name = "Vendored Libraries" | ||
| showcontent = true | ||
|
|
||
| [[tool.towncrier.type]] | ||
| directory = "doc" | ||
| name = "Improved Documentation" | ||
| showcontent = true | ||
|
|
||
| [[tool.towncrier.type]] | ||
| directory = "trivial" | ||
| name = "Trivial Changes" | ||
| showcontent = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
|
|
||
| from __future__ import print_function | ||
|
|
||
| import subprocess | ||
| import glob | ||
| import sys | ||
|
|
||
| sys.exit(subprocess.call([ | ||
| 'rst-lint', '--encoding', 'utf-8', | ||
| 'CHANGELOG.rst', 'HOWTORELEASE.rst', 'README.rst', | ||
| ] + glob.glob('changelog/[0-9]*.*'))) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,9 +96,10 @@ def devpi_upload(ctx, version, user, password=None): | |
| '(if not given assumed logged in)', | ||
| }) | ||
| def pre_release(ctx, version, user, password=None): | ||
| """Generates new docs, release announcements and uploads a new release to devpi for testing.""" | ||
| """Generates new docs, release announcements and uploads a new release to devpi for testing.""" | ||
| announce(ctx, version) | ||
| regen(ctx) | ||
| changelog(ctx, version, write_out=True) | ||
|
|
||
| msg = 'Preparing release version {}'.format(version) | ||
| check_call(['git', 'commit', '-a', '-m', msg]) | ||
|
|
@@ -146,3 +147,16 @@ def publish_release(ctx, version, user, pypi_name): | |
| print(' ', ','.join(emails)) | ||
| print() | ||
| print('And announce it on twitter adding the #pytest hash tag.') | ||
|
|
||
|
|
||
| @invoke.task(help={ | ||
| 'version': 'version being released', | ||
| 'write_out': 'write changes to the actial changelog' | ||
| }) | ||
| def changelog(ctx, version, write_out=False): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you mean to call this from the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| if write_out: | ||
| addopts = [] | ||
| else: | ||
| addopts = ['--draft'] | ||
| check_call(['towncrier', '--version', version] + addopts) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| invoke | ||
| tox | ||
| gitpython | ||
| 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.
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.
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
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.
Sounds good! 👍