[PR #2297] tools/anim_clips: write --out JSON report atomically (ANIM-CLIPS-ATOMIC-JSON) #2301

Open
opened 2026-11-26 21:20:44 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2297
Author: @Ch1mpleo
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: fix/anim-clips-atomic-json


📝 Commits (1)

  • fcac19c tools/anim_clips: write --out JSON report atomically (ANIM-CLIPS-ATOMIC-JSON)

📊 Changes

2 files changed (+56 additions, -5 deletions)

View changed files

📝 tests/test_anim_clips.py (+22 -0)
📝 tools/anim_clips.py (+34 -5)

📄 Description

Claimed in the coordination issue as: ANIM-CLIPS-ATOMIC-JSON (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7192763047)

What and why

Writes --out\ JSON atomically in \ ools/anim_clips.py\ via _write_json_atomic\ (\os.path.realpath\ + \ empfile.mkstemp\ + \ sync\ + \published_mode\ +
eplace_retry\ with cleanup on failure), preserving symlinks and permissions. Adds a regression test in \ ests/test_anim_clips.py.

Tested

  • \python -m compileall -q tools/anim_clips.py tests/test_anim_clips.py\ — exit 0.
  • \python -I tests/test_anim_clips.py\ — 54 tests, OK (Windows 11 x64, Python 3.14.7).
  • \python -I scripts/check_no_game_data.py tools/anim_clips.py tests/test_anim_clips.py\ — exit 0.

GPUs tested: n/a (CPU-only Python tool & unit tests)

AI-assisted: yes

Checklist

  • Based on current \main\ and merges cleanly (a conflicting pull request is labeled
    eeds rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of \docs/design.md, with how it was confirmed. (n/a — no translator change)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2297 **Author:** [@Ch1mpleo](https://github.com/Ch1mpleo) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/anim-clips-atomic-json` --- ### 📝 Commits (1) - [`fcac19c`](https://github.com/ubiquitarianism/leonida/commit/fcac19c235decc3c0c420c3bdf69a1429e662fa6) tools/anim_clips: write --out JSON report atomically (ANIM-CLIPS-ATOMIC-JSON) ### 📊 Changes **2 files changed** (+56 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_anim_clips.py` (+22 -0) 📝 `tools/anim_clips.py` (+34 -5) </details> ### 📄 Description Claimed in the coordination issue as: ANIM-CLIPS-ATOMIC-JSON (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7192763047) ### What and why Writes \--out\ JSON atomically in \ ools/anim_clips.py\ via \_write_json_atomic\ (\os.path.realpath\ + \ empfile.mkstemp\ + \ sync\ + \published_mode\ + \ eplace_retry\ with cleanup on failure), preserving symlinks and permissions. Adds a regression test in \ ests/test_anim_clips.py\. ### Tested - \python -m compileall -q tools/anim_clips.py tests/test_anim_clips.py\ — exit 0. - \python -I tests/test_anim_clips.py\ — 54 tests, OK (Windows 11 x64, Python 3.14.7). - \python -I scripts/check_no_game_data.py tools/anim_clips.py tests/test_anim_clips.py\ — exit 0. GPUs tested: n/a (CPU-only Python tool & unit tests) AI-assisted: yes ### Checklist - [x] Based on current \main\ and merges cleanly (a conflicting pull request is labeled \ eeds rebase\). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of \docs/design.md\, with how it was confirmed. (n/a — no translator change) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2301
No description provided.