Skip to main content

An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version

Project description

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinxcontrib-towncrier-0.2.0a0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file sphinxcontrib-towncrier-0.2.0a0.tar.gz.

File metadata

  • Download URL: sphinxcontrib-towncrier-0.2.0a0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for sphinxcontrib-towncrier-0.2.0a0.tar.gz
Algorithm Hash digest
SHA256 31eed078e0a8b4c38dc30978dac8c53e2dfa7342ad8597d11816d1ea9ab0eabb
MD5 556b38e82f42426d6dcc61ad2303ef4d
BLAKE2b-256 267feac0bded47abc46909c53e32d615273b7463225be2af008bfa1736e9020e

See more details on using hashes here.

File details

Details for the file sphinxcontrib_towncrier-0.2.0a0-py3-none-any.whl.

File metadata

  • Download URL: sphinxcontrib_towncrier-0.2.0a0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for sphinxcontrib_towncrier-0.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd4295c0198e753d964e2c06ee4ecd91a73a8d103385d08af9b05487ae68dd0
MD5 31e953f3b81edd8ff975841833cbe798
BLAKE2b-256 db33fa0668c9647a271aa1534da6711a8b80616e2d457be391eebc6490e5ba4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page