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.ext']
# 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.3.1a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32b3f34f514f793b1fc4372256915b6c17668fc16b549ea30524f5c28a5e2f7e |
|
MD5 | 4bc0f1ae064289faf99ced94c6e49fe4 |
|
BLAKE2b-256 | cec8fc82f8c5d2ef233e648dae39498aeea27fe477eb372312172555677b49d0 |
Hashes for sphinxcontrib_towncrier-0.3.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98496b46f893db5aaa380ecc890ee542367e281ad41f7ea382cab7597329e12 |
|
MD5 | dc86ac819cb4f1eecd7ba11449ca381d |
|
BLAKE2b-256 | 3468e226f8ef8d091c4f26d1eb9150f95ca163e750cfc9a90a9dac51c43cc304 |