-
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
dandi move command #1006
Comments
|
something simple/obvious, thus basic functionality very close to
for starters I think we can avoid needing -T or -t, and just have OPTIONS:
FWIW -- I would be ok if restriction for
Good question. I think it would be valuable to allow to operate on remote dandiset. So sample uses
NB alternative is just to make it
Sure -- could be a separate one (will do later), but I thought that might be good to have that use case in mind. Notes:
|
|
good. so like in the
I think so. Signature -- following CLI, I guess smth like def move(source: Union[str,list], destination: str, *, regex:bool=False, work_on:str='auto', dandiset: Optional[Union[str,Dandiset]]=None, existing: str='error') so
Good point! let's just error out with
or alike - i.e. providing minimal sufficient information to point to the problem and possibly troubleshoot it. |
I assume that the |
@yarikoptic Also:
|
couldn't give an answer right away... as I depicted in UC1 I thought to have it correspond to the remote dandiset so people could perform operations on it if work_on is ATM: in most of the high level APIs we rely on CWD to point to local dandiset:
So, none command besides It feels that for some consistency we want
WDYT @jwodder -- may be you see some other, simpler/more intuitive interface? |
"error" as I have it in #1006 (comment) -- we do not want to blindly overwrite.
I would KISS - compare entire hierarchies in case of work_on "both" . If any difference -- error.
I don't think there is much of job for another wishlist item which came to mind due to presence of And later we would add some flag like |
@yarikoptic That command-line syntax for Another question: Should this be able to operate locally on folders that are not Dandisets (i.e., that do not have a |
well, those (CLI and function) should at large be the same where CLI just passes in args into
IMHO it would be "consistent" if
ATM "I don't think so" although I can see then how someone could start using |
@yarikoptic When determining whether the local and remote file hierarchies differ, what should be considered part of the local file hierarchy? Keep in mind that |
oh right... that makes it tricky/impossible... but may be we want to error out with above information , mention --dry-run, and add explicit flag ( |
@yarikoptic I'm not clear on what behavior you're describing. Are you saying that only NWB, Zarr, and NGFF assets should be honored in local Dandisets, and if anything else is present, we error out? |
@yarikoptic Also, how should this work when run from inside a subdirectory of a Dandiset? Should assets outside the sub-hierarchy be movable? |
I was thinking -- not specifically any type of an asset, just
but I reflected back on your comment/question yesterday
and may be let's do just that! i.e. instead of the list of files for
I think it would be great to be able to support that since I might want to |
|
|
@yarikoptic You said you want to support moving assets outside of the current directory when running inside a subdirectory. Should this also apply when using regexes? Specifically, when |
I think assets from current directory. So, whenever ran on the top directory of dandiset - would be all assets |
@yarikoptic If a non-regex |
@yarikoptic Also, if the user runs |
Hmm, if both, and exists locally paths on server should be adjusted as if there was a directory on the server (but we don't have a notion of directory). But if it is 'remote' then we shouldn't AFAIK consult local filesystem and it becomes tricky - consider it a directory only if trailing / was provided in its name |
I guess just ignore (thus in effect move into itself) with a debug log message |
🚀 Issue was released in |
Prior mentioning/need for such (
dandi mv
) command is at #848 (comment) and it came up again in context of zarr archives. Since they are mutable ATM, asset ids are changing upon metadata change and not stored locally, there is no sense of identity of a zarr folder. That forbids any efficient renaming of a zarr archive locally.With
dandi move
, similar one todandi delete
we have, we could rename locally and on the server really fast, thus making subsequentdandi upload
if so needed update an existing zarr archive instead of uploading a new one and deleting an old one.Extra points to keep in mind
dandi organize
can operate in-place (within existing dandiset). Then in such scenario "by default" it should usedandi move
internally to move files. But it should be some kind of a switch which would do server side change as well or not.dandi mv
but decided to name itdandi move
instead -- Harmonize commands flavor #1005The text was updated successfully, but these errors were encountered: