GEOPY-2731 - #213
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates geoapps-utils away from geoh5py.ui_json.InputFile toward the newer geoh5py.ui_json.UIJson API, updating the core driver startup flow, UIJson/group execution utilities, parameter sweep generation/driver logic, and the test suite to match the new serialization and file-writing behavior.
Changes:
- Replace
InputFileusage withUIJsonin runtime code paths (Driver.start,run_uijson_group, ui.json copying, param sweep generation/execution). - Remove the legacy
BaseParamsimplementation and update tests to validate the new UIJson-based behavior. - Update the base UI JSON template and adjust dependency pinning/lock files for the updated
geoh5pyAPI.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/uijson_run_test.py | Refactors tests to use a shared uijson_path fixture and new output naming. |
| tests/param_sweeps/generate_test.py | Updates test to serialize via options.ui_json. |
| tests/param_sweeps/driver_test.py | Updates test to serialize via options.ui_json. |
| tests/dataclass_test.py | Adjusts assertions and updates writing via params.ui_json.write(...). |
| tests/conftest.py | Introduces uijson_path fixture and updates test driver/options scaffolding. |
| tests/base_test.py | Aligns tests to UIJson serialization and new default-ui-json behavior. |
| pyproject.toml | Switches geoh5py dependency rev to feature/uijson. |
| geoapps_utils/run.py | Updates out-group execution and ui.json copying to use UIJson. |
| geoapps_utils/param_sweeps/generate.py | Reworks sweep-file generation around UIJson + base template. |
| geoapps_utils/param_sweeps/driver.py | Updates sweep driver to read/write UIJson and close workspace before copying. |
| geoapps_utils/driver/params.py | Removes legacy BaseParams implementation. |
| geoapps_utils/base.py | Updates Driver and Options to use UIJson as the primary representation. |
| geoapps_utils-assets/uijson/base.ui.json | Expands out_group into a full form object. |
| environments/py-3.14-win-64.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.14-win-64-dev.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.14-linux-64.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.14-linux-64-dev.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.13-win-64.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.13-win-64-dev.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.13-linux-64.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.13-linux-64-dev.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.12-win-64.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.12-win-64-dev.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.12-linux-64.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
| environments/py-3.12-linux-64-dev.conda.lock.yml | Refreshes locked dependency set for new geoh5py rev. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # environments/py-3.12-linux-64-dev.conda.lock.yml # environments/py-3.12-linux-64.conda.lock.yml # environments/py-3.12-win-64-dev.conda.lock.yml # environments/py-3.12-win-64.conda.lock.yml # environments/py-3.13-linux-64-dev.conda.lock.yml # environments/py-3.13-linux-64.conda.lock.yml # environments/py-3.13-win-64-dev.conda.lock.yml # environments/py-3.13-win-64.conda.lock.yml # environments/py-3.14-linux-64-dev.conda.lock.yml # environments/py-3.14-linux-64.conda.lock.yml # environments/py-3.14-win-64-dev.conda.lock.yml # environments/py-3.14-win-64.conda.lock.yml # geoapps_utils/driver/params.py # py-3.12.conda-lock.yml # py-3.13.conda-lock.yml # py-3.14.conda-lock.yml # pyproject.toml # tests/base_test.py # tests/dataclass_test.py
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/uijson #213 +/- ##
===============================================
Coverage 84.60% 84.60%
===============================================
Files 18 18
Lines 942 942
Branches 122 122
===============================================
Hits 797 797
Misses 109 109
Partials 36 36
🚀 New features to boost your workflow:
|
benk-mira
left a comment
There was a problem hiding this comment.
Can we generally replace input_file and ifile with uijson
|
|
||
| file_path = Path(worker_uijson).resolve(strict=True) | ||
| ifile = InputFile.read_ui_json(file_path) | ||
| ifile = UIJson.read(file_path) |
There was a problem hiding this comment.
This is dead code at this point, right? We don't expose the generate sweep file in any of the uijsons anymore and we wrote plate-sweep with new mechanics. Is DC2D still using this?
There was a problem hiding this comment.
Well the mechanics are still valid - don't need/want to pull code here.
Co-authored-by: benk-mira <81254271+benk-mira@users.noreply.github.com>
# Conflicts: # environments/py-3.12-linux-64-dev.conda.lock.yml # environments/py-3.12-linux-64.conda.lock.yml # environments/py-3.12-win-64-dev.conda.lock.yml # environments/py-3.12-win-64.conda.lock.yml # environments/py-3.13-linux-64-dev.conda.lock.yml # environments/py-3.13-linux-64.conda.lock.yml # environments/py-3.13-win-64-dev.conda.lock.yml # environments/py-3.13-win-64.conda.lock.yml # environments/py-3.14-linux-64-dev.conda.lock.yml # environments/py-3.14-linux-64.conda.lock.yml # environments/py-3.14-win-64-dev.conda.lock.yml # environments/py-3.14-win-64.conda.lock.yml # py-3.12.conda-lock.yml # py-3.13.conda-lock.yml # py-3.14.conda-lock.yml # pyproject.toml
No description provided.