Skip to content

Display Stats in the Topo Editor on zoom#84

Open
manishvenu wants to merge 56 commits into
mainfrom
stats_topo_editor
Open

Display Stats in the Topo Editor on zoom#84
manishvenu wants to merge 56 commits into
mainfrom
stats_topo_editor

Conversation

@manishvenu
Copy link
Copy Markdown
Collaborator

REPLACES #77

Changes:

Once the zoom reaches a threshold (40 cells) show the cell stats in the cell
Create new buttons to set the depth to those stat numbers if wanted.
Question:
You can use the buttons even if you don't see the stats, which only show up when you zoom in. Is that good behavior?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

📄 Preview your docs here:
👉 https://NCAR.github.io/mom6_forge/pr-84/index.html

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 8.88889% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.28%. Comparing base (4103083) to head (d25afda).

Files with missing lines Patch % Lines
mom6_forge/topo_editor.py 8.23% 78 Missing ⚠️
mom6_forge/_supergrid.py 25.00% 2 Missing and 1 partial ⚠️
mom6_forge/topo.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   40.11%   39.28%   -0.83%     
==========================================
  Files          15       15              
  Lines        3231     3319      +88     
  Branches      346      366      +20     
==========================================
+ Hits         1296     1304       +8     
- Misses       1883     1962      +79     
- Partials       52       53       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from compute_stats to main May 22, 2026 20:28
- Replace all _topo_stats references with topo.stats (the public property
  on Topo that delegates to src._computed_stats); the old attribute name
  never existed, so stats buttons and overlay were permanently inert
- Normalize qlon to [0, 360) in _on_zoom_change to match xlim normalization,
  and handle the wrap-around case when the view crosses the 0/360 boundary
- Remove duplicate on_click registrations for stat buttons (each fired twice)
- Remove unused _stats_text annotation that was created but never shown
- from_ds: gracefully handle missing 'radius' attr with a warning
  that dx, dy, and area cannot be recalculated without the original radius
- topo.py:1372: use self.tmask instead of non-existent self.mask
@manishvenu manishvenu requested a review from alperaltuntas May 29, 2026 16:33
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