File: README.rst

package info (click to toggle)
python-changelog 0.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 120 kB
  • ctags: 48
  • sloc: python: 348; makefile: 6
file content (87 lines) | stat: -rw-r--r-- 2,538 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
==========
Changelog
==========

A `Sphinx <http://sphinx.pocoo.org/>`_ extension to generate changelog files.

This is an experimental, possibly-not-useful extension that's used by the
`SQLAlchemy <http://www.sqlalchemy.org>`_ 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"]

    # 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`