[PR #1084] anim tools: use shared report path guard #1119

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1084
Author: @j-weiner
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/anim-clips-shared-report-path


📝 Commits (2)

  • 16ab092 refactor: use shared report path guard in anim_clips
  • eac7353 fix(anim_glb): use shared report path guard

📊 Changes

3 files changed (+14 additions, -17 deletions)

View changed files

📝 tests/test_anim_glb.py (+9 -0)
📝 tools/anim_clips.py (+2 -11)
📝 tools/anim_glb.py (+3 -6)

📄 Description

Claimed in the coordination issue as: ANIM-CLIPS-SHARED-REPORT-PATH

What and why

tools/anim_clips.py and tools/anim_glb.py shared a private same_output_path helper across modules. This PR moves the guard to the common tools/report_paths.py:same_report_path implementation and updates both callers. Updating anim_glb.py is necessary because it referenced anim_clips.same_output_path; removing that helper without updating the caller caused an AttributeError when output/input checks ran. A regression covers identical, not-yet-created GLB and report paths, which must be refused before either path is created.

Tested

  • python3 -I tests/test_anim_glb.py — 37 passed.
  • python3 -I tests/test_anim_clips.py — 53 passed.
  • python3 -I tests/test_report_paths.py — 22 tests, 1 skipped.
  • python3 -I tests/test_text_write_line_endings.py — 3 passed.
  • python3 -I tools/anim_clips.py --help and python3 -I tools/anim_glb.py --help — passed.
  • python3 -I scripts/check_no_game_data.py tools/anim_clips.py tools/anim_glb.py tests/test_anim_glb.py — clean.
  • git diff --check — passed.

GPUs tested: n/a (CPU-only synthetic tests; no game files used).

AI-assisted: yes.

Checklist

  • Rebased on current main and merges cleanly.
  • One topic; the anim_glb.py change fixes a missed caller of the same shared-guard migration.
  • No game data, keys or decryption.
  • No translator rule change (not applicable).

🔄 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/1084 **Author:** [@j-weiner](https://github.com/j-weiner) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/anim-clips-shared-report-path` --- ### 📝 Commits (2) - [`16ab092`](https://github.com/ubiquitarianism/leonida/commit/16ab0921495fa13bc0b1fafc4279783e079984c7) refactor: use shared report path guard in anim_clips - [`eac7353`](https://github.com/ubiquitarianism/leonida/commit/eac7353ec7f1741d5ed6bd725275dc41eba82c26) fix(anim_glb): use shared report path guard ### 📊 Changes **3 files changed** (+14 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_anim_glb.py` (+9 -0) 📝 `tools/anim_clips.py` (+2 -11) 📝 `tools/anim_glb.py` (+3 -6) </details> ### 📄 Description Claimed in the coordination issue as: [ANIM-CLIPS-SHARED-REPORT-PATH](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140060112) ### What and why `tools/anim_clips.py` and `tools/anim_glb.py` shared a private `same_output_path` helper across modules. This PR moves the guard to the common `tools/report_paths.py:same_report_path` implementation and updates both callers. Updating `anim_glb.py` is necessary because it referenced `anim_clips.same_output_path`; removing that helper without updating the caller caused an `AttributeError` when output/input checks ran. A regression covers identical, not-yet-created GLB and report paths, which must be refused before either path is created. ### Tested - `python3 -I tests/test_anim_glb.py` — 37 passed. - `python3 -I tests/test_anim_clips.py` — 53 passed. - `python3 -I tests/test_report_paths.py` — 22 tests, 1 skipped. - `python3 -I tests/test_text_write_line_endings.py` — 3 passed. - `python3 -I tools/anim_clips.py --help` and `python3 -I tools/anim_glb.py --help` — passed. - `python3 -I scripts/check_no_game_data.py tools/anim_clips.py tools/anim_glb.py tests/test_anim_glb.py` — clean. - `git diff --check` — passed. GPUs tested: n/a (CPU-only synthetic tests; no game files used). AI-assisted: yes. ### Checklist - [x] Rebased on current `main` and merges cleanly. - [x] One topic; the `anim_glb.py` change fixes a missed caller of the same shared-guard migration. - [x] No game data, keys or decryption. - [x] No translator rule change (not applicable). --- <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#1119
No description provided.