Context
PR #10 introduces this repository's first automated tests, in tests/test_render_window.py. They are pure unittest tests that mock Pygame, so they need neither a display nor a running Viron server, and they complete in well under a second.
No .github/workflows/ directory exists, so nothing runs them automatically. Every future change would rely on a reviewer remembering to run python -m unittest discover -s tests by hand.
Proposal
A GitHub Actions workflow should be added that runs on pull requests targeting main and executes:
python -m unittest discover -s tests
Notes for whoever implements this:
actions/checkout should be configured without submodules. The Viron submodule is only needed by main.py at runtime; the test suite does not import it, and cloning it would slow the job down for no benefit.
README.md states a prerequisite of Python 3.10+, so the workflow's Python version should be pinned at or above that. Note that the current test suite itself uses only the standard library and runs on older interpreters as well.
- Pygame is imported by
render_window.py, so pip install pygame is required even though the tests patch it out.
- A syntax check over the entry points (
python -m py_compile main.py graphik.py __init__.py render_window.py render_window_example.py) would be a cheap addition to the same job, since neither main.py nor the example file is covered by tests.
Note
Adding a workflow modifies .github/workflows/, which is excluded from autonomous merge, so this is expected to be implemented and merged with human review.
This issue body was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson
Context
PR #10 introduces this repository's first automated tests, in
tests/test_render_window.py. They are pureunittesttests that mock Pygame, so they need neither a display nor a running Viron server, and they complete in well under a second.No
.github/workflows/directory exists, so nothing runs them automatically. Every future change would rely on a reviewer remembering to runpython -m unittest discover -s testsby hand.Proposal
A GitHub Actions workflow should be added that runs on pull requests targeting
mainand executes:Notes for whoever implements this:
actions/checkoutshould be configured without submodules. TheVironsubmodule is only needed bymain.pyat runtime; the test suite does not import it, and cloning it would slow the job down for no benefit.README.mdstates a prerequisite of Python 3.10+, so the workflow's Python version should be pinned at or above that. Note that the current test suite itself uses only the standard library and runs on older interpreters as well.render_window.py, sopip install pygameis required even though the tests patch it out.python -m py_compile main.py graphik.py __init__.py render_window.py render_window_example.py) would be a cheap addition to the same job, since neithermain.pynor the example file is covered by tests.Note
Adding a workflow modifies
.github/workflows/, which is excluded from autonomous merge, so this is expected to be implemented and merged with human review.This issue body was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson