Skip to content

GEOPY-2744: Migrate core utilities to geoapps-utils and geoh5py#862

Merged
domfournier merged 3 commits intodevelopfrom
GEOPY-2744
Mar 25, 2026
Merged

GEOPY-2744: Migrate core utilities to geoapps-utils and geoh5py#862
domfournier merged 3 commits intodevelopfrom
GEOPY-2744

Conversation

@MatthieuCMira
Copy link
Copy Markdown
Contributor

@MatthieuCMira MatthieuCMira commented Mar 24, 2026

GEOPY-2744 - Migrate core utilities to geoapps-utils and geoh5py
transfer fill and to_uijson_group functions from geopy-aq to uijson

@github-actions github-actions bot changed the title GEOPY-2744 GEOPY-2744: Migrate core utilities to geoapps-utils and geoh5py Mar 24, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.19%. Comparing base (8a2adcc) to head (9f20963).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
geoh5py/ui_json/ui_json.py 92.85% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #862   +/-   ##
========================================
  Coverage    91.18%   91.19%           
========================================
  Files          115      115           
  Lines        10298    10332   +34     
  Branches      1901     1911   +10     
========================================
+ Hits          9390     9422   +32     
- Misses         485      486    +1     
- Partials       423      424    +1     
Files with missing lines Coverage Δ
geoh5py/ui_json/ui_json.py 90.25% <92.85%> (+0.81%) ⬆️

... and 1 file with indirect coverage changes

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

Copy link
Copy Markdown

Copilot AI left a comment

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 moves fill and to_ui_json_group functionality into geoh5py.ui_json.BaseUIJson, and adds unit tests to validate the new behaviors.

Changes:

  • Added BaseUIJson.fill() for updating form values (in-place or via copy).
  • Added BaseUIJson.to_ui_json_group() for persisting a UI JSON configuration into a UIJsonGroup in a workspace.
  • Expanded tests/ui_json/uijson_test.py with coverage for both new methods.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
geoh5py/ui_json/ui_json.py Adds fill() and to_ui_json_group(), adjusts config/validators, and tweaks read() behavior for empty-string handling.
tests/ui_json/uijson_test.py Introduces new tests validating fill() semantics and to_ui_json_group() group creation/options.
Comments suppressed due to low confidence (1)

geoh5py/ui_json/ui_json.py:119

  • The valid_geoh5_extension validator accepts None (it checks path is not None), but its signature is path: Path. Update the parameter type to Path | None to match the model field and avoid type-checking issues.
    @field_validator("geoh5", mode="after")
    @classmethod
    def valid_geoh5_extension(cls, path: Path):
        if path is not None and path.suffix != ".geoh5":
            raise ValueError(
                f"Workspace path: {path} must have a '.geoh5' file extension."
            )
        return path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

domfournier
domfournier previously approved these changes Mar 25, 2026
Remove model_field usage to avoid deprecation error
@domfournier domfournier merged commit 61d64e0 into develop Mar 25, 2026
20 checks passed
@domfournier domfournier deleted the GEOPY-2744 branch March 25, 2026 19:48
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