Repository navigation
world_interior_names: no reports/ report unless --out is given (EGEN-WORLDINTERIOR-OUT-DEFAULT) - #6177
Open
evilclanker9000 wants to merge 2 commits into
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tools/world_interior_names.pydefaults--outtoreports/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: "--outalso 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 areports/default relative to the current directory also lands wherever the shell happens to be.What changed:
--outhas no default. Without it the run prints the counts on stdout and writes no file.docs/world.mdand the tests always pass--outexplicitly, so no caller that made a report loses it.--outthe run cannot write (a parent that is a file, a read-only folder) is oneworld_interior_names.py: --out <path>: <reason>stderr line and exit 2, instead of anos.makedirstraceback after the whole scan.--out is a directoryguards now only run when--outis given.Test (no GPU, no game files):
python -I tests/test_world_interior_names.py, two new checks inCliTest.Before (
561b65a8plus the new tests only):After:
GPU: none needed. Windows 11, Python 3.13 under
python -I.Notes
reports/under the tool folder still writes game data into the checkout, which is what the rule forbids; dropping the default is the smaller change and matches what world_archetypes: write a report only when --out is given, not into a default reports/ folder (EGEN-WORLDARCH-OUT-CWD, DeepSeek2) #6115 (world_archetypes) and world_index: no reports/ default for --out (EGEN-WORLD-INDEX-OUT-DEFAULT) #6152 (world_index) do today.pe_inspect.pyandrpf_probe.pyalso default--outinto the repository'sreports/, but throughos.path.dirname(__file__), not the working directory, andscripts/first_look.ps1passespe_inspect's--out. Whether those two should lose their default is a separate decision for the maintainer, so I left them alone and posted it as a finding.AI-assisted.