Python CI integration
Add quell ci to a Python CI pipeline to fail the build when too few of the requirements read from docstrings and type annotations have a test. It is a single command with one threshold and two exit codes, so it works in any CI system. For GitHub pull-request comments and inline annotations, use the workflow in the GitHub Actions guide. For JavaScript and TypeScript, see the npm CI guide.
What is the basic command?
quell ci src/ --threshold 0.75
The threshold is a fraction from 0.0 to 1.0 (0.75 means 75%), and the default 0.0 never fails. The command prints the score and either PASS (exit 0) or FAIL: ... threshold (exit 1). It does not read a threshold from pyproject.toml. See quell ci.
How do I run it in GitHub Actions?
name: Quell
on: [push, pull_request]
jobs:
quell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install quelltest
- run: quell ci src/ --threshold 0.75
How do I run it in GitLab CI or CircleCI?
# .gitlab-ci.yml
quell:
image: python:3.11
script:
- pip install quelltest
- quell ci src/ --threshold 0.75
# .circleci/config.yml
jobs:
quell:
docker:
- image: cimg/python:3.11
steps:
- checkout
- run: pip install quelltest
- run: quell ci src/ --threshold 0.75
What threshold should I choose?
Start where your project is today and ratchet up. Check the current score locally first:
quell ci src/ --threshold 0.0
then set the threshold slightly below it and raise it as you add tests. The goal is to never go backwards.
Which other commands help in CI?
quell find src/ --format githubprints GitHub Actions annotations for untested guard clauses and exits 0.quell score src/ --jsonprints the Production Readiness Score as JSON for dashboards.quell install --prwrites a ready-made workflow; see quell install.quell find --fixasks for confirmation per test, so run it locally rather than in CI.
Optional LLM keys are never needed for quell ci; the rule-based path makes no network calls.