chore: dithering binding robustness, pipeline repair, and docs#46
Closed
davelee98 wants to merge 1 commit into
Closed
chore: dithering binding robustness, pipeline repair, and docs#46davelee98 wants to merge 1 commit into
davelee98 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
g4bri3lDev
reviewed
Jul 5, 2026
Member
There was a problem hiding this comment.
Changelog is generated by release please.
g4bri3lDev
reviewed
Jul 5, 2026
Member
There was a problem hiding this comment.
Changelog is generated by release please.
g4bri3lDev
reviewed
Jul 5, 2026
Member
There was a problem hiding this comment.
Changelog is generated by release please.
Contributor
Author
There was a problem hiding this comment.
Will fix and resubmit.
g4bri3lDev
requested changes
Jul 5, 2026
Phases 3-5 of the code-review follow-up (stacked on the math + perf fixes): Robustness (Issues OpenDisplay#7, OpenDisplay#9): - ImageBuffer::new validates width and buffer length (panics on zero width / ragged buffer) instead of silently truncating in release; contract backstopped by tests. - Python and WASM dither_image validate image dimensions and accent_idx before constructing the buffer/palette, returning proper ValueError/JsValue errors rather than panicking the extension. - JS ditherImage throws a clear error when a measured palette's accent name is not one of its colors (previously passed -1 into WASM → opaque abort). Adds a vitest case. Tooling & docs (Issues OpenDisplay#5, OpenDisplay#6, OpenDisplay#10): - Expose tone_compress, gamut_compress, and rgb_to_oklab_buffer on the Python _rs module and repair scripts/pipeline.py, which imported modules deleted in the Rust port. Runs end-to-end again. - Drop the stale examples/wab_sweep.rs reference in the WAB doc comment. - CALIBRATION.md: document that palette values must be sRGB-encoded (not linear-light), with the encoding formula for linear-workflow (DNG) measurements. CHANGELOGs updated for all three packages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fb25f39 to
2ade88a
Compare
Contributor
Author
|
Superseded by #48 (fresh PR with identical content). |
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.
Phases 3-5 of the dithering code-review follow-up: binding robustness, tooling, and docs. Follows #45 (now merged); rebased onto
main, so this contains only its own changes.Robustness
ImageBuffer::newvalidates width and buffer length (panics on zero width / ragged buffer) instead of silently truncating in release builds; backed by unit tests.dither_imagevalidate image dimensions andaccent_idxbefore constructing the buffer/palette, returning properValueError/JsValueerrors instead of panicking the extension.ditherImagethrows a clear error when a measured palette'saccentname isn't one of its colors (previously passed-1into WASM → opaque abort). New vitest case.Tooling & docs
tone_compress,gamut_compress, andrgb_to_oklab_bufferon the Python_rsmodule and repairscripts/pipeline.py, which imported modules deleted in the Rust port. Verified it runs end-to-end producing the 6-panel visualization.examples/wab_sweep.rsreference in the WAB doc comment (the file never existed).CHANGELOGs updated for all three packages (covering the #45 fixes and these changes).
Verification
Core 51 unit + 3 regression tests, Python 81 pytest, JS 39 vitest all pass; WASM core rebuilt;
pipeline.pyruns clean and ruff-checked.🤖 Generated with Claude Code