-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Last week @marlibgin2 and I tested the current implementation at MAX IV. The week before Marco and Ali had tried to understand the tune correction example and set it up for MAX IV but it was difficult and therefore we decided to start with something much simpler. We thought since there is TANGO bindings we could try the most basic first test case: create a single quadrupole device and read the current of it. For this simple case we thought we didn't even need the yaml file but could make the configuration directly in python by creating objects from the config classes.
It didn't go especially well. We spent like half of a day trying to do it without any success. Then we gave up and switched to using pytango directly instead. Without previous experience of pytango it took us perhaps 10-15 minutes to do it. This feel concerning because to us pyAML in it's most basic form should just be a control system agnostic layer to pytango and pyepics where the user doesn't need to remember the control system names but can use the physics names instead. So we think it has to be simplified somehow so it's as easy to get started as pytango and pyepics.
The detailed feedback:
-
It is too much work to set up the configuration for tests. We need to write a helper function which extracts the required information from the MML AO. I can try to do that.
-
Documentation is needed for how to get started. Just a simple readme like there is for the
tango-pyamlrepository would already help a lot. -
The implementation doesn't seem to be sufficiently modular to use it purely as a hardware abstraction layer if the user isn't interested in physics units or the simulator. Or at least we didn't manage to understand how to use it like that.
-
Is it possible to create the configuration directly in python or it's always required to parse it in externally? We didn't manage to understand how to do it directly in python because it wasn't clear to us which config classes we needed and which we could skip.
We tried to create a device following this: https://github.com/python-accelerator-middle-layer/pyaml/blob/main/pyaml/control/device.py but that module doesn't seem to be used? At least
tango-pyamluses the base class DeviceAccess and not this device class. What is the purpose of the device class?Then there is the control system class https://github.com/python-accelerator-middle-layer/pyaml/blob/main/pyaml/control/controlsystem.py. How is this class related to creating the devices? Do you somehow need to create first a device object and then add it to the control system before it can be used? But it seems like the control system requires elements and not devices despite that there is a method called
fill_device? -
What is the relation between
elementanddevice? Do you need to create an element if you just want to read an attribute from the control system? We thought we could just create a device directly and the element is only required if you want to use the simulator but maybe that's not the case? -
How is the
tango-pyamlrepository connected to the pyaml repository? After failing to try to understand how to make a device inpyamland tell it that it should use the TANGO bindings we instead tried to usetango-pyamldirectly by following the usage example https://github.com/python-accelerator-middle-layer/tango-pyaml?tab=readme-ov-file#usage-example but then we ran into problems because it seemed like we also needed configuration for the control system?We also were confused for a long time about why
tango-pyamlshould be imported astango.pyamland not astango_pyaml. I have never seen that for a python package before, where do you specify that it should be imported like that? Is it perhaps this part in the pyproject.toml:[tool.setuptools.packages.find] include = ["tango.*"] -
We were missing a functionality like the AO in MML where it's possible to get the list of families and their current configuration. Basically it's a registry from where the configuration is extracted. Is there already some kind of registry functionality like that and we just didn't understand it?