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

Do fail (raise Exception, CLI has non-0 exit) download if any of downloads fail #1536

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Nov 23, 2024

Sits on top of #1535

  • ensure that CLI experience is ok and we do get non-0 exit
  • fixup tests

dandi/download.py Fixed Show fixed Hide fixed
dandi/download.py Fixed Show fixed Hide fixed
Comment on lines 1106 to 1128
# if is_access_denied(exc) or attempt >= 2:
# raise

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.53%. Comparing base (5215b37) to head (9b3f2fb).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
dandi/download.py 82.35% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1536      +/-   ##
==========================================
+ Coverage   88.46%   88.53%   +0.06%     
==========================================
  Files          78       78              
  Lines       10718    10737      +19     
==========================================
+ Hits         9482     9506      +24     
+ Misses       1236     1231       -5     
Flag Coverage Δ
unittests 88.53% <86.95%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Otherwise it is hard-to-impossible to script using "dandi download" reliably
@yarikoptic yarikoptic added minor Increment the minor version when merged release Create a release when this pr is merged labels Dec 2, 2024
@yarikoptic yarikoptic changed the title Do fail (raise Exception, should be non-0 exit) download if any download fails Do fail (raise Exception, CLI has non-0 exit) download if any of downloads fail Dec 2, 2024
@yarikoptic yarikoptic marked this pull request as ready for review December 2, 2024 18:15
@yarikoptic yarikoptic requested a review from kabilar December 2, 2024 18:15
@kabilar
Copy link
Member

kabilar commented Dec 2, 2024

Thanks @yarikoptic. I am not sure that I am the best person to review these changes since I am not too familiar with this codebase. I will request a review from @jwodder.

@kabilar kabilar requested a review from jwodder December 2, 2024 18:21
@yarikoptic
Copy link
Member Author

John wouldn't be able to review until Wed or may be even later... to not delay -- let's just proceed, I am feeling it should be ok.

@yarikoptic yarikoptic merged commit 4b16bf0 into master Dec 2, 2024
25 of 26 checks passed
@yarikoptic yarikoptic deleted the enh-fail-download branch December 2, 2024 18:52
Copy link

github-actions bot commented Dec 2, 2024

🚀 PR was released in 0.66.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants