Skip to content

🤖 cli-water-levels#300

Merged
jirhiker merged 3 commits into
stagingfrom
cli-water-levels
Dec 23, 2025
Merged

🤖 cli-water-levels#300
jirhiker merged 3 commits into
stagingfrom
cli-water-levels

Conversation

@jirhiker

@jirhiker jirhiker commented Dec 13, 2025

Copy link
Copy Markdown
Member

Why

This PR addresses the following problem / context:

  • CLI for bulk uploading water levels via a csv. Well must already exist in database

How

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

  • Mostly AI (codex) implemented. Driven by water-level-csv.feature

Notes

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

  • The updates to the database models are cosmetic and organizational. I do not think this PR requires a database migration

@codecov-commenter

codecov-commenter commented Dec 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
api/location.py 93.18% <100.00%> (ø)
cli/cli.py 96.87% <100.00%> (ø)
cli/service_adapter.py 40.81% <ø> (ø)
core/constants.py 100.00% <ø> (ø)
db/aquifer_system.py 100.00% <100.00%> (ø)
db/geologic_formation.py 100.00% <100.00%> (ø)
db/group.py 100.00% <100.00%> (ø)
db/location.py 88.63% <100.00%> (ø)
schemas/location.py 96.15% <100.00%> (ø)
services/geospatial_helper.py 74.46% <100.00%> (ø)
... and 5 more

@jirhiker jirhiker changed the title cli-water-levels 🤖 cli-water-levels Dec 13, 2025
@jirhiker jirhiker requested a review from ksmuczynski December 15, 2025 05:09
jacob-a-brown
jacob-a-brown previously approved these changes Dec 15, 2025

@jacob-a-brown jacob-a-brown left a comment

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 think that this looks good for the current implementation of the water levels upload. Some changes will be coming, like making a new field for data_quality and mapping level_status to the groundwater_level_reason field, but when these updates occur these tests will be updated.

Comment on lines +696 to +697
elif table.name == "sample":
continue

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.

if this was implemented because of a foreign key/non-nullable constraint from sample to field_activity that is going to be addressed in the DB models. @ksmuczynski and I talked about how we need to add cascade="DELETE" to the foreign key definition. I'm going to open a PR with this.

So, if that is the case, I think that handling samples separately from other tables can be removed from this PR.

@jacob-a-brown jacob-a-brown dismissed their stale review December 17, 2025 18:22

After further review and discussion with Kelsey about fixing the sample model I think that there may need to be some updates to this PR

@jirhiker

Copy link
Copy Markdown
Member Author

I am merging this PR. I don't want PRs to remain unresolved for this long. The review comments are peripheral to the main point of this PR so it seems reasonable to merge into staging so that we are ready with cli functionality once the data and logic layers are complete

@jirhiker jirhiker merged commit 7428944 into staging Dec 23, 2025
6 checks passed
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