Feature/uijson - #217
Merged
Merged
Conversation
# Conflicts: # geoapps_utils/base.py
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
for more information, see https://pre-commit.ci
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
GEOPY-2739: Accept BaseUIJson in the start of driver
# 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
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 # 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
# 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
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #217 +/- ##
===========================================
+ Coverage 85.70% 86.10% +0.40%
===========================================
Files 19 18 -1
Lines 1196 950 -246
Branches 155 126 -29
===========================================
- Hits 1025 818 -207
+ Misses 129 97 -32
+ Partials 42 35 -7
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates geoapps_utils to use geoh5py’s newer UIJson API instead of InputFile/legacy params, and refactors the run + param-sweep utilities and tests to align with that shift.
Changes:
- Refactor
geoapps_utils.base.Driverandgeoapps_utils.runto accept/operate onUIJson(includingBytesIO) and update result persistence behavior. - Update param sweep generation/driver logic to read/write
UIJsonand adjust tests to use a shareduijson_pathfixture. - Update the base UI template (
base.ui.json) and dependency pin/lockfiles for thegeoh5pyUIJson feature branch.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/uijson_run_test.py | Reworks UIJson execution tests to use UIJson + a shared fixture and validates output file expectations. |
| tests/param_sweeps/generate_test.py | Updates sweep generation test to use an Options subclass with a default UIJson template. |
| tests/param_sweeps/driver_test.py | Updates sweep driver tests to serialize from options.ui_json and use a nested model template. |
| tests/driver_test.py | Removes legacy driver/options tests superseded by the new base/UIJson testing approach. |
| tests/dataclass_test.py | Updates dataclass tests for UIJson-backed build/flatten behavior and nested model defaults. |
| tests/conftest.py | Adds a uijson_path fixture that materializes a UIJson file for integration-style tests. |
| tests/base_test.py | Adds new base-level tests around UIJson serialization, driver start, warnings, and error cases. |
| pyproject.toml | Pins geoh5py to the feature/uijson git rev. |
| geoapps_utils/run.py | Migrates run helpers to UIJson and adds support for BytesIO ui.json references. |
| geoapps_utils/param_sweeps/generate.py | Updates sweep file generation to read/write via UIJson. |
| geoapps_utils/param_sweeps/driver.py | Updates sweep trial file writing to use UIJson.set_values() + UIJson.write(). |
| geoapps_utils/driver/params.py | Removes the legacy BaseParams implementation. |
| geoapps_utils/base.py | Refactors Driver.start() and Options to build from UIJson, adds deprecation plumbing for InputFile, and updates serialization/flattening. |
| geoapps_utils-assets/uijson/base.ui.json | Updates out_group from a primitive to a structured UIJson group object. |
| environments/py-3.14-win-64.conda.lock.yml | Lockfile refresh for updated dependency graph (incl. geoh5py revision). |
| environments/py-3.14-win-64-dev.conda.lock.yml | Dev lockfile refresh for updated dependency graph. |
| environments/py-3.14-linux-64.conda.lock.yml | Lockfile refresh for updated dependency graph. |
| environments/py-3.14-linux-64-dev.conda.lock.yml | Dev lockfile refresh for updated dependency graph. |
| environments/py-3.13-win-64.conda.lock.yml | Lockfile refresh for updated dependency graph. |
| environments/py-3.13-win-64-dev.conda.lock.yml | Dev lockfile refresh for updated dependency graph. |
| environments/py-3.13-linux-64.conda.lock.yml | Lockfile refresh for updated dependency graph. |
| environments/py-3.13-linux-64-dev.conda.lock.yml | Dev lockfile refresh for updated dependency graph. |
| environments/py-3.12-win-64.conda.lock.yml | Lockfile refresh for updated dependency graph. |
| environments/py-3.12-win-64-dev.conda.lock.yml | Dev lockfile refresh for updated dependency graph. |
| environments/py-3.12-linux-64.conda.lock.yml | Lockfile refresh for updated dependency graph. |
| environments/py-3.12-linux-64-dev.conda.lock.yml | Dev lockfile refresh for updated dependency graph. |
Suppressed comments (2)
geoapps_utils/base.py:136
isinstance(results, tuple | list)will raiseTypeErrorat runtime for the same reason (union types are not allowed inisinstance). Use(tuple, list)or a sequence ABC instead.
elif isinstance(results, tuple | list):
geoapps_utils/base.py:215
isinstance(out_group, self._out_group_class | None)is invalid (| Nonecannot be used insideisinstance). CheckNoneexplicitly or includetype(None)in a tuple of types.
if not isinstance(out_group, self._out_group_class | None):
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.