fleetlint Policy for a fleet of repositories
v0.10
Getting started

release/api-compatibility/python

A library checks its API against the previous release

Implements release/api-compatibility for python.

Severityinfo
Tiers1
Stackspython
Scoperoot
Kindoutcome
Sourcelibrary v0.7.0
Selected byfleetlint-recommended@v0.7.0

Requirement

A pyproject [project] without scripts runs griffe check against the previous tag.

Why

A breaking change in a minor release is found by every user at once; the check finds it before the tag.

Applies when

toml("pyproject.toml") != null && has(toml("pyproject.toml").project) && !has(toml("pyproject.toml").project.scripts)

Fix

Run griffe check <package> --against $(git describe --tags --abbrev=0) in the release workflow.

Agent instruction: Add the stack’s API compatibility tool to the release workflow, comparing against the latest tag; on a breaking change bump the major version instead of silencing the tool.

A finding of this rule points at the file tagged_workflows().size() > 0 ? tagged_workflows()[0] : ".github/workflows/release.yml" yields.

Sources


Generated by fleetlint docs from catalog v0.7.0.