-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wait_for_value_interface_change #582
Commits on Sep 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c3f0528 - Browse repository at this point
Copy the full SHA c3f0528View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b34872 - Browse repository at this point
Copy the full SHA 0b34872View commit details -
Configuration menu - View commit details
-
Copy full SHA for caadaca - Browse repository at this point
Copy the full SHA caadacaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 822a024 - Browse repository at this point
Copy the full SHA 822a024View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76b1392 - Browse repository at this point
Copy the full SHA 76b1392View commit details
Commits on Sep 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3e20106 - Browse repository at this point
Copy the full SHA 3e20106View commit details -
Configuration menu - View commit details
-
Copy full SHA for f021a08 - Browse repository at this point
Copy the full SHA f021a08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41da0f4 - Browse repository at this point
Copy the full SHA 41da0f4View commit details
Commits on Sep 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 232d921 - Browse repository at this point
Copy the full SHA 232d921View commit details
Commits on Oct 17, 2024
-
Refactor set_and_wait_for_value function to include an optional param…
…eter for waiting for set completion
Configuration menu - View commit details
-
Copy full SHA for dd10caf - Browse repository at this point
Copy the full SHA dd10cafView commit details -
Merge remote-tracking branch 'origin/main' into 461-rationalise-inter…
…face-for-wait_for_value
Configuration menu - View commit details
-
Copy full SHA for 45477a1 - Browse repository at this point
Copy the full SHA 45477a1View commit details
Commits on Oct 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d9d2d25 - Browse repository at this point
Copy the full SHA d9d2d25View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8e83bb - Browse repository at this point
Copy the full SHA e8e83bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for cda91ec - Browse repository at this point
Copy the full SHA cda91ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 492d303 - Browse repository at this point
Copy the full SHA 492d303View commit details
Commits on Oct 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9b63dc6 - Browse repository at this point
Copy the full SHA 9b63dc6View commit details
Commits on Nov 14, 2024
-
Add test for context race condition (#600)
* Add test for context race condition * Add timeout to wait on connection in test
Configuration menu - View commit details
-
Copy full SHA for 5c7d23a - Browse repository at this point
Copy the full SHA 5c7d23aView commit details -
Rewrite the type support, and use a plugin `Connector` architecture to support reconnection for PVI and Tango. Fixes #472, fixes #562, fixes #535, fixes #505, fixes #373, fixes #601 Required for #551 Structure now read from `.value` rather than `.pvi`. Supported in FastCS. Requires at least PandABlocks-ioc 0.10.0 ```python from enum import Enum class MyEnum(str, Enum): ONE = "one" TWO = "two" from ophyd_async.core import StrictEnum class MyEnum(StrictEnum): ONE = "one" TWO = "two" ``` ```python from ophyd_async.core import SubsetEnum MySubsetEnum = SubsetEnum["one", "two"] class MySubsetEnum(SubsetEnum): ONE = "one" TWO = "two" ``` ```python import numpy as np x = epics_signal_rw(np.int32, "PV") x = epics_signal_rw(int, "PV") ``` ```python import numpy as np import numpy.typing as npt x = epics_signal_rw(npt.NDArray[np.int32], "PV") from ophyd_async.core import Array1D x = epics_signal_rw(Array1D[np.int32], "PV") ``` ```python import numpy as np import numpy.typing as npt x = epics_signal_rw(npt.NDArray[np.str_], "PV") from collections.abc import Sequence x = epics_signal_rw(Sequence[str], "PV") ``` ```python fake_set_signal = SignalRW(MockSignalBackend(float)) fake_set_signal = soft_signal_rw(float) await fake_set_signal.connect(mock=True) ``` ```python get_mock_put(driver.capture).assert_called_once_with(Writing.ON, wait=ANY, timeout=ANY) get_mock_put(driver.capture).assert_called_once_with(Writing.ON, wait=ANY) ``` ```python class MyDevice(Device): def __init__(self, name: str = ""): self.signal, self.backend_put = soft_signal_r_and_setter(int) class MyDevice(Device): def __init__(self, name: str = ""): self.signal, self.backend_put = soft_signal_r_and_setter(int) super().__init__(name=name) ``` The `Table` type has been suitable for everything we have seen so far, if you need an arbitrary `BaseModel` subclass then please make an issue ```python class SourceDevice(Device): def __init__(self, name: str = ""): self.signal = soft_signal_rw(int) super().__init__(name=name) class ReferenceDevice(Device): def __init__(self, signal: SignalRW[int], name: str = ""): self.signal = signal super().__init__(name=name) def set(self, value) -> AsyncStatus: return self.signal.set(value + 1) from ophyd_async.core import Reference class ReferenceDevice(Device): def __init__(self, signal: SignalRW[int], name: str = ""): self._signal_ref = Reference(signal) super().__init__(name=name) def set(self, value) -> AsyncStatus: return self._signal_ref().set(value + 1) ```
Configuration menu - View commit details
-
Copy full SHA for 8a8e9ea - Browse repository at this point
Copy the full SHA 8a8e9eaView commit details -
Update copier template to 2.4.0 (#628)
* Update copier template to 2.4.0 * Choose a machine accessible URL for license
Configuration menu - View commit details
-
Copy full SHA for 23a0e83 - Browse repository at this point
Copy the full SHA 23a0e83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 394dc4e - Browse repository at this point
Copy the full SHA 394dc4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c6d0d9 - Browse repository at this point
Copy the full SHA 4c6d0d9View commit details -
Allow shared parent mock to be passed to Device.connect (#599)
* Allow unittest.Mock to be passed to Device.connect * use bool | Mock signature for connect everywhere * store Mocks for Devices and MockSignalBackends for Signals in dictionaries * assert mock calls explicitly in epics/demo/test_demo.py
Configuration menu - View commit details
-
Copy full SHA for e9762d2 - Browse repository at this point
Copy the full SHA e9762d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94b6d67 - Browse repository at this point
Copy the full SHA 94b6d67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ae409b - Browse repository at this point
Copy the full SHA 5ae409bView commit details -
Windows: fix unit tests & enable CI (#633)
* Fix race condition in mock_signal_backend * Fix numpy datatypes in test_mock_signal_backend * Fix adaravis URI paths * Fix path in test_kinetix * Fix paths in simdetector tests * Loosen timings against race condition in test_sim_detector * Correct paths in test_advimba * Fix paths in test_eiger * Fix broken tests in test_signals * Fix tange test_base_device tests on Windows Missing process=True argument was causing all subsequent tests to fail on windows * Fix race conditions in tango tests * Use tango FQTRL to placate windows unit tests * Correct paths in fastcs tests * Correct path logic for windows compatibility * Slacken timings for race condition in test_sim_motor * Slacken race condition timings in test_motor * Enable windows CI builds * Try allowing asyncio time to clean up tasks * Object IDs on windows are uppercase * Try wait_for_wakeups
Configuration menu - View commit details
-
Copy full SHA for 74c7d48 - Browse repository at this point
Copy the full SHA 74c7d48View commit details -
Declarative EPICS and StandardReadable Devices (#598)
Add optional Declarative Device support Includes: - An ADR for optional Declarative Devices - Support for `StandardReadable` Declarative Devices via `StandardReadableFormat` annotations - Support for EPICS Declarative Devices via an `EpicsDevice` baseclass and `PvSuffic` annotations - Updates to the EPICS and Tango demo devices to use them Structure read from `.value` now includes `DeviceVector` support. Requires at least PandABlocks-ioc 0.11.2 `ophyd_async.epics.signal` moves to `ophyd_async.epics.core` with a backwards compat module that emits deprecation warning. ```python from ophyd_async.epics.signal import epics_signal_rw from ophyd_async.epics.core import epics_signal_rw ``` `StandardReadable` wrappers change to enum members of `StandardReadableFormat` (normally imported as `Format`) ```python from ophyd_async.core import ConfigSignal, HintedSignal class MyDevice(StandardReadable): def __init__(self): self.add_readables([sig1], ConfigSignal) self.add_readables([sig2], HintedSignal) self.add_readables([sig3], HintedSignal.uncached) from ophyd_async.core import StandardReadableFormat as Format class MyDevice(StandardReadable): def __init__(self): self.add_readables([sig1], Format.CONFIG_SIGNAL) self.add_readables([sig2], Format.HINTED_SIGNAL) self.add_readables([sig3], Format.HINTED_UNCACHED_SIGNAL ``` ```python from ophyd_async.core import ConfigSignal, HintedSignal from ophyd_async.epics.signal import epics_signal_r, epics_signal_rw class Sensor(StandardReadable): def __init__(self, prefix: str, name="") -> None: with self.add_children_as_readables(HintedSignal): self.value = epics_signal_r(float, prefix + "Value") with self.add_children_as_readables(ConfigSignal): self.mode = epics_signal_rw(EnergyMode, prefix + "Mode") super().__init__(name=name) from typing import Annotated as A from ophyd_async.core import StandardReadableFormat as Format from ophyd_async.epics.core import EpicsDevice, PvSuffix, epics_signal_r, epics_signal_rw class Sensor(StandardReadable, EpicsDevice): value: A[SignalR[float], PvSuffix("Value"), Format.HINTED_SIGNAL] mode: A[SignalRW[EnergyMode], PvSuffix("Mode"), Format.CONFIG_SIGNAL] ```
Configuration menu - View commit details
-
Copy full SHA for 0a12635 - Browse repository at this point
Copy the full SHA 0a12635View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3de9bd0 - Browse repository at this point
Copy the full SHA 3de9bd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a95c3e - Browse repository at this point
Copy the full SHA 4a95c3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 040f7a4 - Browse repository at this point
Copy the full SHA 040f7a4View commit details -
Fix some small issues discovered in testing (#646)
- Raise `NotConnected` errors in mock mode too when failing on creation of mock signal because of invalid datatype - Support bare `np.ndarray` in SoftSignalBackend - Support tagged and variant unions for NTNDArray - Check that Devices have unique names in `ensure_connected`
Configuration menu - View commit details
-
Copy full SHA for ad910fb - Browse repository at this point
Copy the full SHA ad910fbView commit details -
Yield in each loop of observe_value (#648)
This helps in the very specific case of an observe_value directly or indirectly modifying the signal that is being updated. This creates a busy loop which will not be interrupted by wrapping in asyncio.wait_for. To demonstrate, added test_observe_value_times_out_with_no_external_task
Configuration menu - View commit details
-
Copy full SHA for bc153ea - Browse repository at this point
Copy the full SHA bc153eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a12838 - Browse repository at this point
Copy the full SHA 3a12838View commit details