Skip to main content

Provides simple Sphinx markup to render changelog displays.

Project description

PyPI PyPI - Python Version PyPI - Downloads

A Sphinx extension to generate changelog files.

This is an experimental, possibly-not-useful extension that’s used by the SQLAlchemy project and related projects.

Configuration

A sample configuration in conf.py looks like this:

extensions = [
            # changelog extension
            'changelog',

            # your other sphinx extensions
            # ...
        ]


# section names - optional
changelog_sections = ["general", "rendering", "tests"]

# tags to sort on inside of sections - also optional
changelog_inner_tag_sort = ["feature", "bug"]

# whether sections should be hidden from tags list
changelog_hide_sections_from_tags = False

# whether tags should be hidden from entries
changelog_hide_tags_in_entry = False

# how to render changelog links - these are plain
# python string templates, ticket/pullreq/changeset number goes
# in "%s"
changelog_render_ticket = "http://bitbucket.org/myusername/myproject/issue/%s"
changelog_render_pullreq = "http://bitbucket.org/myusername/myproject/pullrequest/%s"
changelog_render_changeset = "http://bitbucket.org/myusername/myproject/changeset/%s"

Usage

Changelog introduces the changelog and change directives:

====================
Changelog for 1.5.6
====================

.. changelog::
    :version: 1.5.6
    :released: Sun Oct 12 2008

    .. change::
        :tags: general
        :tickets: 27

      Improved the frobnozzle.

    .. change::
        :tags: rendering, tests
        :pullreq: 8
        :changeset: a9d7cc0b56c2

      Rendering tests now correctly render.

With the above markup, the changes above will be rendered into document sections per changelog, then each change within organized into paragraphs, including special markup for tags, tickets mentioned, pull requests, changesets. The entries will be grouped and sorted by tag according to the configuration of the changelog_sections and changelog_inner_tag_sort configurations.

A “compound tag” can also be used, if the configuration has a section like this:

changelog_sections = ["orm declarative", "orm"]

Then change entries which contain both the orm and declarative tags will be grouped under a section called orm declarative, followed by the orm section where change entries that only have orm will be placed.

Other Markup

The :ticket: directive will make use of the changelog_render_ticket markup to render a ticket link:

:ticket:`456`

Other things not documented yet

  • the :version: directive, which indicates a changelog entry should be listed in other versions as well

  • the .. changelog_imports:: directive - reads other changelog.rst files looking for :version: directives which apply to this changelog file, adding those entries to the changelog entries in this file

  • the :include_notes_from: symbol - imports all the .rst files in a directory into the current one so that changes can be one-per-file, makes git merges possible

  • the changelog release-notes command that at release time gathers up the above-mentioned change-per-file .rst files and renders them into the main changelog.rst file, running “git rm” on the individual files

  • the changelog.rst -> markdown converter, used for web guis that want changelog sections written in markdown

  • the changelog.rst -> stream per changelog markdown API function, which can for example stream the changelogs per release to the github releases API

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

changelog-0.5.6.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

changelog-0.5.6-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file changelog-0.5.6.tar.gz.

File metadata

  • Download URL: changelog-0.5.6.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for changelog-0.5.6.tar.gz
Algorithm Hash digest
SHA256 99feb4faccb4a1286aee2f1a23a09a9758931b0735c39a6214bad96f15d4c55c
MD5 f5c368d71d6143ba6eb63a2a633e2988
BLAKE2b-256 ff581fcd56d8b29d79dcc243fb9b7ef9d8e878499a50c038f7f85bd9919df7a6

See more details on using hashes here.

File details

Details for the file changelog-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: changelog-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for changelog-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 89816c0d07e4498a9e0ce0f42e1d9bcb9208082ba5da6ad929875ef705752399
MD5 823178ab6e38743e4c9a40a352db9f21
BLAKE2b-256 84f147d75c30ac4ba20cd219909c41e8ca2dd16c4fc953cc820f6e26e6e1f0b0

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