Repository navigation
GEOPY-3040: Accept integer data type for weights and norm, and coerce to floats - #472
Merged
Merged
Conversation
# 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 # py-3.12.conda-lock.yml # py-3.13.conda-lock.yml # pyproject.toml
Contributor
There was a problem hiding this comment.
Pull request overview
This PR broadens SimPEG Drivers’ parameter handling so inversion/forward options and UI JSON schemas can accept IntegerData (in addition to FloatData) for weights/norms and other numeric model inputs, with test updates to exercise integer inputs.
Changes:
- Widened multiple Pydantic option types from
FloatDatatoFloatData | IntegerDataacross drivers/options (e.g., norms, bounds, length scales, reference/starting models). - Updated many
.ui.jsondefinitions to allow"dataType": ["Float", "Integer"]where numeric channels are selectable. - Updated tests and environment/dependency pins (pyproject + conda lockfiles) to align with the new typing/schema expectations.
Reviewed changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/run_tests/driver_rotated_gradients_test.py | Use integer dip/azimuth arrays to validate rotated-gradient inputs accept ints. |
| tests/run_tests/driver_grav_test.py | Add integer norms/length scales/reference model inputs in gravity run test. |
| simpeg_drivers/potential_fields/magnetic_vector/options.py | Allow IntegerData for vector model option fields; constrain inducing field params to scalar floats. |
| simpeg_drivers/potential_fields/magnetic_vector_pde/options.py | Allow IntegerData for PDE vector model option fields; constrain inducing field params to scalar floats. |
| simpeg_drivers/potential_fields/magnetic_scalar/options.py | Allow IntegerData for scalar magnetic model fields; constrain inducing field params to scalar floats. |
| simpeg_drivers/potential_fields/gravity/options.py | Allow IntegerData for gravity reference model option. |
| simpeg_drivers/plate_simulation/driver.py | Permit integer-valued model data for plate simulation driver _model. |
| simpeg_drivers/options.py | Expand core option type unions to include IntegerData for multiple numeric model parameters. |
| simpeg_drivers/joint/options.py | Expand joint model option unions to include IntegerData for bounds/norms/regularization inputs. |
| simpeg_drivers/joint/joint_surveys/options.py | Allow integer data for starting/reference models in joint surveys options. |
| simpeg_drivers/joint/joint_petrophysics/options.py | Allow integer data for alpha_s in joint petrophysics options; cleanup imports. |
| simpeg_drivers/electricals/base_2d.py | Allow integer data for 2D conductivity model option. |
| simpeg_drivers/depth_of_investigation/sensitivity_cutoff/options.py | Cleanup unused import (SimPEGGroup). |
| simpeg_drivers/components/topography.py | Coerce topography channel values to float when building locations. |
| simpeg_drivers-assets/uijson/tipper_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/tipper_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/tdem1d_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/tdem_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/tdem_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetotellurics_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetic_vector_pde_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetic_vector_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/magnetic_scalar_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/induced_polarization_3d_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/induced_polarization_2d_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/gravity_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/gravity_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/fdem1d_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/fdem_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/fdem_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/direct_current_3d_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/direct_current_2d_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json | Permit Integer channels where Float channels were previously required. |
| simpeg_drivers-assets/uijson/apparent_conductivity_forward.ui.json | Permit Integer channels where Float channels were previously required. |
| pyproject.toml | Switch several git dependencies to track develop. |
| py-3.13.conda-lock.yml | Update lockfile to reflect dependency rev changes and package resolution changes. |
| environments/py-3.13-win-64.conda.lock.yml | Update resolved environment for win-64 (py3.13). |
| environments/py-3.13-win-64-dev.conda.lock.yml | Update resolved dev environment for win-64 (py3.13). |
| environments/py-3.13-linux-64.conda.lock.yml | Update resolved environment for linux-64 (py3.13). |
| environments/py-3.13-linux-64-dev.conda.lock.yml | Update resolved dev environment for linux-64 (py3.13). |
| environments/py-3.12-win-64.conda.lock.yml | Update resolved environment for win-64 (py3.12). |
| environments/py-3.12-win-64-dev.conda.lock.yml | Update resolved dev environment for win-64 (py3.12). |
| environments/py-3.12-linux-64.conda.lock.yml | Update resolved environment for linux-64 (py3.12). |
| environments/py-3.12-linux-64-dev.conda.lock.yml | Update resolved dev environment for linux-64 (py3.12). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #472 +/- ##
===========================================
+ Coverage 90.42% 90.45% +0.02%
===========================================
Files 113 113
Lines 6988 6987 -1
Branches 862 862
===========================================
+ Hits 6319 6320 +1
+ Misses 452 451 -1
+ Partials 217 216 -1
🚀 New features to boost your workflow:
|
gmcga
self-requested a review
August 28, 2026 18:20
gmcga
suggested changes
Aug 28, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
# Conflicts: # environments/py-3.12-linux-64-dev.conda.lock.yml # environments/py-3.12-win-64-dev.conda.lock.yml # environments/py-3.13-linux-64-dev.conda.lock.yml # environments/py-3.13-win-64-dev.conda.lock.yml # py-3.12.conda-lock.yml # py-3.13.conda-lock.yml
gmcga
suggested changes
Sep 1, 2026
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.
GEOPY-3040 - Accept integer data type for weights and norm, and coerce to floats