pcdsdevices.utils.sort_components_by_kind
- pcdsdevices.utils.sort_components_by_kind(cls: type[Device]) type[Device]
Arrange the component order of a device class in kind order.
Kind order is hinted > normal > config > omitted.
This can be useful because typically the higher kind classes are more important, and therefore should be higher up on the typhos screen.
The relative ordering of subdevices within a kind is preserved.
This function makes no attempt to disambiguate or sort combination kinds. For example:
“hinted | config” counts as “hinted”
“normal | config” counts as “normal”
- Parameters:
cls (Device subclass) – The Device subclass that we’d like to rearrange the order of.
- Returns:
cls (Device subclass) – The same class from the input, mutated. This is returned so that sort_components_by_kind can be used as a class decorator.