Environment Variables#
Every environment variable ophyd-async reads. The first group affects the library at runtime; the second is read only by the test suite, and setting it has no effect on ophyd-async itself.
Runtime#
OPHYD_ASYNC_PRESERVE_DETECTOR_STATE#
Controls the implicit prepare performed by
StandardDetector.trigger() when
prepare() has not been called since
the last stage().
Value |
Behaviour |
|---|---|
|
Calls |
anything else (default) |
Uses a bare |
See ADR 0013 for rationale.
OPHYD_ASYNC_EPICS_CA_KEEP_ALL_UPDATES#
Controls how the Channel Access signal backend handles backpressure when it cannot keep up with a PV’s updates.
Value |
Behaviour |
|---|---|
|
Buffers updates, lagging behind if the IOC pushes them faster than they can be handled. No update is dropped. |
anything else |
Drops updates that cannot be handled in time, which is |
The value is compared against the exact string True, so any other spelling —
true, 1, yes — selects the “anything else” row and drops updates.
See ADR 0011 for rationale.
OPHYD_ASYNC_ALLOW_RESERVED_ATTRS#
Disables the check that stops a Device attribute being given a name that
collides with a bluesky protocol method (set, read, trigger, …).
Value |
Behaviour |
|---|---|
|
Assigning to a reserved name is allowed, e.g. |
anything else (default) |
Assigning to a reserved name raises |
Intended as a quick escape for downstream test suites that mock protocol methods
this way, so they can be turned back on without editing every call site. To
override a single attribute instead, prefer
ophyd_async.core.set_mock_attr, which does not disable the check globally.
Test suite#
These are read by the tests only, and are irrelevant to using ophyd-async as a
library. They are needed to run How to contribute to the project‘s system and container
tests, which start real IOCs in containers. A devcontainer sets all of them for
you; see .devcontainer/devcontainer.json.
EXAMPLE_SERVICES_PATH#
Path to the example-services directory holding the compose files for those IOCs.
No default: the tests that need it raise if it is unset.
It must be the path as the host sees it, not as the pytest process does. Those
IOCs are started with docker compose against the host’s container engine, so a
path that only the test process can see does not resolve.