Skip to content

Development

uv sync
uv run pytest
uv run ruff check
uv run mypy

The test suite

Tests run against fakeredis, which executes real Lua, so uv run pytest needs no server. Set REDIS_URL to also run them against a live Redis:

REDIS_URL=redis://localhost:6379/0 uv run pytest

CI runs both, and the two agree — including on reply conversion, which is the part you would most want a real server for.

The command table

src/redis_lua_py/_commands.py is generated, not written. It is the table command names are checked against, and it comes from the command definitions in the Redis source. Refresh it when a Redis release adds commands, and commit the result:

uv run python scripts/generate_commands.py 8.10.1

A stale table can never block a caller: redis.call('NEW.CMD', ...) is deliberately never checked. See Calling Redis commands.

The docs site

This site is built with Zensical. Serve it locally with live reload:

uv run zensical serve

Build it the way CI does:

uv run zensical build --clean

.github/workflows/docs.yml publishes main to GitHub Pages on every push.