Repository navigation
feat(sync): stream daily extract downloads through core - #195
Merged
btoron merged 2 commits intoOct 18, 2026
Merged
Conversation
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
btoron
approved these changes
Oct 13, 2026
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.
Daily extract downloads currently buffer the entire ZIP through
response.content. Addcore.get_daily_extract_file_stream(date, filename, *, timeout=None)as a response context manager matching the usage in #160. Callers choose their chunk size withstream.iter_content(chunk_size=8192)and can inspect response headers for progress. The successful body stays unread until consumption, and the response closes on full or partial consumption, consumer exceptions, and HTTP failures.Keep the existing buffered method unchanged. OFSC JSON errors use the existing
OFSAPIException; non-JSON errors and unexpected status codes raiserequests.HTTPError. Withauto_raise=False, callers receive the raw response and must inspect its status before writing it. Document the API and the optional connect/read timeout.Validation: 464 credential-free tests pass, 8 skip. The 17 new cases include two real loopback HTTP checks (Basic and bearer auth), error/cleanup paths, and a logical 80 MiB body where a partial read consumes only one 8 KiB chunk. Sixteen new cases fail on the previous implementation because the API is absent; the buffered API control passes both versions. Ruff check and format pass. Pyright reports the same seven existing synchronous-core diagnostics as pristine master, with no new diagnostics. No live Oracle tenant testing was performed.
The separate
additionalHeadersdefect reported here is addressed by #193.Closes #160