Skip to content

chore: split dev/test dependencies into requirements-dev.txt - #16

Merged
man4ish merged 1 commit into
mainfrom
chore/split-dev-requirements
Sep 1, 2026
Merged

chore: split dev/test dependencies into requirements-dev.txt#16
man4ish merged 1 commit into
mainfrom
chore/split-dev-requirements

Conversation

@man4ish

@man4ish man4ish commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What

PR #9 pinned requirements.txt to production dependencies only. Since then, running the test suite has required installing dev tooling manually (tribal knowledge) — nothing declared it. This PR adds requirements-dev.txt for those packages.

Packages moved into requirements-dev.txt (pinned to currently-installed working versions)

Package Version Why it's needed
pytest 9.0.2 test runner
pytest-asyncio 1.3.0 runs the @pytest.mark.asyncio tests in tests/test_main_api.py
pytest-cov 7.0.0 coverage tooling (.coveragerc already in repo)
httpx 0.28.1 required by starlette.testclient.TestClient, used in test_main_api.py, test_auth.py, test_rag_routes.py
ruff 0.16.1 linting, previously installed ad-hoc in CI (pip install ruff pytest)

None of these are imported by application code — requirements.txt alone is sufficient to run the app.

Verification (done from scratch, two separate fresh venvs)

venv 1 — requirements.txt only (production-only, no dev deps):

  • pip install -r requirements.txt succeeds
  • api.main.app imports and boots via uvicorn
  • GET /health returns 200 {"status":"ok", ...}
  • confirms requirements.txt alone is sufficient to run the app, not to test it

venv 2 — requirements.txt + requirements-dev.txt together:

  • both install cleanly
  • pytest -q199 passed, no missing-dependency errors
  • pytest-asyncio correctly registers in strict mode and the two async tests exercise real coroutines (not silently skipped)

CI config diff

       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
           if [ -f pyproject.toml ]; then
             pip install -e ".[dev]" 2>/dev/null || pip install -e .
           elif [ -f requirements.txt ]; then
-            pip install -r requirements.txt
+            pip install -r requirements.txt -r requirements-dev.txt
           fi
-          pip install ruff pytest

CI's install step now matches what's actually needed to run pytest — no more ad-hoc pip install ruff pytest disconnected from any tracked file.

Also updated

README.md now documents the dev/test install path (pip install -r requirements.txt -r requirements-dev.txt) separately from the production install command.


🤖 Generated with Claude Code

requirements.txt (PR #9) is production-only, but the test suite needs
pytest, pytest-asyncio (for the @pytest.mark.asyncio tests), pytest-cov,
httpx (required by starlette's TestClient, used in test_main_api.py,
test_auth.py, test_rag_routes.py), and ruff (CI's lint step, previously
installed ad-hoc). None of these were declared anywhere in the repo.

- Add requirements-dev.txt pinned to currently-installed working versions
- Update ci.yml to install both requirement files instead of ad-hoc
  `pip install ruff pytest`
- Document the dev/test install path in README.md

Verified in two fresh venvs:
- requirements.txt alone: app imports and serves /health successfully
- requirements.txt + requirements-dev.txt: all 199 tests pass

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XaLTXgv4NNGzg2snnnYRZV
@man4ish
man4ish merged commit e26da38 into main Sep 1, 2026
2 of 3 checks passed
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