-
Notifications
You must be signed in to change notification settings - Fork 11
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
"id" vs "name" #13
Comments
It appears to be an issue with a way that we used to create happi entries. I've created a couple test devices and it seems nowadays the 'id' is set to the 'name', but looking through the database, there a ton of entries where it looks like the ids came from the devices' prefixes. We should probably transition those over... |
OK, I think we should go through these and change it up. Will wait til Zach gets back, though, just in case something is relying on these IDs that we're not aware of. |
Nothing is relying on the old ID formulation as far as I know. All applications I'm aware of are doing broader searches rather than using hard-coded names. The original idea was that no two devices would ever have the same PV, thus it was the static, unique identifier. In practice it was easier to access devices by their shorter name fields. |
This actually came up as a point of confusion from LBNL no more than a couple hours after I had submitted the issue. That's a fair point about the PV names being unique; name clashes from hutch-to-hutch do seem possible. If we're all OK enforcing a globally-unique name for every device in the database, we should move forward with switching up the IDs. |
I'm 👍 on switching the IDs. If you want to avoid name collisions, put your hutch in the name. I'm not super surprised that people want to bypass the CLI and the IPython interface, but this isn't a good idea in general because the tools exist to help you create a working database. This implies that both of these interfaces need to be improved. |
I'm 👍 on moving forward with the changes |
And actually, it looks like we don't have any
|
Awesome! |
Closed by #14 |
Is there a good reason we use a different "id" and device name here?
I'd expect to be able to do:
But what actually works is:
This certainly does work, as it's explicitly using the name key:
Is this a happi issue, an issue with our convention, or my lack of understanding?
cc @ZLLentz @ZryletTC
The text was updated successfully, but these errors were encountered: