Skip to main content

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

Project description

SWUbanner sphinxcontrib-towncrier @ PyPI GitHub Actions CI/CD build status — Python package sphinxcontrib-towncrier coverage charts @ Covecov.io Documentation Status @ RTD

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


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.3.2a0.tar.gz (46.8 kB view details)

Uploaded Source

Built Distribution

sphinxcontrib_towncrier-0.3.2a0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for sphinxcontrib-towncrier-0.3.2a0.tar.gz
Algorithm Hash digest
SHA256 7cf18ac9c13533fffdb794dab278c6ad845f8c85bfa56942eba077d543885fa6
MD5 526001d726cbf26063b7f85eba5c4ef2
BLAKE2b-256 8fbc66fd79cc6a9b515dd41c97722b0b85e9fe87ad924423e8ae44da9dc635a0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for sphinxcontrib_towncrier-0.3.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 74fc27a24231b56f1e4820a5dcb121a8c69aa6b6a0d2367c61144b9673ebf73a
MD5 f751831921eefacd87531db3538530e2
BLAKE2b-256 42cbddc3f45ba4d883f186693053919d627fc9d115c9a81780fc4aaf04d1a82f

See more details on using hashes here.

Provenance

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