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
File details
Details for the file sphinxcontrib-towncrier-0.4.0a0.tar.gz
.
File metadata
- Download URL: sphinxcontrib-towncrier-0.4.0a0.tar.gz
- Upload date:
- Size: 49.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b1513fc07781432dd3a0b2ca797cfe0e99e9b5bc5e5c8bf112d5d142afb6dc |
|
MD5 | e96e884929059f69874437acdcfe5453 |
|
BLAKE2b-256 | 59169a4f64b0de8040ef1ac6efa37da0469e0c421c6f8116919de013271e9962 |
Provenance
File details
Details for the file sphinxcontrib_towncrier-0.4.0a0-py3-none-any.whl
.
File metadata
- Download URL: sphinxcontrib_towncrier-0.4.0a0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec734e3d0920e2ce26e99681119f398a9e1fc0aa6c2d7ed1f052f1219dcd4653 |
|
MD5 | 5fba5ba36d9c45891a6ce5cf5a002f98 |
|
BLAKE2b-256 | 0b48e35ff6134f72f11e7c369c20ab6d26bbd5202f56bf2f2cd9c8da40228cd0 |