Skip to content
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

Shouldn't the rename-annotations command delete the old set path? #243

Open
sarpu opened this issue Jun 17, 2021 · 2 comments
Open

Shouldn't the rename-annotations command delete the old set path? #243

sarpu opened this issue Jun 17, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@sarpu
Copy link
Collaborator

sarpu commented Jun 17, 2021

Not at all urgent, but I was following the Alex's instructions to make the eaf/annotator1 -> eaf/an1 change, and noticed that the command doesn't remove the old set. Is that intentional? If not I can submit a pull request so that the old set is removed which seems more intuitive.

os.makedirs(new_path, exist_ok = True)
if os.path.exists(os.path.join(current_path, 'raw')):
move(os.path.join(current_path, 'raw'), os.path.join(new_path, 'raw'))
if os.path.exists(os.path.join(current_path, 'converted')):
move(os.path.join(current_path, 'converted'), os.path.join(new_path, 'converted'))
self.annotations.loc[(self.annotations['set'] == annotation_set), 'set'] = new_set
self.write()

@sarpu sarpu added the question Further information is requested label Jun 17, 2021
@lucasgautheron
Copy link
Collaborator

lucasgautheron commented Jun 17, 2021

I think you're right!
I'm thinking rename-annotations should always be recursive such that this function could just:

  • move the whole directory (annotations/<set> to annotations/<new-set>)
  • update the index accordingly for <set> and its subsets

Unless we can think of some cases for which we don't want rename-annotations to apply recursively to all subsets, but I don't see any.

@alecristia
Copy link
Collaborator

alecristia commented Jun 17, 2021 via email

@sarpu sarpu self-assigned this Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants