BDMS 227: well additional information#267
Closed
jacob-a-brown wants to merge 152 commits into
Closed
Conversation
…s-227-231-additional-well-info-models # Conflicts: # .pre-commit-config.yaml # core/lexicon.json # tests/features/environment.py
…abulary fields - Implemented `AquiferSystem` model for master reference of aquifer systems and hydrogeologic units - Added table index for aquifer system name - Included categories and terms for aquifer type and significance level
the terminal/std out often cuts off error messages. calling e.errors() ensures we get the full error message
We originally used new types, but for the transfer to work legacy terms need to be used. The meanings were in the definition, but now they are terms.
the column names for LU_Lithology are not standard and need to be accounted for individually
log the errors as critical and append to errors so that the metrics and logs can be parsed correctly
log them as critical and add to errors for correct metric and log handling/reporting
…pdates BDMS 227: permission & well pump type transfer fix
- Delegate WKT boundary validation to `services/validation/geospatial.py` to enforce topological validity. - Update `CreateAquiferSystem` and `CreateGeologicFormation` to enforce strict Enum typing for controlled vocabularies, removing loose string coercion.
`top_depth` and `bottom_depth` are required so the None check is redundant. Remove the None check.
- Remove manual `if` validation logic for non-negative depths in `DepthIntervalMixin`. - Implement `Field(ge=0)` on `top_depth` and `bottom_depth` to leverage Pydantic's native schema validation and cleaner OpenAPI generation. - Ensure `CreateThingGeologicFormationAssociation` inherits these constraints by explicitly redefining fields with `ge=0`.
…chema-validations # Conflicts: # schemas/aquifer_system.py
…ema-validations-aquifer-geology BDMS-227-254: add schema validations to aquifer and geology schemas
since the mixins also inherit from BaseModel, inheriting from both BaseModel and the mixins causes issues with pydantic's model resolution order.
Codecov Report❌ Patch coverage is
|
Member
|
this changes were manuallly merged into PR #262 |
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:
well-additional-information.featureby updating the API, schemas, models, and transfer scriptsHow
Implementation summary - the following was changed / added / removed:
Responseschemas:ThingResponse,WellResponse,LocationGeoJSONResponseCreateschemas for the transfer scripts:CreateWell,CreateLocationResponseschemas:PermissionResponseGeologicFormation,AquiferSystem,AquiferTypeThing,Permission/PermissionHistoryNotes
Any special considerations, workarounds, or follow-up work to note?
cls.__tablename__for polymorphic table relationships in the mixinsThingAquiferAssocationmodel relates aThingto anAquiferSystem. It also relatedAquiferTypes (e.g. characteristics), to the system at that well.start_dateis not nullable forPermissionHistoryrecords, but it is in the response schema so that all types of permissions for a well can be returned. If a particular permission type does not exist, it will be in the returned list of permissions, but everything evaluates toNone. This essentially allows the user to determine if the permission does or does not exist.Permissionswas renamedPermissionHistorysince it stores the history of permissions for an object (most often aThing)Work (Kind of) Reviewed
We opened up PRs for smaller bits of work. They were reviewed, but this is the authoritative PR into staging. There are some notes and discussions in those PRs, so they're listed here for record-keeping:
Jira Tasks
Many Jira tasks, and subtasks, were addressed by this PR. They are: