Merge pull request #517 from exarkun/2908.towncrier

Configure and require towncrier for NEWS.rst maintenance
This commit is contained in:
Jean-Paul Calderone 2018-08-07 10:42:23 -04:00 committed by GitHub
commit cc3897a49d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 68 additions and 0 deletions

View File

@ -4,6 +4,7 @@
User-Visible Changes in Tahoe-LAFS
==================================
.. towncrier start line
Release 1.13.0 (05-August-2018)
'''''''''''''''''''''''''''''''

0
newsfragments/.gitignore vendored Normal file
View File

1
newsfragments/2908.other Normal file
View File

@ -0,0 +1 @@
Tahoe-LAFS now uses towncrier to maintain the NEWS file.

View File

@ -268,6 +268,7 @@ setup(name="tahoe-lafs", # also set in __init__.py
"pytest-twisted",
"hypothesis >= 3.6.1",
"treq",
"towncrier",
],
"tor": [
"foolscap[tor] >= 0.12.5",

48
towncrier.pyproject.toml Normal file
View File

@ -0,0 +1,48 @@
[tool.towncrier]
package = "allmydata"
package_dir = "src"
filename = "NEWS.rst"
directory = "newsfragments"
start_string = ".. towncrier start line"
title_format = "Release {version} ({project_date})"
issue_format = "`#{issue} <https://github.com/tahoe-lafs/tahoe-lafs/issues/{issue}>`_"
underlines = [
"'",
"-",
"~",
]
[[tool.towncrier.type]]
directory = "incompat"
name = "Backwards Incompatible Changes"
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 = "installation"
name = "Dependency/Installation Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "configuration"
name = "Configuration Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "removed"
name = "Removed Features"
showcontent = true
[[tool.towncrier.type]]
directory = "other"
name = "Other Changes"
showcontent = true

17
tox.ini
View File

@ -51,6 +51,23 @@ commands =
python misc/coding_tools/find-trailing-spaces.py -r src static misc setup.py
python misc/coding_tools/check-miscaptures.py
# With pip >= 10 the existence of pyproject.toml (which we are
# required to have to configure towncrier) triggers a "build
# isolation" mode which prevents anything from working. Avoid
# triggering that pip behavior by keeping the towncrier configuration
# somewhere else and only bringing it in when it's actually needed
# (after pip is done).
#
# Some discussion is available at
# https://github.com/pypa/pip/issues/5696
mv towncrier.pyproject.toml pyproject.toml
# If towncrier.check fails, you forgot to add a towncrier news
# fragment explaining the change in this branch. Create one at
# `newsfragments/<ticket>.<change type>` with some text for the news
# file. See pyproject.toml for legal <change type> values.
python -m towncrier.check
[testenv:deprecations]
setenv =
PYTHONWARNINGS=default::DeprecationWarning