Conversation
…or handling and logging
…t from erase_and_rebuild_db
# Conflicts: # transfers/well_transfer.py
Codecov Report❌ Patch coverage is
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,4 +1,4 @@ | |||
| # =============================================================================== | |||
| 1 # =============================================================================== | |||
There was a problem hiding this comment.
Remove stray literal breaking metrics import
The metrics module now begins with a bare 1 before the comment header, which makes Python raise SyntaxError: invalid decimal literal as soon as the file is imported. Any transfer entry point that imports Metrics (e.g., transfer_all or transfer_debugging) will fail immediately before executing, so the transfer scripts cannot run until this is removed.
Useful? React with 👍 / 👎.
| for well in session.query(Thing).filter(Thing.thing_type == "water well").all(): | ||
| row = wdf[wdf["PointID"] == well.name].iloc[0] |
There was a problem hiding this comment.
Handle wells not present in current transfer batch
After committing new wells, the code now loops over all water wells in the database and does wdf[wdf["PointID"] == well.name].iloc[0]. When transfer_wells is run without wiping the database (the default in transfer_debugging), existing wells that are filtered out of wdf leave that selection empty, so .iloc[0] raises IndexError and the transfer aborts before provenance, notes, or monitoring statuses are written. The loop needs to skip wells not in the current dataframe or guard the lookup.
Useful? React with 👍 / 👎.
Why
This PR addresses the following problem / context:
How
Implementation summary - the following was changed / added / removed:
Notes
Any special considerations, workarounds, or follow-up work to note?