-
Notifications
You must be signed in to change notification settings - Fork 25
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 some kind of --path-type [exact|glob] for delete #1446
Comments
ah, actually in https://dandi.readthedocs.io/en/latest/ref/urls.html#resource-ids we already specify that if there is such an option and |
A local glob path should be expanded by the shell into the full list of paths, at which point |
in case of local path specification -- do we remove only "matching" filenames or if e.g. I specify to remove a directory, would I remove all assets (which might be more or less than I have locally) from that "directory" on the server? If it is just 1-to-1 match to local files in the folder, then indeed we could keep it consistent and pretty much ignore that option for local paths. If not -- then it is a matter of passing glob not expanded (quote it) and match in code locally and on server. |
@yarikoptic If a local directory path is passed to |
ok, in case of |
Why wouldn't we just let globs be expanded by the user's shell?
|
for that you do not need any |
frankly I didn't realize that! then let's forget about "local" aspects in my above phrases. Should also make implementation easier, and we would file an issue if some user desires it is worth it ;-) |
As I stated above, local (non-URL) paths passed to Also, do we want to support local path arguments that contain a glob in the Dandiset path portion, e.g., |
yes, globbing should happen against server paths, likely just by passing the
Then let's do no such thing -- just state that in case of |
ATM we have that option for
download
command.I am yet not sure how CLI should look like given that we take target file paths or URIs. I guess we could add this option and then treat local paths as globs to be expanded by python locally and on the server. For URLs we would need some custom URI schema to indicate that it is a glob for a particular dandiset (e.g.
dandi-glob://<instance name>/<dandiset id>[@<version>][/<glob>]
)WDYT @jwodder ?
Prompted by
although not yet known if really needed in that case.
The text was updated successfully, but these errors were encountered: