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

Add file_path param to download_file() to directly download files to disk #115

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

MHHukiewitz
Copy link
Member

Instead of keeping them in memory. Addresses #37.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 96.72131% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 84.17%. Comparing base (ea4acdc) to head (69b9cf0).

Files Patch % Lines
tests/unit/conftest.py 93.10% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   83.67%   84.17%   +0.50%     
==========================================
  Files          27       27              
  Lines        1084     1131      +47     
  Branches      181      188       +7     
==========================================
+ Hits          907      952      +45     
- Misses        175      176       +1     
- Partials        2        3       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the BLACK This PR has critical implications and must be reviewed by a senior engineer. label Mar 28, 2024
@MHHukiewitz
Copy link
Member Author

@hoh I think codecov is incorrectly configured. It currently also measures test file coverage... Which doesn't make sense.

@hoh
Copy link
Member

hoh commented Mar 28, 2024

@hoh I think codecov is incorrectly configured. It currently also measures test file coverage... Which doesn't make sense.

Why not ? Tests that don't run do not make sense.

@MHHukiewitz
Copy link
Member Author

Why not ? Tests that don't run do not make sense.

Because I just added some cleanup checks after downloading to the file, in order to check the automatic directory and file creation every time correctly

tests/unit/test_download.py Outdated Show resolved Hide resolved
src/aleph/sdk/client/http.py Outdated Show resolved Hide resolved
src/aleph/sdk/client/http.py Outdated Show resolved Hide resolved
hoh
hoh previously requested changes Mar 29, 2024
Copy link
Member

@hoh hoh left a comment

Choose a reason for hiding this comment

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

The approach for dual use of the download_file seems very confusing, see my comment on the topic.

This branch is re-implementing in it a lot of patterns that are already covered by the Python standard library.

@MHHukiewitz MHHukiewitz requested a review from hoh March 29, 2024 15:22
@MHHukiewitz MHHukiewitz requested a review from 1yam April 16, 2024 13:25
@aleph-im aleph-im deleted a comment from github-actions bot Apr 16, 2024
Copy link
Collaborator

@1yam 1yam left a comment

Choose a reason for hiding this comment

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

LGTM

@MHHukiewitz MHHukiewitz dismissed hoh’s stale review April 17, 2024 15:27

Concerns have been addressed, reviewed by Lyam.

@MHHukiewitz MHHukiewitz merged commit 1409a70 into main Apr 17, 2024
12 checks passed
@MHHukiewitz MHHukiewitz deleted the mhh-add-download-to-file branch April 17, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLACK This PR has critical implications and must be reviewed by a senior engineer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants