Skip to content

well additional information testing/implementation updates#256

Merged
jacob-a-brown merged 30 commits into
bdms-227from
bdms-227-jab-updates-to-pass-tests
Nov 26, 2025
Merged

well additional information testing/implementation updates#256
jacob-a-brown merged 30 commits into
bdms-227from
bdms-227-jab-updates-to-pass-tests

Conversation

@jacob-a-brown

Copy link
Copy Markdown
Contributor

This PR implements model/schema updates to pass all well additional information tests except for the aquifer/geology tests. Those will get implemented after the models have been finalized.

@chasetmartin:

  • the feature step the response should include the source of the completion information seems to apply to the completion date of the well, is that correct?
  • the feature step the response should include the source of the construction information seems to apply to the construction method of the well, is that correct?
  • should other fields, like the driller name, also have a source?

@chasetmartin

chasetmartin commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator

This PR implements model/schema updates to pass all well additional information tests except for the aquifer/geology tests. Those will get implemented after the models have been finalized.

@chasetmartin:

  • the feature step the response should include the source of the completion information seems to apply to the completion date of the well, is that correct?
  • the feature step the response should include the source of the construction information seems to apply to the construction method of the well, is that correct?
  • should other fields, like the driller name, also have a source?

@jacob-a-brown

Yes to completion source

Yes mostly to construction source, there was a previous field called DataSource for "reference to a person or document reporting hole/well construction information", row 24 in the NMAquifer mapping
https://docs.google.com/spreadsheets/d/1mbPNvPc_H9Y0XO7LEVFsTZHuef0AWPBKuZqhJUuvkQE/edit?gid=1959040963#gid=1959040963&range=24:24

If this one field would hold things up this sprint let me know and we can probably skip it and come back later.

I don't think driller name needs a source, since it's sort of another construction related field that was probably sourced from the same person/document (at least I don't see a source in NMAquifer)

@jacob-a-brown

Copy link
Copy Markdown
Contributor Author

Besides the completion date the only construction information we have is the construction method (except for the construction notes). It seems to me that DataSource was kind of compound/nebulous and applied to both of these. Since the completion source step applies to the date I figured that the construction source would apply to the method. Do you think that would be an okay way to proceed? If so, should the feature files be changed to reflect this?

@chasetmartin

Copy link
Copy Markdown
Collaborator

Yeah I get that. So in that case the construction source would have no data right now since you don’t think it should come from DataSource?

@jacob-a-brown

Copy link
Copy Markdown
Contributor Author

I think that the well_completion_date_source would come from the CompletionSource field and then well_construction_method_source would come from the DataSource field.

CompletionSource (transferred to well_completion_date_source)

A code indicating how the information about the construction date of the well was obtained; same look-up table as DepthSource

DataSource (transferred to well_construction_method_source)

Reference to person or document reporting hole/well construction information

@jacob-a-brown

Copy link
Copy Markdown
Contributor Author

the field origin_type was added for controlled vocabulary where applicable, whereas origin_source was changed to a general string column to allow the recording of specific sources (like documents or websites). this occurred when implementing the transfer script because WellData.DataSource is not a controlled vocabulary like WaterLevels.DataSource.

this allows us to couple types to a system incase a well is in
multiple aquifers
@jacob-a-brown

Copy link
Copy Markdown
Contributor Author

@ksmuczynski I renamed aquifers to aquifer_systems and formations to geologic_formations in the thing model db/thing.py to correspond with the table names and make it more explicit. I did this (for the former in particular) because the ThingResponse has a field called aquifers that concatenates aquifer_systems and aquifer_types

Comment thread db/permission_history.py Outdated
Comment thread tests/features/environment.py Outdated
use a for loop for cleaner and more maintainable code
this ensures fidelity in table naming across all database models
Now that __tablename__ is used throughout it should be
used for the target_table in add_note
instead of a specific permission type, return a list of permission records for all permission types associated with the well.

@ksmuczynski ksmuczynski 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.

Looks good!

@jacob-a-brown jacob-a-brown merged commit eac24a2 into bdms-227 Nov 26, 2025
4 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.

4 participants