Build and Test¶
Prerequisites¶
- Python 3.9 or newer.
uv(https://docs.astral.sh/uv/).- Docker. The integration tests use
testcontainers[redis]to spin up a real Redis with the search module on a free port. Without Docker the tests cannot run.
Make targets¶
make install uv sync (dev group)
make format black + isort
make check-format black --check
make check-types mypy ./sql_redis
make lint format + check-types
make test pytest
make test-verbose pytest -vv -s
make test-cov pytest with coverage report (terminal + htmlcov/)
make check lint + test
make build uv build (wheel + sdist)
make docs-build Build MkDocs HTML to ./site (strict mode)
make docs-serve Run mkdocs serve on http://127.0.0.1:8000
make clean Remove caches and build output
Coverage policy¶
100% line coverage is enforced in CI. # pragma: no cover is forbidden. If a
branch can't be tested, delete it. The two-pronged test layout (unit per
module + integration via real Redis) makes this achievable.
Running a single test¶
Running with coverage HTML¶
Building the docs¶
The MkDocs build runs with --strict, so any warning is fatal. To run the
strict build directly:
CI gates (target state)¶
make check(lint + tests) on every PR.make docs-buildwith-Won every PR.- 100% coverage gate.
Fast iteration loops¶
When changing parsing logic:
These do not need Redis and run in well under a second.
When changing executor logic:
The first run pays for the testcontainers Redis startup (a few seconds). Subsequent runs in the same session reuse it.