Repository navigation
progress_dashboard: --svg draws the panels as one picture for the README - #4124
leozinhoszg wants to merge 4 commits into
Conversation
--svg <file> writes the same panels as one static SVG: one treemap per panel, groups laid out as on the page (squarified), one cell per unit coloured by status, the corpus panel as areas by count, the panel's first ratio in its title, a legend, and the commit and date in the footer. Runs of one status in a row are one rectangle and a pattern draws the cell edges, so the file stays about 30 KB. It holds panel titles, group names and counts only (never a unit's name or detail), so it is the one output allowed inside the repository. CI on main is left out: five cells that change with every run. docs/progress.svg is one run on this commit's parent (Windows 11, tests run, corpus counts from the author's own work folder) and the README shows it under the status table. assets/ is not used: its .gitignore keeps everything but the logo out.
Kam471
left a comment
There was a problem hiding this comment.
Ran this at a6ea60b4 on Windows 11: python -I tests/test_progress_dashboard.py -> 28 tests, OK; compileall and git diff --check clean.
The new SVG renderer uses only panel titles, group names, counts/ratios and status colours; component names are used for ordering only and never emitted, and the footer carries the commit/date. All text passes through the XML escaper, the layout is deterministic for a snapshot, and the existing dashboard tests still pass. No blocking issue.
|
Tested at the head ( The SVG is produced from the same snapshot as the page ( Notes:
Approve with those. AI-assisted review, no game files, no GPU. |
|
Game-copy check of
Counts only; nothing from the game leaves my machine. AI-assisted. |
… files Review notes from tupacfan04 on a6ea60b: - --svg may point inside the repository, so a mistyped path could overwrite a script or a document. It now takes only a name ending in .svg, refuses a folder, and replaces an existing file only when that file is already an SVG (exit 2 before anything is collected). - The footer no longer needs generated_at: a snapshot without it still draws. - The comment and docs/progress_dashboard.md said nothing from the machine reaches the picture; group names come from the data, and for the GPU panel that is the --gpu-log label (or the log's file name). Both now say so. - New tests: an empty snapshot (no panels, or a panel with no units) is a valid SVG; the target check refuses a .py file, a non-SVG .svg and a folder, and the command line leaves a refused file untouched.
|
Tested
AI-assisted (Claude Code). |
|
Rechecked |
|
@tupacfan04 thanks for the check and the notes. All four are addressed in 6bf4004:
|
…is <svg> The guard took any file that opened with <?xml, so an XML document with another root and a .svg name could be overwritten. It now skips the prolog (XML declaration, processing instructions, comments, a DOCTYPE with or without an internal subset, a UTF-8 BOM) and needs the first element to be svg, with or without a namespace prefix. A table test covers SVGs that must pass and XML/HTML/empty files that must be refused.
|
@Proudnoob4 good catch, fixed in 2f15723.
New test Tested on Windows 11, Python 3.14: |
|
Re-checked
AI-assisted (Claude Code). |
|
Checked Tests: Mutations of
Real run on my own 1.0.2.1 work folder:
AI-assisted. |
|
Tested 2f15723 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010 (CPU only, Python 3.12.10, with my own built work folder): pass
AI-assisted (Claude Code). |
# Conflicts: # tests/test_progress_dashboard.py # tools/progress_dashboard.py
|
Merged
On Windows 11, Python 3.14: @Jadiac5 thanks for the check at 2f15723. The only change since is this merge. |
|
Re-checked the merge
AI-assisted; counts only. |
|
@Proudnoob4 thanks for re-checking the merge with your work folder, and for the names/paths sweep across all the outputs. On |
|
Tested 15cb9be merged with main 561b65a on Linux (WSL2), CPython 3.12.16, CPU only: pass.
|
|
Tested 15cb9be on Windows 11, Python 3.14, with my own 1.0.2.1 copy (all 108 files match |
… one picture for the README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claimed in the coordination issue as: #4084 (comment)
What and why
--svg <file>writes the dashboard's panels as one SVG for the README: one treemap per panel (squarified groups, one cell per unit coloured by status; the corpus as areas by count), the panel's first ratio in its title, a legend, and the commit and date in the footer. It holds panel titles, group names and counts only, never a unit's name or detail, so it is the one output allowed inside the repository. CI on main is left out: five cells that change with every run.Runs of one status in a row are one
<rect>and a pattern draws the cell edges, so the file is about 30 KB.docs/progress.svgis one run on this branch's parent (Windows 11, unit tests run, corpus counts from my own work folder); the README shows it under the status table. It is not inassets/: that folder's.gitignorekeeps everything but the logo out.Tested
Windows 11, Python 3.13, no GPU needed:
python -I tests/test_progress_dashboard.py: 28 tests OK. Two are new: the SVG is well-formed XML with the ratio in the panel title and no unit name or detail (a sentinel name is checked), and it is deterministic with one rectangle per status run.test_docs_links,test_docs_repo_paths,test_docs_list_items,test_docs_cli_flags,test_docs_table_rows,test_docs_design_rows,test_docs_python_deps,test_text_write_line_endings,test_tool_stdout_encoding,test_tool_startupandtest_csv_line_endingspass;scripts/check_no_game_data.pypasses;compileallis clean.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)