An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version
Project description
sphinxcontrib-towncrier
An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version.
How to use this?
$ pip install sphinxcontrib-towncrier
extensions = ['sphinxcontrib.towncrier']
# Options: draft/sphinx-version/sphinx-release
towncrier_draft_autoversion_mode = 'draft'
towncrier_draft_include_empty = True
towncrier_draft_working_directory = PROJECT_ROOT_DIR
# Not yet supported:
# towncrier_draft_config_path = 'pyproject.toml' # relative to cwd
Make sure to point to the dir with pyproject.toml and pre-configure towncrier itself in the config.
If everything above is set up correctly, you should be able to add
.. towncrier-draft-entries::
to your documents, like changelog.rst. With no argument, the version title will be generated using the strategy set up in the towncrier_draft_autoversion_mode setting.
If you want to be in control, override it with an argument you like:
.. towncrier-draft-entries:: |release| [UNRELEASED DRAFT]
Native RST substitutions in the argument work, just make sure to declare any non-default ones via rst_epilog or at the end of the document where the towncrier-draft-entries directive is being used.
Does anybody actually use this?
So far we know about two projects using sphinxcontrib-towncrier — ansible/pylibssh and pypa/pip. Also, this Sphinx extension is inspired by and somewhat based on the ideas used in pytest-dev/pytest and tox-dev/tox. We believe that these projects are full of wonderful tricks that you may want to explore regardless of whether you’ll use our project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinxcontrib-towncrier-0.2.1a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b15ee84aa6288173487988514b589155ef38ac6c55ab014a774102f9dc884f41 |
|
MD5 | b315d29674b2af992e98ef762bcc9de0 |
|
BLAKE2b-256 | e1a2b6e81fcff6d26ce8309a6a02f65c0dceca5e8a0aedf1c2ca2a9ecc516605 |
Hashes for sphinxcontrib_towncrier-0.2.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6fac6091a8ee12664d9b1f50a1504cb662380bf8d3bd0f267ebbf4483aa9c18 |
|
MD5 | ef2a8f25d40e3bd0d26b37a52438ebd7 |
|
BLAKE2b-256 | 844b1f991f50580667f4dc7d2cea4cccc816827f2ef5dd8d3845c1f178743423 |