Commit 9e05040
fix(waterdata): small coherence cleanups (annotations, column order, defensiveness)
Five small, low-risk fixes surfaced by the package review:
1. get_latest_continuous / get_latest_daily: `value` was annotated `int`, but
every other getter (and the docstrings) use `str | Iterable[str]`; the `int`
hint also rejected the multi-value list filtering the others advertise.
2. get_time_series_metadata: `thresholds` was annotated `int`, vs
`float | list[float]` on get_combined_metadata for the same queryable.
3. _arrange_cols: the "move the synthetic per-record id column to the end" set
omitted peak_id, channel_measurements_id, combined_meta_id, and
field_series_id, so those four getters left their id at the front instead of
the end like daily_id. Added them for consistent column layout.
4. _next_req_url: returned a falsy `href` ("") instead of None, contradicting
its Optional[str] contract. Return None.
5. _get_resp_data (geopandas branch): mirror the non-geopandas branch's
`f.get("id")` so a feature missing a top-level id yields None rather than a
KeyError.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ee653e5 commit 9e05040
2 files changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | | - | |
| 1216 | + | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
| |||
1407 | 1407 | | |
1408 | 1408 | | |
1409 | 1409 | | |
1410 | | - | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
| 806 | + | |
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
909 | 911 | | |
910 | 912 | | |
911 | 913 | | |
| |||
1299 | 1301 | | |
1300 | 1302 | | |
1301 | 1303 | | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1302 | 1308 | | |
1303 | 1309 | | |
1304 | 1310 | | |
| |||
0 commit comments