Commit 06bf0d0
fix(wqp): repair WQP_Metadata.site_info (was always None) (#305)
WQP_Metadata.site_info never returned anything. Two compounding bugs:
1. All nine getters built WQP_Metadata(response) with no parameters, so
self._parameters was always {} and the property always hit the
`else: return None` branch -- even for a get_results(siteid=...) query.
(PR #295 fixed the property's *location* -- it had been a discarded local
function inside __init__ -- but the call sites still passed no params, so
the feature stayed dead.) NWIS does it right: NWIS_Metadata(response,
**kwargs).
2. The property keyed on `sites`/`site`/`site_no` and called
what_sites(sites=...), but WQP's site identifier parameter is `siteid`, so
it could never have matched a real WQP query even with params threaded in.
Fixes:
- All getters now pass the query kwargs: WQP_Metadata(response, **kwargs).
- site_info keys on `siteid` and calls what_sites(siteid=...).
- Corrected the class docstring (comment not comments; WQP_Metadata not
NWIS_Metadata; siteid not sites).
- Updated the routing test to the correct `siteid` key and added a regression
assertion that get_results threads siteid into the metadata.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent adb6629 commit 06bf0d0
2 files changed
Lines changed: 27 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
| 536 | + | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
665 | 666 | | |
666 | 667 | | |
667 | 668 | | |
668 | 669 | | |
669 | | - | |
| 670 | + | |
670 | 671 | | |
671 | 672 | | |
672 | 673 | | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 674 | + | |
| 675 | + | |
680 | 676 | | |
| 677 | + | |
681 | 678 | | |
682 | 679 | | |
683 | 680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
272 | | - | |
| 276 | + | |
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| |||
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
283 | | - | |
284 | | - | |
| 287 | + | |
| 288 | + | |
0 commit comments