Repository navigation
chore(deps): reproducible test environment with uv and docker compose - #17
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pyproject.tomlshipped withdependencies = [], so a freshuv syncinstalled nothing and the suite failed with 93fixture 'mocker' not founderrors. It now declares the pinned runtime dependencies, adevdependency group with the test toolchain, and the committeduv.lockmakes the environment deterministic.src/test.shactivated the removedenv/venv and started a hardcodedredis-stackcontainer; it now uses.venvand the composeredisservice.test/conftest.pyflushed dev Redis db 0 while.env.testtargets db 1; it now readsREDIS_HOST/PORT/DBfrom the environment so tests only touch their own database.Changes
pyproject.tomlrequirements.txt),[dependency-groups]dev with test pins (fromrequirements-test.txt), dropped broken[project.scripts]/[build-system]uv.lockuv syncnow reproduces the verified green environment.python-version.gitignore.venv/,.pytest_cache/,.codegraph/,.atl/src/test.sh.venv; start/stop Redis viadocker composetest/conftest.pyREDIS_*env vars (isolated test db)README.md/README.es.mddocker compose up -d redis); editor also auto-reformatted the markdown tables (content unchanged)Test plan
uv sync→ resolves 91 packages, checked 89, no driftpytest -q --disable-warnings→ 155 passed, 20 warnings (Redis up via compose)db/database.py, CORS) out of this PRCI - Lint & Testgreen on this PR