GEOPY-2739: Accept BaseUIJson in the start of driver#860
GEOPY-2739: Accept BaseUIJson in the start of driver#860domfournier wants to merge 36 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
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
BaseUIJsontoUIJsoningeoh5py.ui_json.ui_json. - Update UI JSON tests to subclass/use
UIJsoninstead ofBaseUIJson. - Update the
geoh5py.ui_jsonpackage export to re-exportUIJson.
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 Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
…into GEOPY-2739 # Conflicts: # geoh5py/ui_json/ui_json.py # geoh5py/ui_json/validations/__init__.py # geoh5py/ui_json/validations/uijson.py
# Conflicts: # geoh5py/ui_json/ui_json.py # geoh5py/ui_json/validations/__init__.py # geoh5py/ui_json/validations/uijson.py # tests/ui_json/uijson_test.py
# Conflicts: # geoh5py/ui_json/ui_json.py
| def infer(title="UnknownUIJson", **kwargs) -> type[UIJson]: | ||
| """ | ||
| Create a UIJson class based on inferred forms. | ||
| """ |
| @@ -945,7 +924,7 @@ def nan2str(value): | |||
|
|
|||
|
|
|||
| def str2none(value): | |||
There was a problem hiding this comment.
typing and docstrings
MatthieuCMira
left a comment
There was a problem hiding this comment.
check for the Form accepting multiselect, and accept list of expected values
| ] | ||
|
|
||
| OptionalUUID = Annotated[ | ||
| UUID | None, |
There was a problem hiding this comment.
This is from a past merge, but when multiselect is True (eg. in DataForm), we should be able to accept a list of UUIDs
note other forms could suffer from the same mistake?
correct the form as group_optiomnal can act as optional
for more information, see https://pre-commit.ci
GEOPY-2739 - Accept BaseUIJson in the start of driver