Default hourly() to poll_interval=1 and forward additional_kw to retrieve - #12
Draft
aklocker42 wants to merge 1 commit into
Draft
aklocker42 wants to merge 1 commit into
aklocker42 wants to merge 1 commit into
Conversation
…ieve hourly/monthly/yearly accepted `additional_kw...` but never forwarded it, so poll_interval, max_wait and verbose could not be overridden. Forward it, and default hourly() to poll_interval=1 (matching CDSAPI.jl's 1 s polling) since hourly requests are small; monthly/yearly keep 10. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 18, 2026
This branch has not been deployed
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
hourly,monthlyandyearlyacceptedadditional_kw...but never forwarded it toretrieve, sopoll_interval,max_waitandverbosecould not be overridden. It is now forwarded.hourly()gets an explicitpoll_interval=1keyword (documented). This matches CDSAPI.jl, which polls every 1 s.monthly()andyearly()keep a default of 10. Their jobs are long, so a shorter interval only adds status calls. Any kwarg you pass now overrides the defaults.Why
Relates to #4 (CDSAPI.jl vs this package). Hourly requests are small and usually finish within a minute.
retrievebacks off from 1 s up topoll_interval, so with the old ceiling of 10 the client could sit on a finished job for several seconds before noticing.Paired timings against CDSAPI.jl are dominated by CDS queue time, with the same request ranging from 13.9 s to 101.9 s. The effect is real but hard to see statistically:
poll_interval=10vs 1The earlier runs at the old default of 10 were slower than CDSAPI.jl: 40.6 s vs 23.2 s and 48.9 s vs 23.2 s.
Tests
retrieveand checks the defaults and overrides reach it forhourly(1),monthly(10) andyearly(10).retrieveinside the module, so that testset has to stay last inruntests.jl.Pkg.test(): 36 of 36 pass, including the live ERA5 download test.🤖 Generated with Claude Code