-
Notifications
You must be signed in to change notification settings - Fork 28
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: add --keep-leading-path|-k or some mode for --download
#1460
Comments
@yarikoptic Why should this option cause |
@yarikoptic Also, why should the download path start with |
@yarikoptic Also, should this option have a similar effect on downloads of multi-asset URLs? For example, currently, downloading just a |
why: convenience. That is why I wondered if it should be a new mode
again: convenience, abd because
yes
correct, we want to retain all leading paths. In case of multiple URLs, possibly multiple different folders, or even |
Thank you @yarikoptic and @jwodder. All of the options you describe above will be very helpful. I have needed this and several users have requested this feature. |
@yarikoptic Rather than adding a |
I think current behavior is ok for |
@yarikoptic New suggestion: We implement this as a new |
Thanks @jwodder @yarikoptic. I like this idea, and think that the Based on the discussion in #1464, we may also need to include the |
cc @aaronkanzer @dstansby @balbasty The team is working to replicate the partial file tree hierarchy upon download to handle the use case of editing existing files. |
I am ok with an alternative name. Nothing better than "structure" comes to mind ATM -- would be easy to change during PR review if some better choice strikes someone. |
For this one I think we might want first to consider some alternatives, e.g. explicit |
Add `--preserve-tree` option to `dandi download`
🚀 Issue was released in |
Inspired by
ATM whenever we download an asset, we download file into current directory (besides if path is a glob as I showed in #1474). That makes it inconvenient to replicate partial file tree hierarchy as present on the archive. I think we just need an option which would maximally simplify for a user a use case where he/she needs to edit/reupload some existing files. So for a URI which points to a
dandiset_id
and anasset_path
(s), if such option is provideddandiset_id/
, downloaddandiset.yaml
, next operate as if from thatdandiset_id/
folderasset_path
(s) creating all leading directories as necessary.I wonder though if should be a separate option or some additional "mode switch" for
but failing to come up with a descriptive enough value (
dandiset+asset
?)The text was updated successfully, but these errors were encountered: