Skip to content

notes

Parse the changelog and return the release notes.

CLASS DESCRIPTION
MissingConfigurationError

An optional part of the configuration is missing for this operation.

FUNCTION DESCRIPTION
get_changelog_path

Return the path to the changelog.

get_section_pattern

Get the version section pattern for the changelog.

get_version_notes

Parse the changelog.md file and return the notes for the given version.

pairs

Return successive non-overlapping pairs taken from the input iterable.

split_changelog

Read the changelog and split it into version and note sections.

Classes

MissingConfigurationError

Bases: Exception

An optional part of the configuration is missing for this operation.

Functions

get_changelog_path

get_changelog_path() -> Path

Return the path to the changelog.

RAISES DESCRIPTION
MissingConfigurationError

If the starting_tag_pipeline configuration is missing or incorrect.

RETURNS DESCRIPTION
Path

The path to the changelog.

get_section_pattern

get_section_pattern() -> str

Get the version section pattern for the changelog.

RAISES DESCRIPTION
MissingConfigurationError

If the starting_tag_pipeline configuration is missing or incorrect.

RETURNS DESCRIPTION
str

The version section pattern.

get_version_notes

get_version_notes(version: str) -> str

Parse the changelog.md file and return the notes for the given version.

pairs

pairs(iterable: Iterable) -> Iterator[Tuple[Any, Any]]

Return successive non-overlapping pairs taken from the input iterable.

Examples:

>>> list(pairs('ABCDEFG'))
[('A', 'B'), ('C', 'D'), ('E', 'F'), ('G', None)]
PARAMETER DESCRIPTION
iterable

The iterable to split into pairs

TYPE: Iterable

RETURNS DESCRIPTION
Iterator[Tuple[Any, Any]]

An iterator of 2-tuples.

split_changelog

split_changelog(
    contents: str, section_pattern: Optional[str] = None
) -> List[Tuple[str, str]]

Read the changelog and split it into version and note sections.

PARAMETER DESCRIPTION
contents

The contents of the changelog.

TYPE: str

section_pattern

A regex pattern to split the changelog into sections. If None, the pattern is derived from the starting_tag_pipeline configuration option.

TYPE: Optional[str] DEFAULT: None

RETURNS DESCRIPTION
List[Tuple[str, str]]

A list of version and note sections.