Find drift between your pre-commit hooks and your GitHub Actions steps.
Project description
ciparity
English · Русский · 简体中文 · Español · Português
Your pre-commit hooks and your CI are supposed to run the same checks. Over time they stop.
Someone bumps ruff in .pre-commit-config.yaml and not in the workflow, someone adds
mypy --strict to CI only, someone adds a hook that CI never runs. Then the branch is green
locally and red on push, or worse, green everywhere while a check quietly stopped running.
ciparity reads .pre-commit-config.yaml and .github/workflows/*.yml and prints where they
disagree. Static parsing only: no network, no Docker, no API keys, and it never runs your tools.
pip install ciparity
ciparity .
pre-commit hooks: 5 CI steps: 4
ruff version differs: pinned to different versions
pre-commit: 0.5.0
ci: 0.6.2
mypy arguments differ: different arguments
pre-commit: -
ci: --strict
pytest not in pre-commit: runs in CI but is not a pre-commit hook
ci: ci.yml:test
python python differs: pre-commit pins a python version CI never sets up
pre-commit: 3.11
ci: 3.12
4 difference(s).
Exit code is 1 when there are differences, so it works as a check.
What it looks for
| Check | Example |
|---|---|
| Tool in one side only | vulture is a hook, no workflow runs it |
| Version drift | hook rev: v0.5.0 against pip install ruff==0.6.2 |
| Argument drift | --strict passed in CI but not in the hook |
| Python version | default_language_version: python3.11 while CI sets up only 3.12 |
Versions are read from hook rev:, from pip install tool==x, uv tool install, pipx install,
npm i -g tool@x, and from the version: input of known actions such as astral-sh/ruff-action.
Commands are found inside run: blocks, including behind uv run, uvx, poetry run, npx
and python -m.
Usage
ciparity [path] [--json] [--ignore pytest,codespell] [--exit-zero]
As a pre-commit hook:
repos:
- repo: https://github.com/Topicspot/ciparity
rev: v0.1.1
hooks:
- id: ciparity
Deliberate non-goals and limits
- Only GitHub Actions in this version. GitLab CI and others are not parsed.
- Only tools it recognises are compared. File hygiene hooks like
trailing-whitespaceare ignored on purpose, nobody runs those in CI and reporting them would be noise. - If a workflow runs
pre-commit run --all-files, the two sides are parity by definition and "missing in CI" findings are suppressed. - Composite actions and reusable workflows are not followed, so tools that only run inside them are invisible.
- Flags such as
--fixor--all-filesare treated as mode flags and never reported.
Alternatives
- pre-commit.ci runs your hooks as a service, which removes the drift instead of reporting it. If you can use it, use it.
- act runs workflows locally, so you can see what CI does. It answers a different question and is much heavier.
- zizmor and actionlint lint the workflow files themselves. They do not know your pre-commit config.
License
MIT
☕ Support the author
This project is free and MIT-licensed. If it saved you time, you can send a coffee.
USDT, Tron network (TRC-20) only:
TS9ywGeSyKQxiCszdKCHLR8DRAsnYCosNN
Другие языки / Other languages
- Українська: проєкт безкоштовний. Якщо він заощадив вам час — можна підтримати автора, USDT у мережі Tron (TRC-20), адреса вище.
- Русский: проект бесплатный. Если он сэкономил вам время, можно поддержать автора, USDT в сети Tron (TRC-20), адрес выше.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ciparity-0.1.1.tar.gz.
File metadata
- Download URL: ciparity-0.1.1.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e41f526e65c135143574c76b98d6034d8c2b8f41fc31911ddd3a9137c593532
|
|
| MD5 |
622762be5071163e8c9d479776e0db02
|
|
| BLAKE2b-256 |
9c83291ba5ee204a8e402edfb1ffe71ff4c1e6caa678b712d0e775986be8e8a5
|
Provenance
The following attestation bundles were made for ciparity-0.1.1.tar.gz:
Publisher:
release.yml on Topicspot/ciparity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciparity-0.1.1.tar.gz -
Subject digest:
2e41f526e65c135143574c76b98d6034d8c2b8f41fc31911ddd3a9137c593532 - Sigstore transparency entry: 2280348240
- Sigstore integration time:
-
Permalink:
Topicspot/ciparity@5aafa0244c13f644bfa096fca291db5a51e8695a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Topicspot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5aafa0244c13f644bfa096fca291db5a51e8695a -
Trigger Event:
push
-
Statement type:
File details
Details for the file ciparity-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ciparity-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c666e7ca8dee2b1158b7970d09898d457e23fb7fed446b0715f313f795cea5a2
|
|
| MD5 |
ced71cbb4afeac40c84b85e645728013
|
|
| BLAKE2b-256 |
8229528b00799a9a71f7d52c433a8557362ccfeae3982a1a589eed03151913e5
|
Provenance
The following attestation bundles were made for ciparity-0.1.1-py3-none-any.whl:
Publisher:
release.yml on Topicspot/ciparity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciparity-0.1.1-py3-none-any.whl -
Subject digest:
c666e7ca8dee2b1158b7970d09898d457e23fb7fed446b0715f313f795cea5a2 - Sigstore transparency entry: 2280348249
- Sigstore integration time:
-
Permalink:
Topicspot/ciparity@5aafa0244c13f644bfa096fca291db5a51e8695a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Topicspot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5aafa0244c13f644bfa096fca291db5a51e8695a -
Trigger Event:
push
-
Statement type: