Skip to content

Document requests as a runtime prerequisite - #39

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/document-requests-dependency
Oct 13, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/document-requests-dependency

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

Stage A documentation accuracy sweep. One drift was found and is fixed here:

  • main.py imports Viron's EnvironmentService and LocationService, and both modules import requests (Viron/src/main/python/preponderous/viron/services/environmentService.py:5, locationService.py:3). The README's Prerequisites and Setup sections only said to install Pygame, so following them literally ends in ModuleNotFoundError: No module named 'requests' when python main.py is run. Requests is now listed as a prerequisite, and the setup command installs it alongside Pygame.

Everything else in the README and the batch scripts was checked against the source and found accurate: the CLI arguments and fallbacks in parseArgs, the environments.json key format, the 800x800 resizable window and 60 FPS cap, the RenderWindow API (close(), context manager, resizable), the create_environments.bat / up.bat / down.bat commands, the Tests workflow description, the headless harness scenarios, and the usage-reporting section.

One further observation is recorded but not changed: the README states Python 3.10+ is required. Static inspection suggests the real lower bound from the Viron import chain is 3.9 (the newest syntax found is the PEP 585 list[Environment] annotation at environmentService.py:16, which fails on 3.8). No 3.9 interpreter was available to confirm this, so the stated minimum is left as it is; stating a version that is too high is conservative and does no harm.

Test plan

  • python3 -m py_compile main.py graphik.py __init__.py passes
  • python3 -m unittest discover -s tests: 123 tests ran, OK (Python 3.8.10; docs-only change, so this only confirms nothing else was disturbed)
  • The requests import was confirmed by reading the two Viron service modules, and by importing environmentService with requests stubbed out
  • Manual render check against a live Viron instance: UNVERIFIED-not-applicable. Only README.md changes, and no Docker is available in this environment to run Viron.

Deferred issues

No tracking issue: the gap was found during the documentation sweep.

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

Viron's EnvironmentService and LocationService, which main.py imports,
import requests, but the README only told readers to install pygame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (one intrinsic pass; anchor: py_compile + 123 unit tests OK locally, Tests workflow green on the PR head):

  • Scope: PASS. Only README.md is touched (+2/−1), and both lines concern the missing requests prerequisite.
  • Tests-new: PASS (not applicable). No code was added.
  • Tests-fix: PASS (not applicable). The change is to docs only, so there is no fix to stash and re-run.
  • Sibling structure: PASS. The new prerequisite bullet follows the Pygame bullet's [Name](link) (\pip install …`)` form.
  • Sibling renames: PASS (not applicable). Nothing was renamed.
  • Docs: PASS. The "Running the tests" and "Running without Docker or a display" sections still hold, because both stub Viron's service modules in sys.modules and so never import requests. The batch scripts are unaffected.
  • Issue resolution: PASS (not applicable). No Closes, since the gap was found during the sweep.
  • Manual validation: the anchor is green for what it covers. The live Viron render is UNVERIFIED-not-applicable: the change is README-only and no Docker is available here.

Judgment call recorded: Viron/requirements.txt pins requests==2.25.1 next to pytest==6.2.4. Pointing readers at pip install -r Viron/requirements.txt was considered and rejected, because that would also install a pytest pin Patchwork does not use, and that pin may not install on current Pythons. The unpinned requests keeps the install instruction minimal.

README.md:88: the Python 3.10+ minimum looks overstated; 3.9 is the likely floor. This is noted in the PR body and left unchanged, because no 3.9 interpreter was available to confirm it.

This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 339889d into main Oct 13, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the feature/document-requests-dependency branch October 13, 2026 08:39
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