Repository navigation
14 Three small fixes: kill zone selections, placement files, and the -g bts view - #30
Merged
Merged
Conversation
adamf
force-pushed
the
pr14-small-fixes
branch
from
September 26, 2026 20:31
3b58bc8 to
48cb819
Compare
…-g bts view **Builds on PR 8 (seanth#24).** It doesn't depend on PRs 10–13. [This PR's changes on their own](pr8-web-viewer...pr14-small-fixes). ## Three small fixes: kill zone selections, placement files, and the `-g bts` view None of these change a normal run. They only matter for input files with mistakes in them, or for the one graphics view that crashed. All the characterization recordings match except `graphics_outputs`, where the `-g bts` stage now makes its files instead of crashing. ### 1. A kill zone's `selection` missing a part crashed (`vevents.py`) `readZoneSelection` checked `("attribute" and "logic" and "value") in theSelectionDict`. In Python, `("attribute" and "logic" and "value")` is just `"value"`, so only `value` was checked. A selection without `attribute` or `logic` then crashed with a `KeyError`, instead of printing the warning and ignoring the selection, which is what the code meant to do. Each of the three is now checked. ### 2. A placement file with bad lines could lose good ones (`vplacement.py`) `checkSeedPlacementList` deleted bad lines from the list while looping over it. That skipped the line after each deleted one, so: - a bad line straight after another bad one was kept; - a later bad line could make it delete the wrong line. It now keeps the good lines in a new list instead. ### 3. `-g bts` crashed (`vgraphics.py`) The combined bottom + top + side view filled the side view's template, which takes six numbers, with only four. It now gets six, the same way the other side views get theirs. The `.cfdg` files it makes are now pinned by the `graphics_outputs` scenario. I haven't seen the picture itself (the tests don't run the `cfdg` program), and that view's layout code looks unfinished, so it's worth a look. ### Tests - **Unit tests:** - a selection missing each of its three parts is ignored (the old code crashes on two of them); - a placement file with several bad lines, two of them in a row, keeps exactly the good ones. This replaces the test that pinned the old behaviour. - **Characterization:** `graphics_outputs` re-recorded. Its first two stages are identical to before; the third now makes files instead of crashing. The test README's list of bugs found is updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013425y5x98TqAv3BvHodpdx
adamf
force-pushed
the
pr14-small-fixes
branch
from
September 27, 2026 17:12
48cb819 to
2fa24c2
Compare
adamf
pushed a commit
to adamf/vida
that referenced
this pull request
Oct 3, 2026
… server This branch had the first versions of the series (PRs 5 to 17), which have since been rebuilt on Sean's terrain-org (with his changes since: new species, event and terrain files for the southern forest project, and more). This merge takes that up-to-date code: - upstream terrain-org (4de5778), with seanth#21-seanth#30 merged; - PRs 15-17 (seanth#31-seanth#33, still open); - the viewer's side-view height and void surroundings (pr18-viewer-void); - the web server (pr19-web-server); and keeps what is only on this branch: the world-scale prototype (worldscale/, its tests, and its CI jobs), and __pycache__/ and .pytest_cache/ in .gitignore. Where the two differed, the up-to-date code was taken. All 178 tests pass, the world-scale ones included (with the Rust module built). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013425y5x98TqAv3BvHodpdx
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.
Builds on PR 9 (#25). It doesn't depend on PRs 10–13. This PR's changes on their own.
Three small fixes: kill zone selections, placement files, and the
-g btsviewNone of these change a normal run. They only matter for input files with mistakes in them, or for the one graphics view that crashed. All the characterization recordings match except
graphics_outputs, where the-g btsstage now makes its files instead of crashing.1. A kill zone's
selectionmissing a part crashed (vevents.py)readZoneSelectionchecked("attribute" and "logic" and "value") in theSelectionDict. In Python,("attribute" and "logic" and "value")is just"value", so onlyvaluewas checked. A selection withoutattributeorlogicthen crashed with aKeyError, instead of printing the warning and ignoring the selection, which is what the code meant to do. Each of the three is now checked.2. A placement file with bad lines could lose good ones (
vplacement.py)checkSeedPlacementListdeleted bad lines from the list while looping over it. That skipped the line after each deleted one, so:It now keeps the good lines in a new list instead.
3.
-g btscrashed (vgraphics.py)The combined bottom + top + side view filled the side view's template, which takes six numbers, with only four. It now gets six, the same way the other side views get theirs. The
.cfdgfiles it makes are now pinned by thegraphics_outputsscenario. I haven't seen the picture itself (the tests don't run thecfdgprogram), and that view's layout code looks unfinished, so it's worth a look.Tests
graphics_outputsre-recorded. Its first two stages are identical to before; the third now makes files instead of crashing. The test README's list of bugs found is updated.🤖 Generated with Claude Code
https://claude.ai/code/session_013425y5x98TqAv3BvHodpdx