mafw.devtools.toolchain.tools.git_cliff

Git-cliff toolchain tool implementation.

This module provides the GitCliffTool concrete implementation of ProjectTool for managing the git-cliff changelog generator dependency in pyproject.toml.

Git-cliff is a project tool whose version lower bound is declared in project.optional-dependencies.dev. It has no cross-file consistency concerns (unlike ruff which also appears in .pre-commit-config.yaml), so all behaviour is inherited from ProjectTool without overrides.

Classes

GitCliffTool([project_root])

Manage the git-cliff changelog generator version in pyproject.toml.

class mafw.devtools.toolchain.tools.git_cliff.GitCliffTool(project_root: Path | None = None)[source]

Bases: ProjectTool

Manage the git-cliff changelog generator version in pyproject.toml.

Git-cliff is declared in project.optional-dependencies.dev with a >= lower-bound specifier. This tool queries PyPI for the latest release and updates the lower bound accordingly.

All behaviour (version detection, update, verify, bootstrap) is provided by ProjectTool.

Parameters:

project_root (Path | None) – Path to the project root directory containing pyproject.toml. Defaults to the current working directory.

property env_name: str

Hatch environment where git-cliff lives.

Returns:

"dev"

Return type:

str

property package_name: str

PyPI package name.

Returns:

"git-cliff"

Return type:

str

property section_path: str

TOML section path where git-cliff is declared.

Returns:

"project.optional-dependencies.dev"

Return type:

str