chore: test coverage analysis + gitignore coverage artefacts#2
Draft
jamestyhurst wants to merge 8 commits into
Draft
chore: test coverage analysis + gitignore coverage artefacts#2jamestyhurst wants to merge 8 commits into
jamestyhurst wants to merge 8 commits into
Conversation
…0), _move_to_dict flags
…local variable The f-string used html.escape() while assigning to a variable also named 'html'. Python 3.11 raises UnboundLocalError because it correctly treats the assignment target as a local before the f-string evaluates. Fix: extract the escaped title into page_title before building the f-string, and rename the output string to html_doc. test: test_outputs_assembly.py — assemble_report and markdown_to_html (found the bug)
…d_passage, load_knowledge_for_game (mocked)
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
pytest-covto produce a coverage baseline.coverage,.coverage.*,htmlcov/, and.pytest_cache/to.gitignoreso coverage artefacts are never accidentally committedCoverage findings (45% overall)
Priority 1 — zero coverage on core modules
commentary.py(0%, 99 stmts) — narration style logic; highest-value gaprenderers.py(18%, 51 stmts) — output format conversionPriority 2 — low coverage on high-complexity modules
analyzer.py(40%, 518 stmts) — lines 680–1031 (Stockfish integration) completely darkknowledge.py(46%, 451 stmts) — retrieval/ranking logic untestedweb/pipeline.py(45%, 55 stmts)scripts/bump_version.py(43%, 94 stmts)Priority 3 — moderate gaps
narrator.py(58%),importers.py(60%),outputs.py(64%),web/routers/analysis.py(73%)Legitimately untested (no action needed):
gui.py,main.py,tts.py,scripts/ship.py,tools/*Build exclusion audit
.exe: dev directories (tests/,scripts/,.github/) are not bundled — PyInstaller only follows imports fromgui.py.tools.find_gamesis correctly included via--hidden-importas it provides the user-facing "find similar games" feature.Test plan
python -m pytest tests/).coverageno longer appears ingit statusafter a coverage runGenerated by Claude Code