scanpydoc.release_notes#

A release notes directive.

Given a list of version files matching FULL_VERSION_RE, render them using the following (where . is the directory they are in):

.. release-notes:: .

With e.g. the files 1.2.0.md, 1.2.1.md, and 1.3.0.rst, this will render like the following:

_v1.3:

Version 1.3
===========

.. include:: 1.3.0.rst


_v1.2:

Version 1.2
===========

.. include:: 1.2.1.md
.. include:: 1.2.0.md

Module Attributes

FULL_VERSION_RE

Regex matching a full version number including patch part, maybe with more after.

Functions#

setup(app)[source]#

Add the release-notes directive.

Parameters:
app Sphinx

Sphinx app to set this extension up for

Return type:

dict[str, Any]

Returns:

Metadata for this extension.

Classes#

class ReleaseNotes(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]#

Directive rendering release notes, grouping them by minor versions.

required_arguments: ClassVar = 1[source]#

Number of required directive arguments.

run()[source]#

Read the release notes and render them.

Return type:

Sequence[Node]