Skip to content

fix(waterdata): accept the latest-continuous method_category queryable - #459

Merged
thodson-usgs merged 1 commit into
DOI-USGS:mainfrom
thodson-usgs:fix/latest-continuous-method-category
Oct 29, 2026
Merged

thodson-usgs merged 1 commit into
DOI-USGS:mainfrom
thodson-usgs:fix/latest-continuous-method-category

Conversation

@thodson-usgs

@thodson-usgs thodson-usgs commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

USGS added method_category to the latest-continuous collection between the 10/28 and 10/29 nightly runs, on both v0 and v1. Three live monitors failed on it (upstream run, fork run). get_continuous has taken the same column since #423; this does the same for get_latest_continuous.

 def get_latest_continuous(
     ...
     max_rows: int | None = None,
+    *,
+    method_category: str | Iterable[str] | None = None,
     **queryables: Any,
 )
  • Docstring: method_category added to the properties list and documented with the same text as get_continuous.
  • tests/data/waterdata_queryables.json: regenerated from v1; the only change is the one line for latest-continuous.
  • tests/data/waterdata_ogc_fixtures.json: the latest-continuous fixture is re-captured for the same two time series. It now carries method_category: UNKWN for 00065 and null for 00060.
  • NEWS.md: entry dated 10/29/2026.

Evidence

  • Before: pytest -m live on main:
    FAILED test_every_schema_column_is_a_named_parameter[latest-continuous]  missing named parameter ['method_category']
    FAILED test_documented_columns_match_the_collection_schema[latest-continuous]  missing=['method_category']
    FAILED test_queryables_match_snapshot[latest-continuous]  added=['method_category']
    
    After: pytest -m live tests/waterdata_properties_test.py tests/waterdata_queryables_test.py: 29 passed. Offline suite: 1758 passed, coverage 99.08% (gate 98.9).
  • Live probe of latest-continuous (v0 and v1 identical): the field is in /queryables and /schema. Filtering on UNKWN, STNRD or LMTUS returns rows; EXPER and an invalid code return 0 rows; an unknown parameter still returns 400.
  • The getter against the live service, USGS-05427718 (5 series, 2 categorized):
    get_latest_continuous(..., method_category="UNKWN")            -> ['00065', '63160']   (GET)
    get_latest_continuous(..., method_category=["UNKWN", "STNRD"]) -> ['00065', '63160']   (CQL2 POST)
    

Merge Danger

Door: two-way

Blast Radius: none

The parameter is keyword-only, so every existing call sends the same request as before. Before this change, method_category could already be passed through **queryables.

🤖 Generated with Claude Code

@thodson-usgs
thodson-usgs force-pushed the fix/latest-continuous-method-category branch 2 times, most recently from 720b9ac to 2562b51 Compare October 29, 2026 14:33
USGS added method_category to the latest-continuous collection between
the 10/28 and 10/29 nightly live runs, on both v0 and v1, which turned
three live monitors red. get_continuous has taken it since DOI-USGS#423;
get_latest_continuous now takes it as a keyword-only parameter and lists
it as a returned column. Regenerate the queryables snapshot, and refresh
the latest-continuous fixture so it carries one categorized series and
one null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thodson-usgs
thodson-usgs force-pushed the fix/latest-continuous-method-category branch from 2562b51 to 87442c0 Compare October 29, 2026 14:41
@thodson-usgs
thodson-usgs marked this pull request as ready for review October 29, 2026 14:46
@thodson-usgs
thodson-usgs merged commit 2846fff into DOI-USGS:main Oct 29, 2026
11 checks passed
@thodson-usgs
thodson-usgs deleted the fix/latest-continuous-method-category branch October 29, 2026 14:46
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