Skip to content

[Backport release-3.0] [py] Add to_dict() and __repr__ to PlatformConfig and PlatformSchemaConfig#4460

Merged
jp-dark merged 1 commit into
release-3.0from
backport-4458-to-release-3.0
May 15, 2026
Merged

[Backport release-3.0] [py] Add to_dict() and __repr__ to PlatformConfig and PlatformSchemaConfig#4460
jp-dark merged 1 commit into
release-3.0from
backport-4458-to-release-3.0

Conversation

@github-actions

@github-actions github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

Backport 2ed76cb from #4458.

…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 jp-dark merged commit 270d944 into release-3.0 May 15, 2026
1 check passed
@jp-dark jp-dark deleted the backport-4458-to-release-3.0 branch May 15, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants