Skip to content

GEOPY-2965: Move tree_levels implementation to grid-apps - #89

Merged
domfournier merged 3 commits into
developfrom
GEOPY-2965
Aug 24, 2026
Merged

domfournier merged 3 commits into
developfrom
GEOPY-2965

Conversation

@domfournier

@domfournier domfournier commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

GEOPY-2965 - Move tree_levels implementation to grid-apps

Copilot AI lite review requested due to automatic review settings August 21, 2026 18:35
@github-actions github-actions Bot changed the title GEOPY-2965 GEOPY-2965: Import tree_levels from grid-apps Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extracts the Octree→TreeMesh “level index” computation into a reusable tree_levels helper and updates octree_2_treemesh to use it, aligning level computation with other Octree-handling code in utils.py.

Changes:

  • Replaced inline Octree level calculation inside octree_2_treemesh with a call to the new tree_levels(mesh) helper.
  • Added tree_levels(mesh: Octree) to compute TreeMesh-level indices from mesh.octree_cells["NCells"].
  • Minor cleanup in cell-size array construction (np.full instead of np.ones(...) * value).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread grid_apps/utils.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@sebhmg sebhmg changed the title GEOPY-2965: Import tree_levels from grid-apps GEOPY-2965: Move tree_levels implementation to grid-apps Aug 24, 2026

@sebhmg sebhmg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: add tests

Comment thread grid_apps/utils.py
@domfournier
domfournier changed the base branch from feature/uijson to develop August 24, 2026 17:03
@domfournier
domfournier merged commit 6a1019f into develop Aug 24, 2026
17 checks passed
@domfournier
domfournier deleted the GEOPY-2965 branch August 24, 2026 21:16
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.

3 participants