Skip to content

BDMS-520-1-1-Cleanup-2.0#444

Merged
jirhiker merged 5 commits into
stagingfrom
BDMS-520-1-1-Cleanup-2.0
Jan 30, 2026
Merged

BDMS-520-1-1-Cleanup-2.0#444
jirhiker merged 5 commits into
stagingfrom
BDMS-520-1-1-Cleanup-2.0

Conversation

@jirhiker

Copy link
Copy Markdown
Member

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

Copilot AI review requested due to automatic review settings January 30, 2026 00:55

Copilot AI 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.

Pull request overview

This PR enhances data quality tracking and handles legacy equipment field type corrections in the database migration and transfer logic.

Changes:

  • Added nma_data_quality field to observations to capture legacy WaterLevels DataQuality codes
  • Corrected nma_WI_MicGain field type from Integer to Boolean in deployment schema
  • Improved timezone handling for WaterLevels transfers to respect TimeDatum field

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
transfers/waterlevels_transfer.py Added DataQuality mapping logic and TimeDatum-aware UTC conversion
transfers/sensor_transfer.py Added boolean coercion helper for WI_MicGain field
tests/test_transfer_legacy_dates.py Added test coverage for DataQuality mapping and TimeDatum handling
tests/test_sensor_transfer.py Added test coverage for WI_MicGain boolean coercion
schemas/observation.py Added nma_data_quality field to observation response schema
db/observation.py Added nma_data_quality column to Observation model
db/deployment.py Changed nma_WI_MicGain type from Integer to Boolean
core/lexicon.json Updated data_quality term definitions to be more descriptive
alembic/versions/e123456789ab_add_observation_data_quality.py Migration to add nma_data_quality column
alembic/versions/263109252fb1_add_legacy_equipment_fields.py Updated migration to use Boolean type for WI_MicGain

f"{SPACE_6}Unknown DataQuality code '{dq_code}' for WaterLevels record {row.GlobalID}"
)

# TODO: after sensors have been added to the database update sensor_id (or sensor) for waterlevels that come from db sensors (like e probes?)

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'db' to 'DB' for consistency with standard database abbreviation conventions.

Suggested change
# TODO: after sensors have been added to the database update sensor_id (or sensor) for waterlevels that come from db sensors (like e probes?)
# TODO: after sensors have been added to the database update sensor_id (or sensor) for waterlevels that come from DB sensors (like e probes?)

Copilot uses AI. Check for mistakes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4739aa4279

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread db/deployment.py
@jirhiker jirhiker merged commit 41f89b9 into staging Jan 30, 2026
6 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.

2 participants