Skip to content

GEOPY-2746: implement "Group Value" in BaseUIJSON#848

Merged
domfournier merged 15 commits intodevelopfrom
GEOPY-2746
Mar 17, 2026
Merged

GEOPY-2746: implement "Group Value" in BaseUIJSON#848
domfournier merged 15 commits intodevelopfrom
GEOPY-2746

Conversation

@MatthieuCMira
Copy link
Contributor

@MatthieuCMira MatthieuCMira commented Mar 6, 2026

GEOPY-2746 - "Group Value" form is not implemented in BaseUIJSON
add a new form for multi Data Group

accept tooltips as list

Copy link

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

Adds a new ui.json form type for selecting multiple data items from within a group, and broadens tooltip handling across all forms.

Changes:

  • Introduces MultiDataGroupForm to represent multi-selection of data UUIDs within a group context.
  • Adds a BaseForm tooltip validator to accept tooltips provided as a list[str] and normalize them into a single string.
  • Extends the forms unit tests to cover the new form and tooltip-list behavior.

Reviewed changes

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

File Description
geoh5py/ui_json/forms.py Adds tooltip normalization and introduces MultiDataGroupForm plus updated validator typing/docs.
tests/ui_json/forms_test.py Adds a new unit test for MultiDataGroupForm and tooltip list joining.

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

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.12%. Comparing base (7e3b1de) to head (1f69968).
⚠️ Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
geoh5py/ui_json/forms.py 92.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #848      +/-   ##
===========================================
- Coverage    91.18%   91.12%   -0.07%     
===========================================
  Files          115      115              
  Lines        10272    10292      +20     
  Branches      1898     1900       +2     
===========================================
+ Hits          9367     9379      +12     
- Misses         483      489       +6     
- Partials       422      424       +2     
Files with missing lines Coverage Δ
geoh5py/ui_json/constants.py 100.00% <ø> (ø)
geoh5py/ui_json/forms.py 95.18% <92.59%> (-1.13%) ⬇️

... and 3 files with indirect coverage changes

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

Matthieu Cedou added 2 commits March 9, 2026 11:39
test it

correct a small error in the tests of geo_image_test
Copilot AI review requested due to automatic review settings March 9, 2026 17:29
Copy link

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

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


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

Copilot AI review requested due to automatic review settings March 9, 2026 17:57
Copy link

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

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


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

Copy link
Contributor

@benk-mira benk-mira left a comment

Choose a reason for hiding this comment

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

You'll have to show me how the extra 'mandatory' counting is necessary. I tested the old infer with the new form type (see comment), and it seems to work without augmenting the infer. Can you add a unit test to my 'test_2746' branch that fails?

@MatthieuCMira MatthieuCMira requested a review from benk-mira March 10, 2026 21:43
Copilot AI review requested due to automatic review settings March 11, 2026 13:00
Copy link

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

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


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

Comment on lines +743 to 747
:param data: The form data to check for matching indicators.

:return: An array of candidate subclasses with the most matching indicators.
"""
counts = count_indicators(INDICATORS, data)
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

BaseForm.infer() relies on key normalization via to_snake(), but ui.json templates in this repo emit multiselect (all lowercase) rather than multiSelect / multi_select (see geoh5py/ui_json/templates.py). Because to_snake('multiselect') stays multiselect, required indicators like multi_select won’t match, and forms like MultiSelectDataForm can be mis-inferred as DataForm. Consider explicitly normalizing multiselect -> multi_select during inference (or supporting both aliases) and add a regression test.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This templates could be supress no @domfournier ?

Copy link
Contributor

@benk-mira benk-mira left a comment

Choose a reason for hiding this comment

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

Some suggestions to account for the fact that the form is only used with DrillholeGroup/PropertyGroup

Copilot AI review requested due to automatic review settings March 11, 2026 20:54
Copy link

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

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


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

You can also share your feedback on Copilot code review. Take the survey.

@sebhmg sebhmg changed the title GEOPY-2746 GEOPY-2746: "Group Value" form is not implemented in BaseUIJSON Mar 16, 2026
@sebhmg sebhmg changed the title GEOPY-2746: "Group Value" form is not implemented in BaseUIJSON GEOPY-2746: implement "Group Value" in BaseUIJSON Mar 16, 2026
@domfournier domfournier merged commit 771ae87 into develop Mar 17, 2026
17 checks passed
@domfournier domfournier deleted the GEOPY-2746 branch March 17, 2026 18:59
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.

4 participants