You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: copy-edit docstrings/comments and fix doc/code accuracy gaps
A review pass over the package's docstrings and inline comments for spelling,
grammar, clarity, and accuracy against the implementation.
Spelling & grammar:
- Typos ("Times series" -> "Time series", "datetme", "conatining", "indeces"
-> "indices", "ESPSG" -> "EPSG", "NDAP" -> "NADP") plus articles,
subject-verb agreement, duplicated words, and punctuation. codespell-clean
("gage" is the intentional USGS spelling).
R-language cruft -> Python:
- bbox `c(xmin,ymin,xmax,ymax)` -> `[xmin, ymin, xmax, ymax]`; "(numeric)
vector"/"a vector of requested columns" -> list wording; `limit : numeric`
-> `int`; `thresholds : numeric` -> `number`.
Accuracy (docs that disagreed with the code):
- Broken `Returns` cross-references to a nonexistent
`dataretrieval.utils.Metadata` -> the real classes (`nwis.NWIS_Metadata`,
`wqp.WQP_Metadata`, `utils.BaseMetadata`).
- get_monitoring_locations: three params typed `float` -> string/iterable.
- nwis.query_waterdata / query_waterservices: `service` examples listed values
the functions reject -> the accepted sets; removed a duplicated `ssl_check`
block and a `bBox` documented as a HUC.
- waterdata/utils: _switch_properties_id docstring described a dict (copied from
_switch_arg_id); _handle_stats_nesting / _combine_chunk_frames notes
corrected to match the code.
- get_time_series_metadata: replaced the stale `properties` list (copied from
get_daily) with the collection's real queryables.
- Added missing pieces: `nadp` module deprecation note; `Raises` on
`utils.query` and `streamstats.get_watershed` (plus its `format` param and
dual return type); `get_channel` params; `get_stats_por` /
`get_stats_date_range` `Returns` sections.
- Dropped bogus `Returns` blocks from `__init__` methods (they return None).
Code fixes surfaced by the review:
- Removed the non-functional `time` parameter from `get_monitoring_locations`
and `get_time_series_metadata`. Their OGC collections have no `time`
queryable (verified via the collections' queryables and a live 400), so
`time=...` only produced an opaque server error; with no `**kwargs`, removal
now yields a clear `TypeError`. The observation getters' `time` is valid and
untouched.
- Fixed a malformed URL in the nwis seriesCatalogOutput deprecation warning
(`waterdata.usgs.gov.nwis/qwdata` -> `waterdata.usgs.gov/nwis/qwdata`).
ruff check + ruff format clean; mypy --strict clean; tests pass; live-API
behavior verified.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments