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(config: Optional[Configuration] = None) -> Path
Return the path to the changelog.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The configuration to use. If
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Path
|
The path to the changelog. |
| RAISES | DESCRIPTION |
|---|---|
MissingConfigurationError
|
If the |
get_section_pattern
¶
get_section_pattern(config: Optional[Configuration] = None) -> str
Get the version section pattern for the changelog.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The configuration to use. If
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The version section pattern. |
| RAISES | DESCRIPTION |
|---|---|
MissingConfigurationError
|
If the |
get_version_notes
¶
get_version_notes(version: str, config: Optional[Configuration] = None) -> str
Parse the changelog.md file and return the notes for the given version.
| PARAMETER | DESCRIPTION |
|---|---|
version
|
The version string to retrieve notes for.
TYPE:
|
config
|
The configuration to use. If
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The release 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:
|
| RETURNS | DESCRIPTION |
|---|---|
Iterator[Tuple[Any, Any]]
|
An iterator of 2-tuples. |
split_changelog
¶
split_changelog(
contents: str,
section_pattern: Optional[str] = None,
config: Optional[Configuration] = 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:
|
section_pattern
|
A regex pattern to split the changelog into sections.
If
TYPE:
|
config
|
The configuration to use. If
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
List[Tuple[str, str]]
|
A list of version and note sections. |