Use ophyd component name kwargs when present#420
Use ophyd component name kwargs when present#420ronpandolfi wants to merge 4 commits intopcdshub:masterfrom
Conversation
|
We've been back and forth on this one on our end, though I think our general consensus for the typhos screens has been "keep it consistent with the component (attribute) name you'd find on the IPython command-line." Separately, though, Perhaps we could consider a configurable option for this functionality if we can't come to an agreement here (@ZLLentz?) |
|
I think there's definitely space in
|
|
I'm not seeing that adding the name kwarg affects bluesky. The field names and all other resulting documents are unaffected. The field name remains as Can you clarify the source of the limitations you were expecting? |
|
Does setting |
|
In general, I'm thinking the behavior we want is something like:
If you disagree, I think it's good to use the name field as long as it is a configurable. Ken is out today so I'll talk to him when he gets back in. |
|
@ZLLentz I'd been attributing the name through the component. This is probably not intended usage after all. I was expecting that the name kwarg here would get passed on to EpicsSignalRO, but its getting overwritten by the attribute name just before the signal is constructed. Although this 'worked', its not an ordained attribute, and so this is probably the wrong approach. It seems like there's no proper place for a display name in ophyd signals. I would advocate for an addition to satisfy this need. The signal name must be a valid python identifier, so it isn't comfortable to read. My impression is @danielballan If there's no place for a human-readable name for signals, could one be (optionally) added? |
|
Ah! That all makes sense now. I agree that there should be some ordained way in |
Ophyd components can have human-readable
namekwargs. Using these rather than attribute names for labeling panel rows looks nice (see screenshot). This change defaults to the attr name when thenamekwarg is absent.The
temp_celsiuscomponent has been given anamekwarg, and so its typhos panel displays this instead.@ihumphrey @JulReinhardt