Closed oliche closed 1 year ago
I hate to break it to you but this function already exists and was written by you! https://github.com/int-brain-lab/ONE/blob/main/one/alf/io.py#L635
It's in alf.io because by default it modifies the file on disk but can be called with dry=True. I've added a 'See Also' section to both functions so users can more easily locate the other function.
Fair enough, I'll keep the renaming part in alf.files
and reuse it in alf.io
.
It will be safer not to have to fiddle with a dry parameter, especially when working off the master copy on SDSC
I suggest deprecating remove_uuid_file
and removing it in the next release. The name is confusing and if you're uncomfortable using a function with a dry flag then it's probably better to leave it to the user to move the file on disk (can be done in one line). It's only used with dry=False in one place as far as I can tell. I'll also remove remove_uuid_recursive
which isn't used anywhere and calls print
on every loop iteration (kind of annoying for logging).
Working directly from the data server requires to remove UUIDs from filenames frequently