Support ETag-validated resume and raw downloads (1.14.0) - #82
Merged
Merged
Conversation
Coverage Report for CI Build 36477992647Coverage increased (+0.1%) to 95.435%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
1 similar comment
Coverage Report for CI Build 36477992647Coverage increased (+0.1%) to 95.435%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
Ensembl downloads cannot currently resume without a published SHA-256, and callers preserving an archive under an arbitrary destination name cannot disable suffix-inferred decompression. Add both capabilities to
fetch_fileandCache.fetchin 1.14.0.resume=Trueacceptsexpected_sizewithout a hash only when every accepted response supplies a valid strong ETag. Appends useIf-Rangeand require the exact range and matching validator. Missing/weak validators fail; changed representations restart. Complete size-only partials request fresh bytes instead of using the hash-verified publication shortcut.raw=Truebypasses gzip/ZIP decompression and HTML conversion regardless of destination name. It works with resume, integrity validation, atomic replacement, progress, provenance, and cache reuse; combining it withdecompress=Trueis an error. Existing calls retain their transformation behavior.Size-only validation is not cryptographic verification. Existing cache hits remain offline and validate only the supplied expectations. SHA-256-pinned resume still supports servers without strong validators.
Update the API reference, download guide, changelog, and offline example. Downstream pyensembl and Hitlist adoption can use these APIs without reimplementing publication.
Validation:
./lint.shpasses../test.sh: 751 passed, 95% coverage (Python 3.9.22).Fixes #80. Fixes #81.
Release verification (2026-09-28): merged as
ce2837c; all nine CI configurations and Coveralls passed../deploy.shcompleted from clean master with lint and 751 tests passing. Datacache 1.14.0 is published; wheel and source-distribution SHA-256 digests match the local build. Reinstalling the PyPI wheel in an isolated environment passed a real interrupted HTTP smoke test covering raw gzip bytes at an arbitrary filename, ETag-only resume, progress, provenance, and offline reuse.