Repository navigation
SDK: give a panel tree its nodes and choose one - #3
Merged
jgregoriorincon merged 1 commit intoOct 31, 2026
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Summary
The Python SDK now knows the panel
treewidget (opengeos/RustGIS#1080), with the same names as the Rust SDK (opengeos/rustgis-plugins#33):Node(id, label, count=None, children=[]), a dataclass. Itsto_dict()leaves outcountwhen it isNoneandchildrenwhen there are none, as the Rust SDK does.Panel.nodes(widget, nodes)gives a tree its nodes (items.<widget>.nodes), replacing the ones it had.Panel.valueis typedbool | int | str | None: a tree takes a node's id, orNonefor no node chosen.The
panelstarter stays as it is.scripts/package.pyruns the registry's own checks, which accept trees since opengeos/rustgis-plugins#33.Testing
pytest: a new test covers nodes with counts (including 0) and children, an empty tree, a chosen node, none chosen, and a secondnodes()replacing the first while keeping the widget's label.ruff checkandruff format --check(0.14.0, as in pre-commit) pass.Closes #2