BDMS 159: well transfers updates, water level transfer updates, & other revisions#180
Merged
Merged
Conversation
…ng in transfer process
… and quad name retrieval
…sing in well_transfer.py
…ample-field-transfer
…ample-field-transfer
…ample-field-transfer
when a different object needs to call a thing, like a contact, the `active_location` should be present in the thing response. this is achieved by eagerly loading the `active_location`
Codecov Report❌ Patch coverage is
|
jirhiker
approved these changes
Oct 10, 2025
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.
Why
This PR addresses the following problem / context:
MeasuredByfrom the WaterLevels table needs to be mapped to contacts in OcotilloHow
Implementation summary - the following was changed / added / removed:
effective_startto be added to the location association model I needed to add the well manually and not throughadd_thingMeasuredBymappings with Ethan's and Stacy's input. If a record cannot be mapped the new name is what is from NM_Aquifer and both organization and role are set toUnknown. We'll know if that record comes from NM_Aquifer since the associatednma_pk_waterlevelsfield will be populated.Notes
Any special considerations, workarounds, or follow-up work to note?
.unique()needed to be added toselectstatements in the transfer scriptfeaturebranch and are not yet present instagingpointfield is sometimes a string and thelatlonproperty fails (it's not retrieved as aWKBElementand therefore has no x or y attributes)WORK TO BE DONE
This PR is to catch the transfer scripts up to the current state of the models (for the most part). There are additions and amendments we want to make, such as well metadata fields. To keep this PR focused and to preclude complications that will arise from model changes, revisions will occur in future PRs. As of now these are (as I recall, there is likely more we want to do):
StatusHistorytable in the well transfer script if a well is marked as destroyednma_phoneto thePhonetable for access to invalid legacy data (mostly phone numbers that are 7 and not 10 digits)OwnersDatato enable owners' organization field to be valid when transferring data fromOwnersData(NM_Aquifer) toContact(Ocotillo)sample_ok,formation,open_well_logger_ok)WellPurposeandWellCasingsince a well may serve multiple purposes and well casing may be made of many materials