semantic_release.commit_parser.scipy module¶
Parses commit messages using scipy tags of the form:
<tag>(<scope>): <subject>
<body>
The elements <tag>, <scope> and <body> are optional. If no tag is present, the commit will be added to the changelog section “None” and no version increment will be performed.
While <scope> is supported here it isn’t actually part of the scipy style. If it is missing, parentheses around it are too. The commit should then be of the form:
<tag>: <subject>
<body>
To communicate a breaking change add “BREAKING CHANGE” into the body at the beginning of a paragraph. Fill this paragraph with information how to migrate from the broken behavior to the new behavior. It will be added to the “Breaking” section of the changelog.
Supported Tags:
(
API,
DEP,
ENH,
REV,
BUG,
MAINT,
BENCH,
BLD,
)
DEV, DOC, STY, TST, REL, FEAT, TEST
Supported Changelog Sections:
breaking, feature, fix, Other, None
- class semantic_release.commit_parser.scipy.ScipyCommitParser(options: ScipyParserOptions | None = None)[source]¶
Bases:
CommitParser[ParsedCommit|ParseError,ScipyParserOptions]Parser for scipy-style commit messages
- commit_body_components_separator(accumulator: dict[str, list[str]], text: str) dict[str, list[str]][source]¶
- static get_default_options() ScipyParserOptions[source]¶
- parse(commit: Commit) ParsedCommit | ParseError | list[ParsedCommit | ParseError][source]¶
Parse a commit message
If the commit message is a squashed merge commit, it will be split into multiple commits, each of which will be parsed separately. Single commits will be returned as a list of a single ParseResult.
- parse_commit(commit: Commit) ParsedCommit | ParseError[source]¶
- parse_message(message: str) ParsedMessageResult | None[source]¶
- parser_options¶
alias of
ScipyParserOptions
- class semantic_release.commit_parser.scipy.ScipyParserOptions(major_tags: Tuple[str, ...] = ('API', 'DEP'), minor_tags: Tuple[str, ...] = ('ENH', 'FEAT'), patch_tags: Tuple[str, ...] = ('BLD', 'BUG', 'MAINT'), other_allowed_tags: Tuple[str, ...] = ('DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST'), allowed_tags: Tuple[str, ...] = ('API', 'DEP', 'ENH', 'FEAT', 'BLD', 'BUG', 'MAINT', 'DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST'), default_level_bump: LevelBump = LevelBump.NO_RELEASE, parse_squash_commits: bool = True, ignore_merge_commits: bool = True)[source]¶
Bases:
ParserOptionsOptions dataclass for ScipyCommitParser
Scipy-style commit messages follow the same format as Angular-style commit just with different tag names.
- allowed_tags: Tuple[str, ...] = ('API', 'DEP', 'ENH', 'FEAT', 'BLD', 'BUG', 'MAINT', 'DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST')¶
All commit-type prefixes that are allowed.
These are used to identify a valid commit message. If a commit message does not start with one of these prefixes, it will not be considered a valid commit message.
- ignore_merge_commits: bool = True¶
Toggle flag for whether or not to ignore merge commits
- major_tags: Tuple[str, ...] = ('API', 'DEP')¶
Commit-type prefixes that should result in a major release bump.
- minor_tags: Tuple[str, ...] = ('ENH', 'FEAT')¶
Commit-type prefixes that should result in a minor release bump.
- other_allowed_tags: Tuple[str, ...] = ('DEV', 'BENCH', 'DOC', 'STY', 'TST', 'REL', 'TEST')¶
Commit-type prefixes that are allowed but do not result in a version bump.
- parse_squash_commits: bool = True¶
Toggle flag for whether or not to parse squash commits
- patch_tags: Tuple[str, ...] = ('BLD', 'BUG', 'MAINT')¶
Commit-type prefixes that should result in a patch release bump.