Skip to content

chore(deps): move test tooling out of the production image#4

Merged
Ho1yShif merged 3 commits into
mainfrom
chore/drop-test-deps-from-prod-image
Jul 21, 2026
Merged

chore(deps): move test tooling out of the production image#4
Ho1yShif merged 3 commits into
mainfrom
chore/drop-test-deps-from-prod-image

Conversation

@Ho1yShif

@Ho1yShif Ho1yShif commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

requirements.txt shipped three test-only packages — pytest, pytest-asyncio, and httpx2 — which meant the production Render image baked them in for no reason. Dockerfile.render installs requirements.txt, and tests/ is excluded from the build context via .dockerignore, so this tooling could never run at runtime — it was pure image bloat. This moves the test deps into a new requirements-dev.txt (pins unchanged) so the shipped container installs runtime deps only, and updates the two places that actually run tests so nothing breaks.

This PR also carries two small fixes surfaced while getting CI green:

  • ci.yml: Python 3.11 → 3.14 — the pinned deps target 3.14 (both Dockerfiles use python:3.14-slim; numpy==2.5.1 needs ≥3.12), so on 3.11 pip install failed before pytest could run. CI now tests the version that ships.
  • README references docs/odysseus-browser.jpg — it was committed as a README screenshot but never linked, tripping test_no_orphan_images_in_docs; wired it in below the demo clip rather than deleting it.

Target branch

Intentionally targets main — for this template repo main is the default branch the Deploy to Render button forks and deploys, and it is currently ahead of dev. (The dev-target note in this template is inherited from upstream and doesn't match how this repo is curated.)

Linked Issue

N/A — issue tracking is disabled on this repository, so there is no issue to link. (This inherited template line does not apply here.)

Type of Change

  • Refactor / cleanup (behaviour unchanged)
  • CI / tooling / configuration

Checklist

  • I searched open issues and PRs — this is not a duplicate.
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app end-to-end. (Not claimed: I verified via pytest --co that the full suite still collects — 4655 tests — and confirmed no non-test runtime code imports pytest/httpx2, but did not boot the app for this dependency-only change.)

How to Test

  1. pip install -r requirements.txt in a clean venv → confirm pytest is not installed (it's no longer a runtime dep).
  2. pip install -r requirements.txt -r requirements-dev.txtpython -m pytest -q runs as before (this mirrors what CI now does).
  3. Build the hosted image: docker build -f Dockerfile.render -t odysseus-render . → the image no longer contains pytest/pytest-asyncio/httpx2.

Visual / UI changes — REQUIRED if you touched anything that renders

No UI changes — dependency manifests, CI workflow, and CONTRIBUTING docs only.

pytest, pytest-asyncio, and httpx2 were in requirements.txt, so the hosted
Render image (Dockerfile.render installs requirements.txt) shipped test-only
tooling even though tests/ is excluded from the build context — pure bloat.

Move them to a new requirements-dev.txt and install it where tests actually
run (CI + the CONTRIBUTING manual-dev path). Production requirements.txt and
both Dockerfiles now install runtime deps only; pins are unchanged and the
full suite still collects (4655 tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

⚠️ PR description — action needed

The following required sections are missing or incomplete. Please update the PR description to address them:

  • Linked Issue — add a reference like Fixes #NNN, a bare #NNN, or a link to the issue.

This comment is deleted automatically once all sections are complete.

Ho1yShif and others added 2 commits July 21, 2026 14:00
CI pinned Python 3.11, but the pinned deps target 3.14 (both Dockerfiles use
python:3.14-slim) — numpy==2.5.1 requires >=3.12, so `pip install -r
requirements.txt` failed at install time on 3.11 and the pytest job never ran.
Bump both the syntax and test jobs to 3.14 so CI exercises the versions that
actually ship.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs/odysseus-browser.jpg was committed as a README screenshot ("Refresh
README screenshot") but never wired into any doc, so test_no_orphan_images_in_docs
flagged it as an orphan. Add it to the README as a product screenshot below the
demo clip — fulfilling its original intent instead of deleting it — which greens
the docs-hygiene test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Ho1yShif
Ho1yShif merged commit 6696373 into main Jul 21, 2026
15 of 18 checks passed
@Ho1yShif
Ho1yShif deleted the chore/drop-test-deps-from-prod-image branch July 21, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant