Open flowln opened 4 months ago
Thank you for contributing to the project. We consider adding user-friendly name to the device description as a useful feature. But the primary purpose of the name
attribute of the Ophyd object is different, and using it for arbitrary user-friendly name is not the best practice. There is an issue in Ophyd project, proposing a new attribute display_name
for OphydObject
class: https://github.com/bluesky/ophyd/issues/1161 Once implemented in Ophyd, the display_name
could be included in the device description.
I am converting the PR to draft for now.
This field can be used to show a better user-facing name in a GUI.
To be honest, maybe the field should be named something else, like
display_name
ordevice_name
, but since neither Bluesky nor Ophyd constrains whatname
can be, I used the genericname
. Tell me if you think it should be something else!Motivation and Context
This allows us to have a potentially ugly Python variable name, while having a nicer name attribute on the device, that users can interact with in a GUI application.
Summary of Changes for Release Notes
Added
A
name
field to the device list in the API, corresponding to the device's.name
attribute, when it exists.