Skip to content

GEOPY-2739: Accept BaseUIJson in the start of driver#860

Open
domfournier wants to merge 36 commits intodevelopfrom
GEOPY-2739
Open

GEOPY-2739: Accept BaseUIJson in the start of driver#860
domfournier wants to merge 36 commits intodevelopfrom
GEOPY-2739

Conversation

@domfournier
Copy link
Copy Markdown
Contributor

@domfournier domfournier commented Mar 21, 2026

GEOPY-2739 - Accept BaseUIJson in the start of driver

Copilot AI review requested due to automatic review settings March 21, 2026 15:23
@github-actions github-actions bot changed the title GEOPY-2739 GEOPY-2739: Accept BaseUIJson in the start of driver Mar 21, 2026
Copy link
Copy Markdown
Contributor

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 updates the UI JSON model naming by renaming the core BaseUIJson class to UIJson, and adjusts tests/imports accordingly to match the new API surface.

Changes:

  • Rename BaseUIJson to UIJson in geoh5py.ui_json.ui_json.
  • Update UI JSON tests to subclass/use UIJson instead of BaseUIJson.
  • Update the geoh5py.ui_json package export to re-export UIJson.

Reviewed changes

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

File Description
geoh5py/ui_json/ui_json.py Renames the core model class and updates read() logic/type hints to reference UIJson.
geoh5py/ui_json/init.py Switches the package-level export from BaseUIJson to UIJson.
tests/ui_json/uijson_test.py Updates tests to use UIJson for subclassing/reading.
tests/ui_json/forms_test.py Updates helper test model to subclass UIJson.

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 85.26316% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.15%. Comparing base (f5eca37) to head (a711a10).

Files with missing lines Patch % Lines
geoh5py/ui_json/ui_json.py 83.20% 16 Missing and 6 partials ⚠️
geoh5py/ui_json/validation.py 81.81% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #860      +/-   ##
===========================================
- Coverage    91.23%   91.15%   -0.09%     
===========================================
  Files          112      112              
  Lines        10369    10399      +30     
  Branches      1908     1913       +5     
===========================================
+ Hits          9460     9479      +19     
- Misses         481      490       +9     
- Partials       428      430       +2     
Files with missing lines Coverage Δ
geoh5py/shared/utils.py 91.11% <100.00%> (-0.27%) ⬇️
geoh5py/shared/validators.py 93.90% <ø> (+1.04%) ⬆️
geoh5py/ui_json/__init__.py 100.00% <100.00%> (ø)
geoh5py/ui_json/annotations.py 100.00% <100.00%> (ø)
geoh5py/ui_json/forms.py 95.15% <100.00%> (-0.10%) ⬇️
geoh5py/ui_json/input_file.py 86.34% <100.00%> (+0.04%) ⬆️
geoh5py/ui_json/validation.py 85.85% <81.81%> (-1.85%) ⬇️
geoh5py/ui_json/ui_json.py 85.64% <83.20%> (-3.86%) ⬇️

... and 2 files 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
Contributor

@MatthieuCMira MatthieuCMira left a comment

Choose a reason for hiding this comment

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

ok with the changes.

only typical docstrings comments

Still, that's a lot of function's names changes. Isn't it a bit dangerous to add it to 4.8?

def infer(title="UnknownUIJson", **kwargs) -> type[UIJson]:
"""
Create a UIJson class based on inferred forms.
"""
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.

docstrings

@@ -945,7 +924,7 @@ def nan2str(value):


def str2none(value):
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.

typing and docstrings

Copy link
Copy Markdown
Contributor

@MatthieuCMira MatthieuCMira left a comment

Choose a reason for hiding this comment

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

check for the Form accepting multiselect, and accept list of expected values

]

OptionalUUID = Annotated[
UUID | None,
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.

This is from a past merge, but when multiselect is True (eg. in DataForm), we should be able to accept a list of UUIDs

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