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

Add happi rename and also fix happi edit of 'name' field #328

Open
klauer opened this issue Aug 24, 2023 · 0 comments
Open

Add happi rename and also fix happi edit of 'name' field #328

klauer opened this issue Aug 24, 2023 · 0 comments

Comments

@klauer
Copy link
Contributor

klauer commented Aug 24, 2023

Expected Behavior

Add CLI entrypoint for easy renaming:
$ happi rename at2l0 at2l0_foobar
or perhaps
$ happi rename at2l0=at2l0_foobar at1k4=at1k4_foobar

This would update the 'name' field, the internal '_id', and the parent JSON db key for that backend

Current Behavior

I believe this is how it'll work as-is, but correct me if not:

  • Renaming can potentially be done with happi edit
  • But then happi repair (post ENH: Match Name to ID Field  #327) will reset the name to the id in the case of the JSON backend
  • This leaves the only option for renaming to edit the JSON file

Possible Solution

Add new rename command and fix up happi edit
The backends may need a corresponding function for renaming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant