Skip to content

fix(waterdata): accept field-measurements sublocation_identifier - #436

Open
thodson-usgs wants to merge 1 commit into
DOI-USGS:mainfrom
thodson-usgs:fix/field-measurements-sublocation-identifier
Open

thodson-usgs wants to merge 1 commit into
DOI-USGS:mainfrom
thodson-usgs:fix/field-measurements-sublocation-identifier

Conversation

@thodson-usgs

Copy link
Copy Markdown
Collaborator

Summary

The scheduled live-API run 37105829876 failed in test_queryables_match_snapshot for field-measurements and field-measurements-metadata: USGS added a sublocation_identifier queryable to both collections. It appeared on field-measurements-metadata by the 09/30 run and on field-measurements by the 10/03 run. No other collection's queryables changed.

Following the pattern of #423 (method_category):

  • Regenerate tests/data/waterdata_queryables.json with the script in waterdata_queryables_test.py. The only change is the two sublocation_identifier entries.
  • Add sublocation_identifier as a named, documented parameter on get_field_measurements() and get_field_measurements_metadata(). Before this, it could only be passed through **queryables.
  • Add the field to the two OGC fixtures as null, which is what the live service returns for those USGS-05427718 records.
  • Add one offline test per getter checking that the parameter is sent as a filter and comes back as a column.
  • Add a NEWS entry.

The live field-measurements-metadata failure in the 09/30–10/02 runs was the same cause. Those runs also had the continuous failure that #423 fixed.

Testing

  • pytest tests/ (offline): 1242 passed. Coverage is 98.96%, and the ratchet holds.
  • pytest -m live tests/waterdata_queryables_test.py::test_queryables_match_snapshot: 11 passed.
  • I ran both getters against the live service with sublocation_identifier="UPSTREAM". Each returned only UPSTREAM rows.
  • ruff, mypy, lint-imports, xenon, and complexipy pass (pre-commit).

@thodson-usgs
thodson-usgs force-pushed the fix/field-measurements-sublocation-identifier branch from f2806d7 to 75bcad3 Compare October 3, 2026 12:55
Comment thread tests/waterdata_test.py Outdated
@thodson-usgs
thodson-usgs force-pushed the fix/field-measurements-sublocation-identifier branch from 75bcad3 to 1f7fc21 Compare October 3, 2026 13:03
…queryable

USGS added sublocation_identifier to the field-measurements and
field-measurements-metadata collections at the end of September 2026,
which failed the live queryables snapshot monitor. Regenerate the
snapshot, and add sublocation_identifier as a named, documented
parameter on get_field_measurements and get_field_measurements_metadata.
@thodson-usgs
thodson-usgs force-pushed the fix/field-measurements-sublocation-identifier branch from 1f7fc21 to 4e86db6 Compare October 3, 2026 13:06
@thodson-usgs
thodson-usgs requested a review from ehinman October 3, 2026 13:07
@thodson-usgs
thodson-usgs marked this pull request as ready for review October 3, 2026 13:07

This branch has not been deployed

No deployments
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.

1 participant