Repository navigation
docs: show a usage example that actually presents the display - #64
Merged
Merged
Conversation
The README example painted one frame and exited without calling pygame.display.update(), so nothing appeared. Show the event loop and update call, say that presenting is the caller's job, and run the example in a test so it cannot drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stub reports QUIT on every call rather than queueing one event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Consumer code could not be read this cycle, so the comment now gives the reason without asserting how consumers draw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric, scored against the diff at a952242 and CI run 41988925282. This is an inline review by the authoring session, not an independent one. A Copilot review could not be requested (
Do-not-auto-merge paths: none matched. Findings fixed during this review:
Findings accepted without change:
Verdict: ready to merge. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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
Stage A (documentation accuracy sweep). The README's Usage block was found not to produce what it implies. It painted one frame and then exited:
pygame.display.update()was never called, no event was processed, anddrawButtoncould never be clicked. Copied as written, the window opens and closes with nothing shown. Neitherpygame.display.update,flipnor event handling was mentioned anywhere in the repository.README.md: the example is rewritten as an event loop that presents each frame and quits cleanly, and the placeholder image path is marked as one to replace. A short note states thatGraphikonly paints the surface, and thatdrawButtonbelongs in a loop that handles events.graphik.py: docstrings only. The class docstring states the same rule, and its example gains the missingpygame.display.update(). No executable code is changed.test_draw_methods_leave_presenting_the_display_to_the_callerpins the new claim for all four draw methods.test_readme_usage_example_runs_and_presents_what_it_drawsextracts the Usage block fromREADME.mdand runs it, so the example cannot drift from the code unnoticed.No public member is changed, so the Phase 3 consumer-impact gate does not apply.
Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pyfrom preponderous.graphik import Graphikpython3 -m pytest: 138 passed. The conftest forces the dummy SDL drivers, so this is headless.drawImageand the three README mutants, the new tests were the only failures. The other three also failed existing tests.Local validation used pygame 2.1.2 on Python 3.8, which is below the supported floor. CI is the check against current pygame versions.
Backlog
No tracking issue: the gap was found during triage. Each open issue was skipped for a stated reason:
.github/workflows/edits, which are on the do-not-auto-merge list. Opening them as held PRs would block later dispatches.Not verified
pygame.mouse.get_pressed. It was not re-read this cycle, because pygame's installed docs were outside the permitted paths, and it could not be observed under the dummy driver, which has no mouse.graphikis unpublished on PyPI, and its wiki link, were not checked. Thegh apirepository lookup was denied in this dispatch, andcurlwas not attempted because it is recorded as denied in dev-loop issue Stephenson-Software/graphik-dev-loop#35.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