Repository navigation
chore: generate readme from jinja2 template - #133
Merged
Merged
Conversation
smarlhens
force-pushed
the
chore/readme-template
branch
from
November 1, 2026 18:18
3731eda to
d8e3ec0
Compare
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
1c19f66README.mdfromtemplates/README.md.j2withscripts/regen_readme.py(Jinja2), same approach as the Tera templates in riri-node-tools3731edauv sync --no-devfor the production venv, dev dependencies only in thedevelopmentstageREADME generation
Values come from the files that pin them, outputs from real runs:
requires-python/.python-versionuv.lock(pre-commit is now a locked dev dependency)[tool.uv] required-version/ Dockerfileghcr.io/astral-sh/uvtagpytest tests --cov=src(one run feeds both blocks)python -m python_boilerplate.main[100%]padding, one coverage header line, table). The coverage header is redrawn at width 80 with the platform pinned tolinux, so the README doesn't depend on the machine or terminal.--checkprints a diff and fails withREADME.md is out of date: edit templates/README.md.j2, then run uv run scripts/regen_readme.py. A failing test surfaces pytest's own output.requires-pythonas written (>=3.15, the old<3.16.0upper bound wasn't declared anywhere), coverage header in the pytest-cov 7 format, ruff commands includescripts.Wiring
pytest & readme driftlocal hook (--checkmode, never rewrites the README, so manual edits aren't lost) replaces thepytesthook; triggered by the template, script, pyproject,uv.lock,.python-version, Dockerfile,src/,tests/.uv run mypyhook: mirrors-mypy's isolated env lacks jinja2 and needed a duplicatejinja2==3.1.6pin; the local hook usesuv.lockversions, same as CI. Added toci.skipwith the other uv-based hooks.README.md.Test with pytesttees its output,Check README driftreuses it via--pytest-output(suite runs once); ruff lint/format now coverscripts.scripts/added to ruffsrc, mypyfiles, tyinclude(INP001ignored there).Notes
.python-versionor pre-commit will fail the drift check; regenerate by hand withuv run scripts/regen_readme.py.build-imagejob.Test plan
pre-commit run --all-filesuv run scripts/regen_readme.py --checkclean; drift detected after a manual README edit, a Dockerfile uv bump and a failing test