mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #897] [MERGED] BUILD-GAMEDATA-GRAPH-INDEX-AND-ATOMIC: gamedata_graph: index sibling parentPath lookups and write JSON atomically #935
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#935
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/897
Author: @narekshaghoyandev
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @QemmHD
Base:
main← Head:ubiq-gamedata-graph-index-and-atomic📝 Commits (1)
755283dgamedata_graph: index sibling parentPath lookups and write JSON atomically📊 Changes
2 files changed (+87 additions, -6 deletions)
View changed files
📝
tests/test_gamedata_graph.py(+46 -0)📝
tools/gamedata_graph.py(+41 -6)📄 Description
Improves
tools/gamedata_graph.pyperformance and JSON report safety with identical graph output:resolve_parent_paths: Lazily indexes siblings by(id(container), tag, attribute) -> {value: [siblings]}instead of scanning every sibling perparentPathelement (O(N^2) o O(N)), preserving exact resolved/ambiguous counts and link order.write_json,main): Publishes--jsonviatempfile.mkstemp+file_mode.published_mode+replace_retry.replacewithallow_nan=False, trailing LF, and read-only-safe temp cleanup on failure (preserving existing reports and permissions). Also accepts optionalargv=Noneinmain(argv=None).Verification
python3 -I tests/test_gamedata_graph.py -v: 21/21 pass (negative control fails onmain).python3 -I scripts/check_no_game_data.py tools/gamedata_graph.py tests/test_gamedata_graph.py: clean.python3 -m compileall -q tools/gamedata_graph.py tests/test_gamedata_graph.py: clean.Claimed in the coordination issue as: BUILD-GAMEDATA-GRAPH-INDEX-AND-ATOMIC (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135309930)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.