Skip to content

Document Graphik and correct the README's usage-reporting details - #51

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/readme-accuracy-sweep
Oct 24, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/readme-accuracy-sweep

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

A documentation accuracy sweep (Stage A) of README.md and the batch scripts was carried out against the current source. Each corrected claim below was checked against the code:

  • main()'s reportUsage argument. The README said usage reporting is "started only by the CLI entrypoint". In fact main() takes reportUsage (default False), and the __main__ block passes True. The parameter is now documented, and the sentence states the condition under which settings.json is left alone.
  • Opt-out environment variables. trace_client.environment_opts_out also accepts DO_NOT_TRACK=true/yes, ignores case and surrounding whitespace, and treats any other value as no opt-out. The README listed only DO_NOT_TRACK=1 and did not mention case.
  • Unreadable settings.json. usage_reporting.loadSettings prints a message, does not rewrite the file, and returns None, so nothing is reported for that run. The README did not describe this case.
  • Graphik. main.py renders with Graphik, but the README mentioned it by name only. A short section now documents drawRectangle, drawText (bundled freesansbold.ttf font, centred) and drawButton (fires once per press, keyed by its rectangle, and not when a press is dragged onto it). These behaviours are the ones locked in by tests/test_graphik.py.

The rest of the README (CLI arguments, cache behaviour, load/create error paths, create_environments.bat / up.bat / down.bat, the test and headless-harness sections, the CI workflow description) was re-verified and no drift was found.

Only documentation is changed. No code is modified.

Skipped issues

Test plan

  • python3 -m py_compile main.py graphik.py __init__.py passes
  • python3 -m unittest discover -s tests ran 141 tests, all OK
  • The new Graphik example was run against real Pygame 2.1.2 with SDL's dummy drivers. drawRectangle(..., "red") produced a (255, 0, 0) pixel, and drawText/drawButton with colour names ran without error.
  • Live Viron anchor (python3 main.py 10 --exit-after-create against a Viron on :9999): UNVERIFIED-not-applicable. This PR is docs-only, and no Viron can run in this environment.

No tracking issue: the gaps were found during triage.

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

The README said usage reporting is started only by the CLI entrypoint,
but main() starts it whenever reportUsage=True is passed. It also left
out the DO_NOT_TRACK values true/yes, the case-insensitive matching of
both opt-out variables, and what happens when settings.json cannot be
read. Graphik, which main.py renders with, had no description at all.

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

Copy link
Copy Markdown
Member Author

Self-review rubric (anchored on the Tests CI run and local commands; scored adversarially):

Findings flagged for judgment (none block the merge):

  • README.md:96 — the Graphik snippet uses window and on_click without defining them. This matches the partial-snippet style of the RenderWindow examples, so it was left as is.
  • README.md:105 — two buttons drawn with an identical position and size share one press state, because the state is keyed only by the rectangle. The sentence "keyed by its position and size" implies this without spelling it out. This is a niche case and was left unexpanded.
  • Outside the diff, the ## Features list still does not name Graphik. It was not changed, to keep this PR to accuracy fixes rather than marketing copy.

Every rubric item passes and the anchor is green for a docs-only change.

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 c5ce7cd into main Oct 24, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the feature/readme-accuracy-sweep branch October 24, 2026 06:06
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