Merged
Conversation
added 8 commits
March 18, 2026 14:55
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a first-pass “Mapset” structure and export workflow so the GUI can configure cf-plot map projections and export plot/data/code outputs, while also improving plot viewport sizing and resilience to some backend read errors.
Changes:
- Introduces contour map projection options (projection, bbox/boundinglat, resolution) and wires them into worker-side plotting via
cfp.mapset(...). - Adds an “Export” control that supports saving Plot / Data / Code / All, including worker-side data export via
cf.write. - Adds a toggle to show/hide the selection info panel and refines plot-window aspect/letterboxing behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| xconv2/xconv_cf_interface.py | Adds backend-tolerant range calculation, data saving helper, and mapset handling in contour plotting. |
| xconv2/cf_templates.py | Extends generated worker code to support mapset options and data-save code paths. |
| xconv2/main_window.py | Adds UI→worker requests for saving data and “save all”; adjusts emit-image logic accordingly. |
| xconv2/ui/contour_options_controller.py | Adds GUI controls for map projection + bbox/boundinglat + resolution and stores them in contour options. |
| xconv2/ui/plot_view_controller.py | Reworks save UI into Export + mode selector; improves plot resizing/aspect fitting. |
| xconv2/ui/selection_controller.py | Centralizes enabling/disabling save/export controls and updates summary formatting. |
| xconv2/core_window.py | Adds selection info panel toggle button + state management hooks. |
| xconv2/ui/settings_store.py | Persists last_save_data_dir. |
| xconv2/ui/plot_options_shared.py | Small layout tweaks for titles/annotations option sections. |
| tests/test_contour.py | Updates tests for new save behavior and contour-range fallback path. |
| tests/test_cf_interface.py | Updates contour-save expectations and adds test for save_selected_field_data. |
| tests/test_coordinate_flow.py | Adds coverage for selection-info toggle and plot-window width heuristics. |
| pyproject.toml | Adds pytest warning filters for known upstream deprecations. |
| environment.yml | Adds cartopy/udunits2 and editable install for local development. |
| environment-integration.yml | Adds editable install for integration environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Despite the failure to build 3.14, I'm going to merge this, as the right fix for that is really here NCAS-CMS/cfdm#395 |
|
|
||
| dependencies: | ||
| - python >=3.12 | ||
| - python >=3.12,<3.14 |
Contributor
|
when the PR affects maintenance, can I please be included for a review as well? 🍺 |
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.
This addresses #21. Most options work, at least partially. There are upstream issues unfortunately #35, but we can't fix those now. We need to get the basic structure in to guide eventual code restructuring, here, and in cfplot itself.