Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate model and view code in the computed object and inspector tree #2167

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

naschmitz
Copy link
Collaborator

Before, get_info returned a widget representing the computed object. Now, get_info calls build_computed_object_tree to build an intermediate representation of the computed object. The intermediate representation is converted to a widget.

The advantage of this intermediate representation is:

  • the majority of the tree traversal logic can be tested by comparing the resulting tree as JSON, and
  • the tree can be reconstructed with different views (e.g. ipytree, custom inspector widget, etc.).

@naschmitz naschmitz added the refactor Used for code refactors label Nov 7, 2024
Copy link
Collaborator

@sufyanAbbasi sufyanAbbasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sweet refactor! I think the code really improved in readability. I have a few more suggestions, otherwise, LGTM!

geemap/coreutils.py Outdated Show resolved Hide resolved
geemap/coreutils.py Outdated Show resolved Hide resolved
geemap/coreutils.py Outdated Show resolved Hide resolved
@naschmitz naschmitz force-pushed the inspector-tree-refactor branch from f96917f to bd187c9 Compare November 10, 2024 19:13
@naschmitz naschmitz merged commit a52f468 into gee-community:master Nov 11, 2024
15 checks passed
@naschmitz naschmitz deleted the inspector-tree-refactor branch November 11, 2024 16:09
@giswqs
Copy link
Member

giswqs commented Nov 11, 2024

@naschmitz I suggest using the Squash and merge for merging future pull requests. That can reduce the number of commits in the repo commit history and making it easier to include the pull request number in the release notes.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Used for code refactors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants