mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #921] gamedata_xml: write CSV/JSON reports atomically and sort walk subdirs #959
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#959
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/921
Author: @narekshaghoyandev
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:ubiq-gamedata-xml-atomic-and-order📝 Commits (1)
1fef9b9gamedata_xml: write CSV/JSON reports atomically and sort walk subdirs📊 Changes
2 files changed (+117 additions, -8 deletions)
View changed files
📝
tests/test_gamedata_xml.py(+68 -0)📝
tools/gamedata_xml.py(+49 -8)📄 Description
Summary
--csvand--jsonreports intools/gamedata_xml.pyatomically via a staging temp file in the destination folder (file_mode.published_mode+replace_retry.replace), cleaning up staging files (including read-only ones) on failure so an existing report is never clobbered or truncated.write_json()withallow_nan=Falseand a trailing newline.dirsin place insidexml_files()so recursive directory walks visit subdirectories in deterministic order regardless of filesystemreaddirorder.argv=Noneparameter inmain(argv=None).Verification
python3 -I tests/test_gamedata_xml.py -v— 18/18 pass (4 new regression tests).main: all 4 new tests fail before the patch and pass after.python3 -I -m py_compile tools/gamedata_xml.py tests/test_gamedata_xml.py— pass.python3 -I scripts/check_no_game_data.py tools/gamedata_xml.py tests/test_gamedata_xml.py— clean.Claimed in the coordination issue as: BUILD-GAMEDATA-XML-ATOMIC-AND-ORDER
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.