Skip to content

GEOPY-2657: Allow UIJson forms to accept geoh5py.Entity#866

Merged
domfournier merged 12 commits intodevelopfrom
GEOPY-2657
Mar 31, 2026
Merged

GEOPY-2657: Allow UIJson forms to accept geoh5py.Entity#866
domfournier merged 12 commits intodevelopfrom
GEOPY-2657

Conversation

@domfournier
Copy link
Copy Markdown
Contributor

@domfournier domfournier commented Mar 27, 2026

GEOPY-2657 - Allow UIJson forms to accept geoh5py.Entity

Copilot AI review requested due to automatic review settings March 27, 2026 18:21
@github-actions github-actions bot changed the title GEOPY-2657 GEOPY-2657: Allow UIJson forms to accept geoh5py.Entity Mar 27, 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 form validation/annotation layer so form fields that represent UUIDs can accept Entity instances (and lists of entities) and be automatically converted to UUIDs, with accompanying test updates.

Changes:

  • Added an entity_to_uuid validator to demote Entity inputs to their .uid.
  • Moved several Pydantic Annotated aliases (e.g., MeshTypes, GroupTypes, OptionalUUID*, PathList) into geoh5py/ui_json/annotations.py and updated imports accordingly.
  • Extended tests to cover passing ObjectForm.value as an entity and MultiSelectDataForm.value as a list of data entities.

Reviewed changes

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

File Description
tests/ui_json/forms_test.py Adds coverage for entity/list-of-entity inputs to form value fields.
geoh5py/ui_json/validations/form.py Introduces entity_to_uuid and refactors UUID serialization helpers.
geoh5py/ui_json/forms.py Switches form type aliases to centralized ui_json.annotations and keeps enums local.
geoh5py/ui_json/annotations.py Centralizes shared Annotated aliases and wires in entity_to_uuid as a BeforeValidator.

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 97.64706% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.20%. Comparing base (a4d8267) to head (e962783).
⚠️ Report is 13 commits behind head on develop.

Files with missing lines Patch % Lines
geoh5py/data/__init__.py 85.71% 0 Missing and 1 partial ⚠️
geoh5py/data/data_association_enum.py 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #866      +/-   ##
===========================================
+ Coverage    91.13%   91.20%   +0.07%     
===========================================
  Files          115      112       -3     
  Lines        10353    10338      -15     
  Branches      1915     1911       -4     
===========================================
- Hits          9435     9429       -6     
+ Misses         491      481      -10     
- Partials       427      428       +1     
Files with missing lines Coverage Δ
geoh5py/shared/utils.py 91.37% <100.00%> (+0.06%) ⬆️
geoh5py/shared/validators.py 92.85% <ø> (-0.17%) ⬇️
geoh5py/ui_json/annotations.py 100.00% <100.00%> (ø)
geoh5py/ui_json/forms.py 94.98% <100.00%> (-0.21%) ⬇️
geoh5py/ui_json/ui_json.py 90.15% <100.00%> (-0.11%) ⬇️
geoh5py/ui_json/utils.py 84.56% <100.00%> (+0.19%) ⬆️
geoh5py/ui_json/validation.py 87.70% <100.00%> (+3.45%) ⬆️
geoh5py/data/__init__.py 98.36% <85.71%> (-1.64%) ⬇️
geoh5py/data/data_association_enum.py 94.11% <85.71%> (-5.89%) ⬇️

... 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.

domfournier and others added 2 commits March 30, 2026 08:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

I have the feeling things could be simpler and have a better organization

# Conflicts:
#	geoh5py/ui_json/annotations.py
#	geoh5py/ui_json/forms.py
#	geoh5py/ui_json/validations/form.py
…tion

# Conflicts:
#	geoh5py/shared/utils.py
#	geoh5py/ui_json/annotations.py
#	geoh5py/ui_json/forms.py
#	geoh5py/ui_json/ui_json.py
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.

mostly 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.

good to go!

@domfournier domfournier merged commit 2f2e5e7 into develop Mar 31, 2026
20 checks passed
@domfournier domfournier deleted the GEOPY-2657 branch March 31, 2026 17:36
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