-
Notifications
You must be signed in to change notification settings - Fork 24
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 ability to download zip of multiple files #47
Conversation
This is cool. For now, do you mind submitting a PR that fixes the regression, but leaves out the zip function until we get some consensus around #48? |
fix multi-download for datasets with folders and change logic
I've reverted the zip feature as requested and will chime in on #48 In writing tests, I noticed that the current function, which was written before zip downloads included folder hierarchies, doesn't work for datasets with folders. Given that @pdurbin also suggests in #46 that there are downsides to requesting the zip and unpacking it, I've re-written the logic to download the files sequentially instead, not using the zip functionality of the API at all. That passes all tests and seems to perform faster even with small datasets. If this looks good, I can clean up a bit more, but I think the tests are pretty good as they are. |
That's what I ultimately recommended at jupyterhub/repo2docker#739 (comment) 😄 |
(I realize there's a problem with the test, will fix this after we've agreed on the rest of this) |
@wibeasley ready for review here. Would be nice to merge soon so that we can start working on the larger issues in #48 |
Thanks, @adam3smith! |
@adam3smith I was just having beers tonight with @mfenner at PIDapalooza and we both think it's awesome that you're contributing. And I said we probably wouldn't have you as a contributor if this package didn't have a maintainer. So thank you @wibeasley! |
Please ensure the following before submitting a PR:
/R
not/man
and rundevtools::document()
to update documentation/tests
for any new functionality or bug fixR CMD check
runs without error before submitting the PRThis PR does three things:
Adds an additional parameter(see below)unzip
toget_file()
to give users the option to download individual files (the current behavior) or a single .zip file (my preferred behavior).I'll add more tests if you're OK with the general approach here, but wanted to check first. I'd also need access to the dataverse on demo to properly test (all tests using the demo DV currently fail as I assume you know)