configuration
Configuration management for generate_changelog.
CLASS | DESCRIPTION |
---|---|
Configuration |
Configuration options for generate-changelog. |
FUNCTION | DESCRIPTION |
---|---|
get_config |
Return the current configuration. |
get_default_config |
Create a new |
set_config |
Set a configuration key to a value. |
write_default_config |
Write a default configuration file to the specified path. |
ATTRIBUTE | DESCRIPTION |
---|---|
DEFAULT_CONFIG_FILE_NAME |
Base default configuration file name
|
DEFAULT_CONFIG_FILE_NAMES |
Valid permutations of the default configuration file name.
|
IntOrCallable |
The type should be either an int or a callable that returns an int.
TYPE:
|
RELEASE_TYPE_ORDER |
The sort order of the release types.
|
StrOrCallable |
The type should be either a string or a callable that returns a string.
TYPE:
|
Attributes¶
DEFAULT_CONFIG_FILE_NAME
module-attribute
¶
DEFAULT_CONFIG_FILE_NAME = '.changelog-config'
Base default configuration file name
DEFAULT_CONFIG_FILE_NAMES
module-attribute
¶
DEFAULT_CONFIG_FILE_NAMES = [
f"{DEFAULT_CONFIG_FILE_NAME}.yaml",
f"{DEFAULT_CONFIG_FILE_NAME}.yml",
DEFAULT_CONFIG_FILE_NAME,
]
Valid permutations of the default configuration file name.
IntOrCallable
module-attribute
¶
The type should be either an int or a callable that returns an int.
RELEASE_TYPE_ORDER
module-attribute
¶
RELEASE_TYPE_ORDER = (
None,
"no-release",
"alpha",
"beta",
"dev",
"pre-release",
"release-candidate",
"patch",
"minor",
"major",
)
The sort order of the release types.
StrOrCallable
module-attribute
¶
The type should be either a string or a callable that returns a string.
Classes¶
Configuration
dataclass
¶
Configuration(
variables: dict = dict(),
starting_tag_pipeline: Optional[list] = list(),
unreleased_label: str = "Unreleased",
summary_pipeline: list = list(),
body_pipeline: list = list(),
output_pipeline: list = list(),
template_dirs: list = list(),
group_by: list = list(),
verbosity: int = 0,
report_path: Optional[Path] = None,
tag_pattern: str = "^[0-9]+\\.[0-9]+(?:\\.[0-9]+)?$",
include_merges: bool = False,
ignore_patterns: list = list(),
commit_classifiers: list = list(),
valid_author_tokens: list = list(),
release_hint_rules: list = list(),
)
Configuration options for generate-changelog.
METHOD | DESCRIPTION |
---|---|
rendered_variables |
Render each variable value using the previous variables as the context. |
update_from_file |
Updates this configuration instance in place from a YAML file. |
ATTRIBUTE | DESCRIPTION |
---|---|
body_pipeline |
Process the commit’s body for use in the changelog.
TYPE:
|
commit_classifiers |
Set the commit’s category metadata to the first classifier that returns
TYPE:
|
group_by |
Group the commits within a version by these commit attributes.
TYPE:
|
ignore_patterns |
Ignore commits whose summary line matches any of these regular expression patterns.
TYPE:
|
include_merges |
Tells
TYPE:
|
output_pipeline |
Process and store the full or partial changelog.
TYPE:
|
release_hint_rules |
Rules applied to commits to determine the type of release to suggest.
TYPE:
|
report_path |
Path to write a report of the changelog to. |
starting_tag_pipeline |
Pipeline to find the most recent tag for incremental changelog generation. |
summary_pipeline |
Process the commit’s first line for use in the changelog.
TYPE:
|
tag_pattern |
Only tags matching this regular expression are used for the changelog.
TYPE:
|
template_dirs |
Full or relative paths to look for output generation templates.
TYPE:
|
unreleased_label |
Used as the version title of the changes since the last valid tag.
TYPE:
|
valid_author_tokens |
Tokens in git commit trailers that indicate authorship.
TYPE:
|
variables |
User variables for reference in other parts of the configuration.
TYPE:
|
verbosity |
Level of verbose logging output.
TYPE:
|
Attributes¶
body_pipeline
class-attribute
instance-attribute
¶
Process the commit’s body for use in the changelog.
commit_classifiers
class-attribute
instance-attribute
¶
Set the commit’s category metadata to the first classifier that returns True
.
group_by
class-attribute
instance-attribute
¶
Group the commits within a version by these commit attributes.
ignore_patterns
class-attribute
instance-attribute
¶
Ignore commits whose summary line matches any of these regular expression patterns.
include_merges
class-attribute
instance-attribute
¶
include_merges: bool = False
Tells git-log
whether to include merge commits in the log.
output_pipeline
class-attribute
instance-attribute
¶
Process and store the full or partial changelog.
release_hint_rules
class-attribute
instance-attribute
¶
Rules applied to commits to determine the type of release to suggest.
report_path
class-attribute
instance-attribute
¶
Path to write a report of the changelog to.
starting_tag_pipeline
class-attribute
instance-attribute
¶
Pipeline to find the most recent tag for incremental changelog generation. Leave empty to always start at first commit.
summary_pipeline
class-attribute
instance-attribute
¶
Process the commit’s first line for use in the changelog.
tag_pattern
class-attribute
instance-attribute
¶
tag_pattern: str = '^[0-9]+\\.[0-9]+(?:\\.[0-9]+)?$'
Only tags matching this regular expression are used for the changelog.
template_dirs
class-attribute
instance-attribute
¶
Full or relative paths to look for output generation templates.
unreleased_label
class-attribute
instance-attribute
¶
unreleased_label: str = 'Unreleased'
Used as the version title of the changes since the last valid tag.
valid_author_tokens
class-attribute
instance-attribute
¶
Tokens in git commit trailers that indicate authorship.
variables
class-attribute
instance-attribute
¶
User variables for reference in other parts of the configuration.
Functions¶
Functions¶
get_config
¶
get_config() -> Configuration
Return the current configuration.
If the configuration has never been initialized, it is instantiated with the defaults.
RETURNS | DESCRIPTION |
---|---|
Configuration
|
The global configuration object. |
get_default_config
¶
get_default_config() -> Configuration
Create a new Configuration
object with default values.
RETURNS | DESCRIPTION |
---|---|
Configuration
|
A new Configuration object |