Skip to content

world_interior_names: no reports/ report unless --out is given (EGEN-WORLDINTERIOR-OUT-DEFAULT) - #6177

Open
evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/9-world-interior-out-default
Open

evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/9-world-interior-out-default

Conversation

@evilclanker9000

@evilclanker9000 evilclanker9000 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

tools/world_interior_names.py defaults --out to reports/world_interior_names.json, so a run started in the checkout wrote that report there without being asked. It is the report the tool's own docstring calls out: "--out also lists every key's hash, match and distances: game data, keep it local." A run that only wants the counts should not leave game data in the working folder, and a reports/ default relative to the current directory also lands wherever the shell happens to be.

What changed:

  • --out has no default. Without it the run prints the counts on stdout and writes no file. docs/world.md and the tests always pass --out explicitly, so no caller that made a report loses it.
  • a --out the run cannot write (a parent that is a file, a read-only folder) is one world_interior_names.py: --out <path>: <reason> stderr line and exit 2, instead of an os.makedirs traceback after the whole scan.
  • the overwrite and --out is a directory guards now only run when --out is given.

Test (no GPU, no game files): python -I tests/test_world_interior_names.py, two new checks in CliTest.

Before (561b65a8 plus the new tests only):

E...F........................
ERROR: test_an_out_it_cannot_write_is_one_line (__main__.CliTest....)
  File "...\tools\world_interior_names.py", line 410, in main
    os.makedirs(os.path.dirname(out_abs), exist_ok=True)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: '...\blocker'
FAIL: test_no_report_is_written_without_out
AssertionError: True is not false
Ran 29 tests in 0.931s
FAILED (failures=1, errors=1)

After:

.............................
Ran 29 tests in 0.721s

OK

GPU: none needed. Windows 11, Python 3.13 under python -I.

Notes

AI-assisted.

The default --out wrote reports/world_interior_names.json into the folder the tool was started from, and that report holds every key's hash and distances, which the tool's own docstring calls game data to keep local. --out is now the only way to get the file; the counts on stdout are unchanged. A --out the run cannot write (a parent that is a file, a read-only folder) is now one error line and exit 2 instead of a traceback after the whole scan.
Two checks on the CLI: a run without --out writes no reports/ folder in its working directory and still prints the summary, and an --out whose parent is a file gives one stderr line and exit 2. Both failed before the tool change (the folder was created, and makedirs raised FileExistsError).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant