Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download using chunk iteration rather than raw response #920

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

itcarroll
Copy link
Collaborator

@itcarroll itcarroll commented Jan 7, 2025

Fixes #887

The internals for download now use the recommended (by requests) requests.Response.iter_content method to download granules while keeping memory usage capped at 1MB.

Pull Request (PR) draft checklist - click to expand
  • Please review our
    contributing documentation
    before getting started.
  • Populate a descriptive title. For example, instead of "Updated README.md", use a
    title such as "Add testing details to the contributor section of the README".
    Example PRs: #763
  • Populate the body of the pull request with:
  • Update CHANGELOG.md with details about your change in a section titled
    ## Unreleased. If such a section does not exist, please create one. Follow
    Common Changelog for your additions.
    Example PRs: #763
  • Update the documentation and/or the README.md with details of changes to the
    earthaccess interface, if any. Consider new environment variables, function names,
    decorators, etc.

Click the "Ready for review" button at the bottom of the "Conversation" tab in GitHub
once these requirements are fulfilled. Don't worry if you see any test failures in
GitHub at this point!

Pull Request (PR) merge checklist - click to expand

Please do your best to complete these requirements! If you need help with any of these
requirements, you can ping the @nsidc/earthaccess-support team in a comment and we
will help you out!

  • Add unit tests for any new features.
  • Apply formatting and linting autofixes. You can add a GitHub comment in this Pull
    Request containing "pre-commit.ci autofix" to automate this.
  • Ensure all automated PR checks (seen at the bottom of the "conversation" tab) pass.
  • Get at least one approving review.

📚 Documentation preview 📚: https://earthaccess--920.org.readthedocs.build/en/920/

Copy link

github-actions bot commented Jan 7, 2025

Binder 👈 Launch a binder notebook on this branch for commit 1515e3e

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit db0fa4e

@itcarroll itcarroll marked this pull request as ready for review January 7, 2025 19:36
@itcarroll itcarroll requested a review from betolink January 7, 2025 19:43
Copy link
Collaborator

@mfisher87 mfisher87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@itcarroll itcarroll removed the request for review from betolink January 7, 2025 19:56
@itcarroll itcarroll merged commit 91866ac into nsidc:main Jan 7, 2025
13 checks passed
@itcarroll itcarroll deleted the fix-download-gzip branch January 7, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] earthaccess.download gets different data than curl from an OPeNDAP service
2 participants