Skip to content

BDMS 57: well screen & other updates#121

Merged
jirhiker merged 7 commits into
pre-productionfrom
jab-well-screen-updates
Sep 5, 2025
Merged

BDMS 57: well screen & other updates#121
jirhiker merged 7 commits into
pre-productionfrom
jab-well-screen-updates

Conversation

@jacob-a-brown

@jacob-a-brown jacob-a-brown commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • WellScreen should have nma_pk_wellscreens to enable an audit of the data transfer
  • type annotations should not set nullability. That should be explicitly set in mapped_column(...)
  • Pydantic should be used to validate data

How

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

  • Added nma_pk_wellscreens to WellScreen table to enable transfer audits
  • Used type annotations to set the type, but not nullability. That is now set as nullable=True or nullable=False in mapped_column(...)
  • Pydantic is now used to validate contact transfer data
  • Because nma_pk_wellscreens are not part of the Pydantic model/schema well screens are now added explicitly with the session instead of with model_adder

Notes

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

  • The type that's hinted at in Mapped[<type?>] is what SQL Alchemy uses. It does not need to be set in mapped_column(...). To set the string length, however, String(<length>) must be used in mapped_column(...).

@codecov-commenter

codecov-commenter commented Sep 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
db/contact.py 100.00% <100.00%> (ø)
db/thing.py 100.00% <100.00%> (ø)

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

This looks good to me.

@jirhiker jirhiker merged commit b6fa6ad into pre-production Sep 5, 2025
3 checks passed
@TylerAdamMartinez TylerAdamMartinez deleted the jab-well-screen-updates branch February 5, 2026 18:06
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