Skip to content

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

Open
domfournier wants to merge 19 commits intofeature/uijsonfrom
GEOPY-2739
Open

GEOPY-2739: Accept BaseUIJson in the start of driver#190
domfournier wants to merge 19 commits intofeature/uijsonfrom
GEOPY-2739

Conversation

@domfournier
Copy link
Copy Markdown
Contributor

@domfournier domfournier commented Mar 31, 2026

GEOPY-2739 - Accept BaseUIJson in the start of driver

@github-actions github-actions bot changed the title GEOPY-2739 GEOPY-2739: Accept BaseUIJson in the start of driver Mar 31, 2026
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@domfournier domfournier marked this pull request as ready for review April 2, 2026 21:03
Copilot AI review requested due to automatic review settings April 2, 2026 21:03
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 updates geoapps-utils to work with geoh5py.ui_json.UIJson as the primary ui.json representation (instead of InputFile/BaseUIJson), including allowing drivers to start from a UIJson instance and updating related templates and tests.

Changes:

  • Switch driver startup and UIJsonGroup execution flow to use UIJson objects directly.
  • Refactor Options to derive/serialize UIJson via a default template (base.ui.json) and adjust tests accordingly.
  • Update the base ui.json asset schema for out_group and pin geoh5py to a GEOPY-2739 revision.

Reviewed changes

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

Show a summary per file
File Description
geoapps_utils/base.py Refactors Driver.start and Options to operate around UIJson, adds deprecation path for InputFile, and updates serialization/out_group saving.
geoapps_utils/run.py Updates run_uijson_group and workspace/ui.json copy helpers to use UIJson.read/from_dict/write.
geoapps_utils-assets/uijson/base.ui.json Updates the base template to represent out_group as a structured group parameter object.
tests/uijson_run_test.py Updates test setup to build and write a UIJson file directly and adjusts expected filenames.
tests/driver_test.py Aligns tests with new UIJson-based serialization behavior and updated exception types.
tests/dataclass_test.py Loosens flatten equality assertions to avoid direct geoh5 comparisons and updates UIJson writing callsites.
pyproject.toml Pins geoh5py dependency to rev = "GEOPY-2739".

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

Comment on lines 70 to 74
## pip dependencies from Git repositories
#----------------------------------------
#geoh5py = {version = ">=0.13.0a, 0.13.*", source = "pypi", allow-prereleases = true}
geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"}
geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "GEOPY-2739"}

Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Pinning geoh5py to a moving branch name (rev = "GEOPY-2739") can make builds non-reproducible if the branch head changes. Prefer pinning to an immutable commit hash (or a released version/tag) once the needed changes are available.

Copilot uses AI. Check for mistakes.
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.

yep, this should not be merged like this!

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 70.76923% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.40%. Comparing base (eb04741) to head (11b1282).

Files with missing lines Patch % Lines
geoapps_utils/base.py 67.34% 11 Missing and 5 partials ⚠️
geoapps_utils/run.py 81.25% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #190       +/-   ##
============================================
- Coverage    86.14%   75.40%   -10.75%     
============================================
  Files           19       19               
  Lines         1126     1114       -12     
  Branches       151      151               
============================================
- Hits           970      840      -130     
- Misses         116      235      +119     
+ Partials        40       39        -1     
Files with missing lines Coverage Δ
geoapps_utils/run.py 90.99% <81.25%> (-1.61%) ⬇️
geoapps_utils/base.py 78.31% <67.34%> (-13.40%) ⬇️

... 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
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 the tests were supress without being replaced.

As this is at the root of all our apps, it shoulkd be heavily unitested right?

image

!!

Comment on lines 70 to 74
## pip dependencies from Git repositories
#----------------------------------------
#geoh5py = {version = ">=0.13.0a, 0.13.*", source = "pypi", allow-prereleases = true}
geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"}
geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "GEOPY-2739"}

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.

yep, this should not be merged like this!

}


def test_base_driver(tmp_path):
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.

you cannot just supress those tests without replacing it, can you?
We should test the behaviors with the new UIJson class to check everything is working the same way!

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.

failueres with scigeoh5.
The solution is to open everything in the same workspace.

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.

Still, when the test are passing, a very low coverage:

Image ...

As I said before, we want to test our base package a lot!

if ifile.geoh5 is None:
raise GeoAppsError("The application needs a valid 'geoh5' file.")

with Workspace(ifile.geoh5).open(mode=mode) as workspace:
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.

I might have done this.

But why not:

Suggested change
with Workspace(ifile.geoh5).open(mode=mode) as workspace:
with Workspace(ifile.geoh5, mode=mode) as workspace:

?

@domfournier domfournier changed the base branch from develop to feature/uijson April 7, 2026 16:49
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