pcdshub / pcdsdevices

Collection of Ophyd device subclasses for IOCs unique to LCLS PCDS.
https://pcdshub.github.io/pcdsdevices/
Other
5 stars 58 forks source link

Force LCLS Happi Item Beamline to be all caps #547

Open ZLLentz opened 4 years ago

ZLLentz commented 4 years ago

Expected Behavior

In our LCLS happi schema, force names like XPP, LFE, MFX for the beamline field

Current Behavior

Allows names like xpp, lfe, mfx

Context

Naming consistency is good and prevents issues when searching by beamline.

ZLLentz commented 4 years ago

This should come along with a case-insensitive search mode for case-insensitive fields so modules like lucid don't have to do special processing on specific fields.

See https://github.com/pcdshub/lucid/issues/46

edit: this comment was solved in a happi PR at some point

cristinasewell commented 4 years ago

Can I assume that the beamline only consists of letters from [A-Z]? or is it possible that we have other characters in there too?

ZLLentz commented 4 years ago

At SLAC/LCLS, only letters is a good assumption. All of our beamlines are things like XPP, XCS, LFE, CXI.

Since the initial posting of this issue, we've migrated our beamline schema to https://github.com/pcdshub/pcdsdevices/blob/master/pcdsdevices/happi/containers.py Since Hugo refactored this library to allow us to define containers in other repositories.

The idea is that happi itself should not make any particular assumption as to which facility it is being used in, but a facility can extend the schema for its own purposes. That is to say, happi itself shouldn't even know what a beamline is.

I think I will transfer this issue over to the pcdsdevices repo and update the comment