chore(deps): move test tooling out of the production image#4
Merged
Conversation
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>
|
The following required sections are missing or incomplete. Please update the PR description to address them:
This comment is deleted automatically once all sections are complete. |
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>
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
requirements.txtshipped three test-only packages —pytest,pytest-asyncio, andhttpx2— which meant the production Render image baked them in for no reason.Dockerfile.renderinstallsrequirements.txt, andtests/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 newrequirements-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 usepython:3.14-slim;numpy==2.5.1needs ≥3.12), so on 3.11pip installfailed before pytest could run. CI now tests the version that ships.docs/odysseus-browser.jpg— it was committed as a README screenshot but never linked, trippingtest_no_orphan_images_in_docs; wired it in below the demo clip rather than deleting it.Target branch
Intentionally targets
main— for this template repomainis the default branch the Deploy to Render button forks and deploys, and it is currently ahead ofdev. (Thedev-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
Checklist
pytest --cothat the full suite still collects — 4655 tests — and confirmed no non-test runtime code importspytest/httpx2, but did not boot the app for this dependency-only change.)How to Test
pip install -r requirements.txtin a clean venv → confirmpytestis not installed (it's no longer a runtime dep).pip install -r requirements.txt -r requirements-dev.txt→python -m pytest -qruns as before (this mirrors what CI now does).docker build -f Dockerfile.render -t odysseus-render .→ the image no longer containspytest/pytest-asyncio/httpx2.Visual / UI changes — REQUIRED if you touched anything that renders
No UI changes — dependency manifests, CI workflow, and CONTRIBUTING docs only.