Document drawButton repeat-fire semantics and local dev/test setup - #26
Merged
Conversation
drawButton polls mouse state on every call with no click-edge detection, so its callback fires once per call while held down, not once per click. The README described it as firing "on click", which reads as once-per-click. Reword the README bullet, add a matching docstring on drawButton, and pin the documented behavior with a test that holds the mouse down across several calls. Deliberately left the underlying polling behavior unchanged: the vendored copies in Roam/Apex/Ophidian/Patchwork/Tic-Tak-Toe are written against it. Also add a README Development section covering the venv + pip install + pytest sequence (mirroring .github/workflows/test.yml) and headless SDL setup, and ignore .venv/ in .gitignore, since the repo had no documented way to run the test suite locally. Closes #24 Closes #25 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric: Universal:
Repo-specific:
Deferred: issue #23 ( Summary: all rubric items pass; no judgment-call flags to leave inline. 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
README.md'sdrawButtonbullet said the callback fires "on click", but the implementation polls mouse state on every call with no click-edge detection — it fires once per call while the mouse is held down, not once per click. Reworded the bullet and added a matching docstring ondrawButtonso the behavior is discoverable from an IDE.drawButtoncalls and asserts the callback fires once per call, pinning the documented (intentionally unchanged) behavior.pip install -e ".[test]"+pytestsequence, mirroring.github/workflows/test.yml, and noting the suite is headless viaconftest.py..venv/to.gitignoresince the new Development section tells contributors to create one.No public API changes — documentation and test-only, plus a docstring.
Deferred: issue #23 (
drawImageper-call re-read/re-scale caching) is a separate, non-documentation change tographik.pyand was left for a future cycle rather than batched with these README fixes.Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pypython3 -m pytest -q→ 20 passed (19 previously + 1 new)Closes #24
Closes #25
This PR description was drafted during a Gardener session (Stephenson-Software/gardener).