Commit 5f95a1d
feat(waterdata): extend hash-ID drop to get_stats_por / get_stats_date_range
The OGC ``get_*`` functions in the prior commit drop hash columns
through ``get_ogc_data``. The statistics services (which return JSON
through ``get_stats_data`` rather than OGC features) bypassed that
path, so ``get_stats_por`` and ``get_stats_date_range`` were still
returning ``computation_id`` (UUID) and ``parent_time_series_id``
(hex hash) by default.
This commit:
- Adds ``computation_id`` to ``_HASH_ID_COLUMNS``
(``parent_time_series_id`` was already there).
- Plumbs ``include_hash_ids: bool = False`` through ``get_stats_data``,
``get_stats_por``, and ``get_stats_date_range``.
- Drops the hash columns at the end of ``get_stats_data``, after
``_expand_percentiles`` (which still needs ``computation_id`` as a
join key while it explodes the percentile lists into rows).
- Updates ``test_get_stats_por_expanded_false`` /
``test_get_stats_date_range`` to reflect the new column count and
adds ``test_get_stats_por_include_hash_ids`` documenting the opt-in.
Discovered while running a live-API sweep across every public
waterdata ``get_*`` function — the OGC services now pass, the stats
ones used to leak, and this commit closes that gap.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 21b95eb commit 5f95a1d
3 files changed
Lines changed: 67 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
| 2566 | + | |
2566 | 2567 | | |
2567 | 2568 | | |
2568 | 2569 | | |
| |||
2641 | 2642 | | |
2642 | 2643 | | |
2643 | 2644 | | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
2644 | 2652 | | |
2645 | 2653 | | |
2646 | 2654 | | |
| |||
2665 | 2673 | | |
2666 | 2674 | | |
2667 | 2675 | | |
2668 | | - | |
| 2676 | + | |
2669 | 2677 | | |
2670 | 2678 | | |
2671 | | - | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
2672 | 2683 | | |
2673 | 2684 | | |
2674 | 2685 | | |
| |||
2687 | 2698 | | |
2688 | 2699 | | |
2689 | 2700 | | |
| 2701 | + | |
2690 | 2702 | | |
2691 | 2703 | | |
2692 | 2704 | | |
| |||
2769 | 2781 | | |
2770 | 2782 | | |
2771 | 2783 | | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
2772 | 2791 | | |
2773 | 2792 | | |
2774 | 2793 | | |
| |||
2794 | 2813 | | |
2795 | 2814 | | |
2796 | 2815 | | |
2797 | | - | |
| 2816 | + | |
2798 | 2817 | | |
2799 | 2818 | | |
2800 | 2819 | | |
2801 | 2820 | | |
2802 | 2821 | | |
| 2822 | + | |
2803 | 2823 | | |
2804 | 2824 | | |
2805 | 2825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
1223 | 1226 | | |
1224 | 1227 | | |
1225 | 1228 | | |
| 1229 | + | |
1226 | 1230 | | |
1227 | 1231 | | |
1228 | 1232 | | |
| |||
1244 | 1248 | | |
1245 | 1249 | | |
1246 | 1250 | | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1247 | 1258 | | |
1248 | 1259 | | |
1249 | 1260 | | |
| |||
1320 | 1331 | | |
1321 | 1332 | | |
1322 | 1333 | | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1323 | 1344 | | |
1324 | 1345 | | |
1325 | 1346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
622 | 625 | | |
623 | 626 | | |
624 | 627 | | |
625 | 628 | | |
626 | 629 | | |
627 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
628 | 646 | | |
629 | 647 | | |
630 | 648 | | |
| |||
635 | 653 | | |
636 | 654 | | |
637 | 655 | | |
638 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
639 | 660 | | |
640 | 661 | | |
641 | 662 | | |
| |||
0 commit comments