Skip to content

BDMS 221: well core information#253

Merged
jirhiker merged 133 commits into
stagingfrom
bdms-221
Nov 18, 2025
Merged

BDMS 221: well core information#253
jirhiker merged 133 commits into
stagingfrom
bdms-221

Conversation

@jacob-a-brown

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • The feature file well-core-information.feature was written, requiring updates throughout the repository

How

Implementation summary - the following was changed / added / removed:

  • Updated existing models
  • Added new models
  • Updated schemas
  • Updated transfer scripts
  • Added step tests
  • Updated step tests
  • Updated some pytest tests
  • Skipped some pytest tests

Notes

Any special considerations, workarounds, or follow-up work to note?

  • Some pytest tests were easy to fix, but others required much more exhaustive changes to the API. Because of this, and because of the focus on the well details page, the more difficult ones have been skipped.
  • WellData.MonitoringStatus is currently being used to transfer both monitoring status and frequency from NM_Aquifer, but this field has not been maintained. Once we receive a table Ethan made in May the transfer script will need to be updated again.
  • Much of the work herein has been reviewed in smaller PRs, but it would be good to get eyes on this work again before it gets merged with staging.
  • IMPORTANT: now that the current_location for a thing is in the form of a GeoJSON, should all location responses be in the same GeoJSON format? It may be a good idea to have this be the standard, rather than have a LocationResponse that is different from the LocationGeoJSONResponse. (For example: the current_location in the ThingResponse uses a GeoJSON, whereas the response for /location uses the LocationResponse.

jacob-a-brown and others added 30 commits November 3, 2025 17:43
well core information behave test development
Refactored Group model in db/group.py, adding the `group_type` and `monitoring_frequency` fields.

Added new categories and terms to core/lexicon.json to support expanded group types and monitoring frequencies.
… StatusHistory table.

`well_status` is defined as a lexicon category, but it should be a lexicon value associated with the `status_type` category.

 The `status_type` category does not exist, but it should.

The terms assigned to the `well_status` category should actually be assigned to the `status_value` category.

Renamed `well_status` category to `status_value`.
Added new `status_type` category and related terms.
Updated term definitions.
`Monitoring Status` should be a value/term associated with the `status_type` category, not a category unto itself.

Removed the `monitoring_status` category and associated terms. Expanded terms associated with the `monitoring_frequency` category.
`group_type` and `monitoring_frequency` fields should be lexicon terms.

Updated `group_type` and `monitoring_frequency` fields to map to lexicon terms.
…re-well-info-models-schemas

BDMS-221-225: Core well information model updates
@codecov-commenter

codecov-commenter commented Nov 18, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.57364% with 14 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/util.py 57.14% 12 Missing ⚠️
db/data_provenance.py 93.10% 2 Missing ⚠️
Files with missing lines Coverage Δ
core/enums.py 100.00% <100.00%> (ø)
db/__init__.py 97.82% <100.00%> (+0.15%) ⬆️
db/base.py 96.42% <ø> (-0.19%) ⬇️
db/group.py 100.00% <100.00%> (ø)
db/location.py 88.09% <100.00%> (-6.91%) ⬇️
db/measuring_point_history.py 100.00% <100.00%> (ø)
db/status_history.py 100.00% <100.00%> (ø)
db/thing.py 100.00% <100.00%> (ø)
schemas/group.py 100.00% <100.00%> (ø)
schemas/location.py 95.87% <100.00%> (+3.28%) ⬆️
... and 9 more

... and 20 files with indirect coverage changes

Comment thread schemas/location.py
elevation_method: ElevationMethod | None = None
coordinate_accuracy: float | None = None
coordinate_method: CoordinateMethod | None = None
# elevation_accuracy: float | None = None

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.

Why not delete these fields if they're not going to be used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I decided to comment them out for now because we may want to include them in the future, so they're here for notes. I can remove those comments if it's bad style to keep these in.

@jirhiker jirhiker merged commit 17a2ea7 into staging Nov 18, 2025
6 checks passed
@TylerAdamMartinez TylerAdamMartinez deleted the bdms-221 branch November 19, 2025 16:27
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.

5 participants