Skip to content

chore(deps): reproducible test environment with uv and docker compose - #17

Merged
SrStamm merged 2 commits into
mainfrom
chore/reproducible-env
Oct 17, 2026
Merged

SrStamm merged 2 commits into
mainfrom
chore/reproducible-env

Conversation

@SrStamm

@SrStamm SrStamm commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • pyproject.toml shipped with dependencies = [], so a fresh uv sync installed nothing and the suite failed with 93 fixture 'mocker' not found errors. It now declares the pinned runtime dependencies, a dev dependency group with the test toolchain, and the committed uv.lock makes the environment deterministic.
  • src/test.sh activated the removed env/ venv and started a hardcoded redis-stack container; it now uses .venv and the compose redis service.
  • test/conftest.py flushed dev Redis db 0 while .env.test targets db 1; it now reads REDIS_HOST/PORT/DB from the environment so tests only touch their own database.

Changes

File Change
pyproject.toml Pinned runtime deps (from requirements.txt), [dependency-groups] dev with test pins (from requirements-test.txt), dropped broken [project.scripts]/[build-system]
uv.lock Generated lockfile — uv sync now reproduces the verified green environment
.python-version Pin Python 3.12
.gitignore Ignore .venv/, .pytest_cache/, .codegraph/, .atl/
src/test.sh Activate .venv; start/stop Redis via docker compose
test/conftest.py Redis connection from REDIS_* env vars (isolated test db)
README.md / README.es.md Test-command note now matches the script (docker compose up -d redis); editor also auto-reformatted the markdown tables (content unchanged)

Test plan

  • uv sync → resolves 91 packages, checked 89, no drift
  • pytest -q --disable-warnings → 155 passed, 20 warnings (Redis up via compose)
  • Working tree keeps later-branch changes (README demo password, db/database.py, CORS) out of this PR
  • CI CI - Lint & Test green on this PR

…v sync

pyproject.toml had an empty dependencies list, so a fresh `uv sync`
installed nothing and the test suite failed with missing fixtures.
Declare pinned runtime dependencies, a dev dependency group with the
test toolchain, pin the verified structlog version, and commit the
generated uv.lock. Ignore local-only dirs (.venv, .pytest_cache,
.codegraph, .atl).
src/test.sh activated a removed env/ venv and started a hardcoded
redis-stack container; point it at .venv and the compose redis
service. conftest flushed dev redis db 0 while .env.test targets
db 1; read REDIS_HOST/PORT/DB from the environment instead so tests
only touch their own database. Update both READMEs' test command
note to match the script.
@SrStamm
SrStamm merged commit 02102d8 into main Oct 17, 2026
1 check passed
@SrStamm
SrStamm deleted the chore/reproducible-env branch October 17, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant