feat(ogc): add opt-in parallel chunk fan-out#341
Merged
Conversation
thodson-usgs
force-pushed
the
feat/chunk-granularity
branch
3 times, most recently
from
July 1, 2026 16:25
b47e5cc to
0195113
Compare
thodson-usgs
marked this pull request as ready for review
July 17, 2026 17:53
Add parallel_chunks(n) so large Water Data and NGWMN queries can split into more independently paginated sub-requests while preserving the conservative byte-limit-only default. Cap optional fan-out across all chunk axes, validate positive integer inputs, export the helper publicly, and document usage, tradeoffs, and benchmark results. Add planner, context, and integration coverage.
thodson-usgs
force-pushed
the
feat/chunk-granularity
branch
from
July 22, 2026 14:09
8ae1b9a to
a2c5627
Compare
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
parallel_chunks(n)for opt-in fan-out of large Water Data and NGWMN requests.max_rows, retry/resume tradeoffs and add planner/integration coverage.Basic usage
Use this only for large, paginated pulls with a multi-value argument. Each sub-request consumes quota; concurrent execution remains bounded separately by
API_USGS_CONCURRENT(default 32).Timing
Fixed 271-site Ohio stream-gage subset,
get_daily(parameter_code="00060"),limit=250; each run used a cold one-year window.nValidation
pytest -q tests/waterdata_chunking_test.py tests/utils_test.pyruff checkon changed Python files