Open DominicOram opened 2 years ago
Originally I had something like:
from dodal import i03
i03.BEAMLINE_PREFIX = "BL03S"
i03.INSERTION_PREFIX = "SR03S"
from dodal.i03 import *
in s03.py
but this causes big issues if importing s03
and i03
together. Alternatives could be to change the structure of i03.py
into a class?
We might also want a fake_i03
that has all the i03 devices but as ophyd fake devices
As discussed with @callumforrester we can just do this with an env variable. We can check BEAMLINE
and use i03 if it is that, otherwise s03
As a developer/scientist I would like to make to make sure that the devices for the simulated beamline are kept the same as those for the real one, with as much ease as possible. Currently to add a new device to e.g. i03/s03 I need to add the following to
i03.py
:Then the following to
s03.py
:Which is an exact replica, except the
BEAMLINE_PREFIX
. Ideally I should just need to add toi03.py
ands03.py
will update itself.