[PR #876] [MERGED] OLD-7279: script_qtable: sort _BinFolderSource hex offsets numerically, skip .bin subdirs, and sort type_query histograms numerically #914

Closed
opened 2026-11-26 20:19:28 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/876
Author: @narekshaghoyandev
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: ubiq-script-qtable-bin-folder-order


📝 Commits (1)

  • 1ebe352 script_qtable: sort _BinFolderSource hex offsets numerically, skip .bin subdirs, and sort type_query histograms numerically

📊 Changes

2 files changed (+68 additions, -9 deletions)

View changed files

📝 tests/test_script_qtable.py (+45 -0)
📝 tools/script_qtable.py (+23 -9)

📄 Description

Reopening my original upstream PR #7279 (previously verified on Windows 11 Py3.12/3.15 and Linux by @AsgerCode, @memorypressure, and @airp1ane), cleanly rebased onto main:

  1. Sort _BinFolderSource hex offsets numerically & skip .bin subdirectories: Avoids lexicographic reversal of mixed-width/mixed-case hex .bin names when joining split 64 KiB streams, and skips subdirectories whose names end with .bin instead of crashing on open (IsADirectoryError / PermissionError).
  2. Sort type_query histograms numerically: Orders numeric histogram keys (size, count, etc.) numerically instead of lexicographically ("112" before "32").

Verification

  • python3 -I tests/test_script_qtable.py -v: 10/10 pass (both new tests fail/error against main).
  • python3 -I scripts/check_no_game_data.py tools/script_qtable.py tests/test_script_qtable.py: clean.
  • python3 -m compileall -q tools/script_qtable.py tests/test_script_qtable.py: clean.

Claimed in the coordination issue as: OLD-7279 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135100661)
AI-assisted: yes (Gemini)


🔄 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/876 **Author:** [@narekshaghoyandev](https://github.com/narekshaghoyandev) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `ubiq-script-qtable-bin-folder-order` --- ### 📝 Commits (1) - [`1ebe352`](https://github.com/ubiquitarianism/leonida/commit/1ebe352f11d96bdd86a3dbd68baeeb8dcd70b002) script_qtable: sort _BinFolderSource hex offsets numerically, skip .bin subdirs, and sort type_query histograms numerically ### 📊 Changes **2 files changed** (+68 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_script_qtable.py` (+45 -0) 📝 `tools/script_qtable.py` (+23 -9) </details> ### 📄 Description Reopening my original upstream PR #7279 (previously verified on Windows 11 Py3.12/3.15 and Linux by `@AsgerCode`, `@memorypressure`, and `@airp1ane`), cleanly rebased onto `main`: 1. **Sort `_BinFolderSource` hex offsets numerically & skip `.bin` subdirectories**: Avoids lexicographic reversal of mixed-width/mixed-case hex `.bin` names when joining split 64 KiB streams, and skips subdirectories whose names end with `.bin` instead of crashing on open (`IsADirectoryError` / `PermissionError`). 2. **Sort `type_query` histograms numerically**: Orders numeric histogram keys (`size`, `count`, etc.) numerically instead of lexicographically (`"112"` before `"32"`). ### Verification - `python3 -I tests/test_script_qtable.py -v`: 10/10 pass (both new tests fail/error against `main`). - `python3 -I scripts/check_no_game_data.py tools/script_qtable.py tests/test_script_qtable.py`: clean. - `python3 -m compileall -q tools/script_qtable.py tests/test_script_qtable.py`: clean. Claimed in the coordination issue as: OLD-7279 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135100661) AI-assisted: yes (Gemini) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:28 +01:00
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#914
No description provided.