Add shared dummy Tango attribute state#240
Conversation
|
On the code you write (not only on this PR) there is absolutely no comment. May be your code is clear for you but I often pain to read it. Please try to put few comments to explain a bit what the code do ! Few lines can help a lot other to understand and to maintain. |
|
I'll add comments. I actually need this to simplify the BPM evolution and tests for other developments. For example, the Moreover, it will simplify BPM testing as you’ll be able to set them to test values in live mode. This will allow for tests on the live system that were previously impossible. |
…ngo-attribute-state-in-dummy-control-system
|
By the way, I added a test for dummy-cs. It’s not mandatory, but it will help since it’s something we actually have to maintain.. |
Not on the pyaml_cs_oa side, but this should change if the Ophyd Asynch fix is deployed. |
def attach(self, devs: list[OASignal]) -> list[OASignal]:
return self._attach(devs,False) # is_array=False
def attach_array(self, devs: list[OASignal]) -> list[OASignal]:
return self._attach(devs,True) # is_array=True |
I forgot about this point, you're right. Anyway, it will help a lot with testing, as you can set the live part with this development. |
|
Is it ready to merge ? |
Yes, all tests are passing, and I have added a test specifically for the dummy because, ultimately, we depend on it for delivery. |
Description
Add shared state for dummy Tango attributes used in tests. This allows tests to initialize an attribute value before loading a configuration, and all later dummy
DeviceAccessobjects for the same Tango attribute share that value.Related Issue
Features/issues described there are:
Changes to existing functionality
tango.pyaml.attributedelegates value, unit, range and readback storage to a shared registry.attach_array()no longer relies on implicit[0.0, 1.0]initialization; tests initialize array attributes explicitly.Testing
The following tests were added or updated:
Verify that your checklist complies with the project