Skip to content

Conversation

@jirhiker
Copy link
Member

@jirhiker jirhiker commented Dec 9, 2025

Why

This PR addresses the following problem / context:

  • Use bullet points here

How

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

  • Use bullet points here

Notes

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

  • Use bullet points here

ksmuczynski and others added 30 commits November 12, 2025 16:19
Introduced DataProvenanceMixin to the `Thing` and `Location` models to enable reusable, efficient, polymorphic relationships to the DataProvenance table.
…s-to-pass-tests

BDMS 221: updates to pass tests
The database tables are snake_case, so for consistency and ease of debugging, the `target_table` values should also use snake_case.

Refined the _thing_target and _location_target relationships to ensure DataProvenance.target_table uses snake_case ('thing', 'location') for the target table name.
… for class-level usage

- Relocated DataProvenanceMixin from base.py to data_provenance.py for better modularity and provenance management.
- Refactored mixin to use cls in @declared_attr for proper class-level relationship definition.
feat: add transducer observation handling and improve database initialization
…nformation.

- Added new `origin_source` and `collection_method` categories and terms.
- Added 'meters' as a term associated with the `unit` category.
- Added `OriginStatus` to `enums.py`.
…nformation.

- Added new `origin_source` and `collection_method` categories and terms.
- Added 'meters' as a term associated with the `unit` category.
- Added `OriginStatus` to `enums.py`.
…table in Notes model; reintroduce NotesMixin for polymorphic relationships
…re-well-info-models-schemas

BDMS-221-225: Polymorphic DataProvenance model
jirhiker and others added 28 commits December 5, 2025 11:08
…sfer-and-updates

BDMS 233: notes transfer and updates
…es and refactor measuring point height validation
Because eager loading was defined in the models, it was being applied
every time those models were queried, leading to unnecessary data being
loaded in many cases. This change moves the eager loading logic to the
service layer, applying it only at the endpoints that require it. This
optimizes performance by reducing redundant data fetching and ensures
that only the necessary related data is loaded when needed.
If a full ThingResponse is used in ContactResponse, it can lead to
performance issues due to lazy loading of unneeded fields. To preclude
this from happening, a new ThingResponseForContact schema has been created
since all that is needed in this context are the id and name of the Things
related to a Contact.
moving forward all eager loading will be defined at endpoints,
not in the model definitions (unless they are in polymorphic models)
every observation is linked to a parameter, so eager loading
of parameters when loading observations will always be needed
feat: refactor test configuration for improved clarity and maintainability
@jirhiker jirhiker merged commit 979ab27 into production Dec 9, 2025
6 checks passed
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 76.38191% with 235 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
transfers/util.py 20.57% 166 Missing ⚠️
services/util.py 53.19% 22 Missing ⚠️
services/thing_helper.py 51.42% 17 Missing ⚠️
tests/test_thing.py 66.66% 8 Missing ⚠️
schemas/thing.py 93.20% 7 Missing ⚠️
services/observation_helper.py 0.00% 5 Missing ⚠️
db/thing.py 96.51% 3 Missing ⚠️
db/data_provenance.py 93.33% 2 Missing ⚠️
api/observation.py 50.00% 1 Missing ⚠️
core/app.py 50.00% 1 Missing ⚠️
... and 3 more
Files with missing lines Coverage Δ
api/search.py 97.82% <ø> (ø)
api/thing.py 83.56% <100.00%> (ø)
core/enums.py 100.00% <100.00%> (ø)
core/initializers.py 87.95% <100.00%> (ø)
db/__init__.py 98.03% <100.00%> (ø)
db/aquifer_system.py 100.00% <100.00%> (ø)
db/aquifer_type.py 100.00% <100.00%> (ø)
db/base.py 94.64% <100.00%> (ø)
db/contact.py 100.00% <100.00%> (ø)
db/deployment.py 100.00% <100.00%> (ø)
... and 36 more

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.

8 participants