Skip to content

SDK: give a panel tree its nodes and choose one - #3

Merged
jgregoriorincon merged 1 commit into
opengeos:mainfrom
jgregoriorincon:feat/panel-tree-nodes
Oct 31, 2026
Merged

jgregoriorincon merged 1 commit into
opengeos:mainfrom
jgregoriorincon:feat/panel-tree-nodes

Conversation

@jgregoriorincon

Copy link
Copy Markdown
Contributor

Summary

The Python SDK now knows the panel tree widget (opengeos/RustGIS#1080), with the same names as the Rust SDK (opengeos/rustgis-plugins#33):

  • Node(id, label, count=None, children=[]), a dataclass. Its to_dict() leaves out count when it is None and children when 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.value is typed bool | int | str | None: a tree takes a node's id, or None for no node chosen.
  • README: the tree among the panel's widgets, and that it needs a RustGIS newer than 0.4.0, which refuses a manifest with one.

The panel starter stays as it is. scripts/package.py runs 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 second nodes() replacing the first while keeping the widget's label.
  • ruff check and ruff format --check (0.14.0, as in pre-commit) pass.

Closes #2

@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a3abaaef-1933-47a5-a168-1624d9fefd66
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@jgregoriorincon
jgregoriorincon merged commit 42494a1 into opengeos:main Oct 31, 2026
6 checks passed
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.

SDK: give a panel tree its nodes and choose one (RustGIS #1080)

1 participant