pcdshub / device_config

Happi device configuration for PCDS devices
https://github.com/pcdshub/device_config/blob/master/db.json
Other
0 stars 11 forks source link

Avoiding dev/prod conflicts of device definitions #42

Open klauer opened 1 year ago

klauer commented 1 year ago

Issue

Per @zllentz:

I wonder if there's any way to avoid this problem:

  1. A new class is added to pcdsdevices
  2. happi is updated to expect the new class
  3. All old code that referenced this device needs a pcdsdevices update or the load fails

It makes me wonder if we need to do versioning on these or have some other way to maintain backward compatibility in this sort of environment...

_Originally posted by @ZLLentz in https://github.com/pcdshub/device_config/pull/41#discussion_r1316546678_

Possibilities

Our thoughts for avoiding this:

  1. Device-specific classes as in AT1K4 with helpful docstrings (@klauer)
  2. Factory methods for creating devices (@tangkong)