[Backport release-3.0] [py] Add to_dict() and __repr__ to PlatformConfig and PlatformSchemaConfig#4460
Merged
Merged
Conversation
…SchemaConfig` (#4458) * fix(python): bind dense_nd_array_dim_zstd_level to the correct field The pybind11 binding for `PlatformConfig.dense_nd_array_dim_zstd_level` was aliased to `&PlatformConfig::sparse_nd_array_dim_zstd_level`, so mutations to the dense level silently overwrote the sparse level and reads always returned the sparse level. Bind it to the correct member. Adds a regression test that verifies both fields can be set and read back independently. * feat(python): add to_dict() and __repr__ to PlatformConfig and PlatformSchemaConfig Both pybind11-bound config structs now expose: * `to_dict()` — returns a Python dict of all fields, useful for diagnostic logging, serialization, and structural comparison. * `__repr__` — readable single-line representation showing each field and its current value. The optional fields `tile_order` and `cell_order` render as `None` when unset and `'value'` when set. * docs(python): correct schema_config_options return type in docstring (cherry picked from commit 2ed76cb)
jp-dark
approved these changes
May 5, 2026
jp-dark
approved these changes
May 5, 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.
Backport 2ed76cb from #4458.