chore: misc cleanups from the package review (bbox docs, nwis, empty-list)#312
Merged
thodson-usgs merged 1 commit intoJun 1, 2026
Merged
Conversation
Small, low-risk fixes bundled from the review (no behavior change beyond the two noted): - docs(waterdata): the `bbox` docstring labeled the 4th coordinate "Northern-most longitude"; it is the Northern-most *latitude* (xmin, ymin, xmax, ymax). Fixed across the OGC getters and get_samples (7 spots). - docs(waterdata): get_field_measurements' `properties` listed daily/continuous columns it doesn't have (time_series_id, statistic_id, time); point to the field-measurements OpenAPI schema instead. - fix(nwis): get_discharge_peaks ran format_response twice (via _read_rdb, then again with service="peaks"); parse raw with read_rdb so it formats once. - fix(nwis): query_waterdata validated a dead `state_cd` key while the docs, error message, and callers use `stateCd`; align it so a stateCd-only query is recognized as a major filter. - fix(waterdata): _construct_api_requests omitted an empty-list param as a filterless `¶m=` (read by the server as "match empty"); drop it instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A bundle of small, low-risk cleanups from the package review — two docs, three minor code fixes. No behavior change beyond the two noted.
bboxdocstring: the 4th coordinate was labeled "Northern-most longitude"; for[xmin, ymin, xmax, ymax]it's the Northern-most latitude. Fixed across the OGC getters +get_samples(7 spots).get_field_measurementspropertieslisted daily/continuous columns it doesn't have (time_series_id,statistic_id,time); now points to the field-measurements OpenAPI schema.nwis.get_discharge_peaksranformat_responsetwice (via_read_rdb, then again withservice="peaks"); parse raw withread_rdbso it formats once. Behavior-preserving (the first pass was a no-op/redundant for peaks).nwis.query_waterdatavalidated a deadstate_cdkey while the docs, error message, and callers all usestateCd; aligned so astateCd-only query is recognized as a major filter (this becomes load-bearing once #310 stops the always-inject that currently masks it)._construct_api_requestsemitted an empty-list param as a filterless¶m=(read by the server as "match empty"); now omitted.Verification
parameter_code=[]→ omitted;parameter_code=["00060"]→ present (regression test added).query_waterdata("peaks", stateCd="HI")now passes the major-filter check; a no-filter call still raisesTypeError.nwissuite (47) passes;ruffclean.🤖 Generated with Claude Code