diff --git a/pyproject.toml b/pyproject.toml index 8bb14eff26..6c34804719 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,7 @@ reportMissingImports = false # Ignore missing stubs in imported modules asyncio_mode = "auto" markers = [ "s03: marks tests as requiring the s03 simulator running (deselect with '-m \"not s03\"')", + "t01: marks tests as requiring the t01 AreaDetector simulator running (deselect with '-m \"not t01\"')", "skip_in_pycharm: marks test as not working in pycharm testrunner", ] addopts = """ @@ -150,7 +151,7 @@ allowlist_externals = sphinx-build sphinx-autobuild commands = - tests: pytest -m 'not s03' --cov=dodal --cov-report term --cov-report xml:cov.xml {posargs} + tests: pytest -m 'not s03' -m 'not t01' --cov=dodal --cov-report term --cov-report xml:cov.xml {posargs} type-checking: pyright src tests {posargs} pre-commit: pre-commit run --all-files --show-diff-on-failure {posargs} docs: sphinx-{posargs:build -E} -T docs build/html diff --git a/src/dodal/beamlines/t01.py b/src/dodal/beamlines/t01.py index ad814c7ad2..af177988d8 100644 --- a/src/dodal/beamlines/t01.py +++ b/src/dodal/beamlines/t01.py @@ -27,11 +27,20 @@ ) """ +Beamline module for use with the simulated AreaDetector and motors. +These devices are simulated at the EPICS level, enabling testing of +dodal and ophyd-async against what appear to be "real" signals. + Usage Example ------------- Start the simulated beamline by following the epics-containers tutorial at https://epics-containers.github.io/main/tutorials/launch_example.html +And ensure that the signals are visible: + +```sh +export EPICS_CA_ADDR_LIST=127.0.0.1 +``` How to use the devices in a plan: In an ipython terminal run: @@ -39,12 +48,12 @@ ```python from bluesky.run_engine import RunEngine -from dodal.beamlines.adsim import adsim, sim_motors -from dodal.common.beamlines.beamline_utils import get_path_provider +from dodal.beamlines.t01 import adsim, sim_stage from dodal.plans import count RE = RunEngine() det = adsim(connect_immediately=True) +sim_stage = sim_stage(connect_immediately=True) RE(count([det], num=10)) ```