frequenz-floss / frequenz-repo-config-python

Frequenz repository setup tools and common configuration for Python
https://frequenz-floss.github.io/frequenz-repo-config-python/
MIT License
3 stars 7 forks source link

Add a CI check for `griffe check` #270

Open llucax opened 1 month ago

llucax commented 1 month ago

What's needed?

It would be awesome to make sure breaking changes are never introduced unintentionally.

Proposed solution

Use griffe check:

Griffe is able to compare two snapshots of a project to detect API breakages between the old and the new snapshot. By snapshot we mean a specific point in the project's history. For example, you can ask Griffe to compare your current code against a specific tag, or to compare two versions of the same Python package.

We could run this on every PR and mark the PR as failed unless the scope:breaking-change label is manually added to the PR, to make sure people reviewing the PR is aware that breaking changes were introduced.

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

pawamoy commented 1 month ago

Just a quick note: there are still some false-positives, like adding an item to a dictionary attribute. Working towards making this more usable, but for now I am myself not failing CI based on griffe check's result :) I mostly use it as a local warning. See our bug tracker for various improvements we track ^^