Repository navigation
feat: summarize RasterArray metadata in repr - #183
Merged
kylebarron merged 2 commits intoOct 28, 2026
Merged
Conversation
kylebarron
reviewed
Oct 27, 2026
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.
RasterArraycurrently uses the dataclass representation, which prints all raster/mask values and a private parent object. A small array can produce a long debug message, and a larger array depends on NumPy truncation settings.Add a compact representation with the existing namespace style, shape in
(bands, height, width)order, dtype, and explicit-mask presence:Three fixture-based regressions cover uint8 RGB with and without an explicit mask, and a one-band float32 raster. Each assertion runs with NumPy's print threshold set to infinity. Raster operations and stored fields are unchanged.
Related to #53. This covers
RasterArray;GeoTIFFandOverviewrepresentations remain separate work.Validation on macOS arm64 / CPython 3.14.7:
An extra repository-wide Ruff format check flags two unchanged Markdown snippets (
dev-docs/specs/2026-10-26-geokey-crs-conformance-design.mdanddocs/blog/posts/introducing-async-geotiff.md). The current CI requires Ruff lint and strict docs; both pass. No unrelated formatting changes are included.Thanks to @kylebarron for issue #53 and to the existing developmentseed/geotiff-test-data fixture corpus. Codex assisted with implementation, tests, validation, and review. Existing licensing and fixture attribution are preserved.
Review follow-up: quote the dtype string and remove the API-page paragraph, as requested by @kylebarron. The three updated assertions failed before the formatter change; the full suite and the local quality checks above passed again after it. This changes only dtype formatting, not the constructor or array data. Captured review verification logs.
The image below captures the original pre-review output; the current representation quotes the dtype as shown above.