Repository navigation
Test view colour packing, empty contours and CLI exits - #36
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Benchmarks
Kernels
End to endEach round is the command line in a fresh interpreter, start-up included. Peak RSS is the largest the child process reached over the rounds.
|
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.
Tests-only: strengthens
tests/test_view.pyforrupture_generator/view.py.What the new tests pin down
_packedputs channels into packed0xRRGGBBAAuint32 values, rounds each channel and sets alpha to0xFF. The test checks exact values, including fractional inputs that have to round.VIRIDISandHOTeach have 256 shades, with exact endpoints (0x440154FF/0xFDE725FFand black/white)._coloursclips values outside[low, high]to the ends of the map and puts a midpoint on shade 127._isochronesreturns an empty(0, 2, 3)array when no edge crosses the level._onset_contoursreturns empty lines and anchors and no labels for a rupture whose onset is the same everywhere._positive_secondsaccepts a valid--step, andmainrecords with a non-default step.mainexits with status 2 and prints arupture-view:message for a missing file and for a file that isn't an SRF, and writes no recording in either case. When rerun-sdk can't be imported, it exits with status 2 and says to installrupture-generator[vis].Coverage of
view.pyif __name__ == "__main__"guard)Mutants
The new
_packedexact-value test and the colour-map endpoint test kill all 13 surviving_packedmutants:None. Each one either raises or skips the uint32 cast.|into&, which drops channels or alpha.<<to>>, which drops a channel.256instead of0xFF.I judged none of the survivors equivalent.
No issues filed: none of the tests showed the code doing something wrong.
🤖 Generated with Claude Code