Skip to content

Commit ed1c621

Browse files
test: Add system tests using NumTracker (#1118)
Necessarily picks up dodal 1.54 for the adsim module to be able to use the PathProvider that we want to, and ophyd-async 0.12.1 for a bug fix in the ADHDFWriter --------- Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk>
1 parent fb03c74 commit ed1c621

File tree

11 files changed

+164
-99
lines changed

11 files changed

+164
-99
lines changed

.github/workflows/_system_test.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,22 @@ jobs:
2525
repository: epics-containers/example-services
2626
path: example-services
2727

28-
- name: Run docker compose
28+
- name: Compose devices
2929
uses: hoverkraft-tech/compose-action@40041ff1b97dbf152cd2361138c2b03fa29139df # v2.3.0
3030
with:
31-
compose-file: "./example-services/compose.yaml"
31+
compose-file: "example-services/compose.yaml"
3232
services: |
3333
bl01t-di-cam-01
3434
bl01t-mo-sim-01
3535
ca-gateway
3636
37-
- name: Start RabbitMQ
38-
uses: namoshek/rabbitmq-github-action@d1d4455f4a8f72db66111c24cb0dc5654047a975 # v1
37+
- name: Compose services
38+
uses: hoverkraft-tech/compose-action@40041ff1b97dbf152cd2361138c2b03fa29139df # v2.3.0
3939
with:
40-
ports: "61613:61613"
41-
plugins: rabbitmq_stomp
40+
compose-file: "tests/system_tests/compose.yaml"
41+
services: |
42+
rabbitmq
43+
numtracker
4244
4345
- name: Start Blueapi Server
4446
env:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ lockfiles/
7171

7272
# Editor/IDE project files
7373
.idea/
74+
75+
# Example IOCs
76+
example-services/

dev-requirements.txt

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
accessible-pygments==0.0.5
2-
aioca==1.8.1
2+
aioca==2.0a4
33
aiofiles==24.1.0
44
aiohappyeyeballs==2.6.1
5-
aiohttp==3.12.14
5+
aiohttp==3.12.15
66
aiosignal==1.4.0
77
alabaster==1.0.0
88
annotated-types==0.7.0
@@ -22,38 +22,37 @@ click==8.2.1
2222
colorama==0.4.6
2323
colorlog==6.9.0
2424
compress-pickle==2.1.0
25-
contourpy==1.3.2
25+
contourpy==1.3.3
2626
copier==9.8.0
27-
coverage==7.9.2
27+
coverage==7.10.1
2828
cryptography==45.0.5
2929
cycler==0.12.1
3030
dataclasses-json==0.6.7
3131
deepdiff==8.5.0
3232
deepmerge==2.0
33-
Deprecated==1.2.18
34-
distlib==0.3.9
35-
dls-dodal==1.51.0
33+
distlib==0.4.0
34+
dls-dodal==1.54.0
3635
dnspython==2.7.0
3736
docopt==0.6.2
3837
docutils==0.21.2
3938
dunamai==1.25.0
4039
email_validator==2.2.0
41-
epicscorelibs==7.0.7.99.1.2a1
40+
epicscorelibs==7.0.7.99.1.2
4241
event-model==1.23
4342
fastapi==0.116.1
4443
fastapi-cli==0.0.8
45-
fastapi-cloud-cli==0.1.4
44+
fastapi-cloud-cli==0.1.5
4645
filelock==3.18.0
4746
flexcache==0.3
4847
flexparser==0.4
49-
fonttools==4.58.5
48+
fonttools==4.59.0
5049
frozenlist==1.7.0
5150
funcy==2.0
5251
gitdb==4.0.12
53-
GitPython==3.1.44
52+
GitPython==3.1.45
5453
googleapis-common-protos==1.70.0
5554
graypy==2.1.0
56-
grpcio==1.73.1
55+
grpcio==1.74.0
5756
h11==0.16.0
5857
historydict==1.2.6
5958
httpcore==1.0.9
@@ -68,15 +67,15 @@ iniconfig==2.1.0
6867
itsdangerous==2.2.0
6968
Jinja2==3.1.6
7069
jinja2-ansible-filters==1.3.2
71-
jsonschema==4.24.0
70+
jsonschema==4.25.0
7271
jsonschema-specifications==2025.4.1
7372
jwcrypto==1.5.6
7473
kiwisolver==1.4.8
7574
lz4==4.4.4
7675
markdown-it-py==3.0.0
7776
MarkupSafe==3.0.2
7877
marshmallow==3.26.1
79-
matplotlib==3.10.3
78+
matplotlib==3.10.5
8079
mdit-py-plugins==0.4.2
8180
mdurl==0.1.2
8281
mistune==3.1.3
@@ -92,32 +91,32 @@ nose2==0.15.1
9291
numpy==2.2.6
9392
observability-utils==0.1.5
9493
opencv-python-headless==4.12.0.88
95-
opentelemetry-api==1.35.0
96-
opentelemetry-distro==0.56b0
97-
opentelemetry-exporter-otlp==1.35.0
98-
opentelemetry-exporter-otlp-proto-common==1.35.0
99-
opentelemetry-exporter-otlp-proto-grpc==1.35.0
100-
opentelemetry-exporter-otlp-proto-http==1.35.0
101-
opentelemetry-instrumentation==0.56b0
102-
opentelemetry-instrumentation-asgi==0.56b0
103-
opentelemetry-instrumentation-fastapi==0.56b0
104-
opentelemetry-proto==1.35.0
105-
opentelemetry-sdk==1.35.0
106-
opentelemetry-semantic-conventions==0.56b0
107-
opentelemetry-util-http==0.56b0
94+
opentelemetry-api==1.36.0
95+
opentelemetry-distro==0.57b0
96+
opentelemetry-exporter-otlp==1.36.0
97+
opentelemetry-exporter-otlp-proto-common==1.36.0
98+
opentelemetry-exporter-otlp-proto-grpc==1.36.0
99+
opentelemetry-exporter-otlp-proto-http==1.36.0
100+
opentelemetry-instrumentation==0.57b0
101+
opentelemetry-instrumentation-asgi==0.57b0
102+
opentelemetry-instrumentation-fastapi==0.57b0
103+
opentelemetry-proto==1.36.0
104+
opentelemetry-sdk==1.36.0
105+
opentelemetry-semantic-conventions==0.57b0
106+
opentelemetry-util-http==0.57b0
108107
ophyd==1.10.7
109-
ophyd-async==0.11
108+
ophyd-async==0.12.3
110109
orderly-set==5.5.0
111-
orjson==3.10.18
112-
p4p==4.2.0
110+
orjson==3.11.1
111+
p4p==4.2.1
113112
packaging==25.0
114113
pathlib2==2.3.7.post1
115114
pathspec==0.12.1
116115
picobox==4.0.0
117116
pika==1.3.2
118117
pillow==11.3.0
119118
Pint==0.24.4
120-
pipdeptree==2.27.0
119+
pipdeptree==2.28.0
121120
platformdirs==4.3.8
122121
pluggy==1.6.0
123122
plumbum==1.9.0
@@ -126,7 +125,7 @@ pre_commit==4.2.0
126125
prompt_toolkit==3.0.51
127126
propcache==0.3.2
128127
protobuf==6.31.1
129-
pvxslibs==1.3.3
128+
pvxslibs==1.4.0
130129
py==1.11.0
131130
pycparser==2.22
132131
pydantic==2.11.7
@@ -141,7 +140,7 @@ PyJWT==2.10.1
141140
pyparsing==3.2.3
142141
pyright==1.1.403
143142
pytest==8.4.1
144-
pytest-asyncio==1.0.0
143+
pytest-asyncio==1.1.0
145144
pytest-cov==6.2.1
146145
python-dateutil==2.9.0.post0
147146
python-dotenv==1.1.1
@@ -153,18 +152,17 @@ redis==6.2.0
153152
referencing==0.36.2
154153
requests==2.32.4
155154
responses==0.25.7
156-
rich==14.0.0
157-
rich-toolkit==0.14.8
158-
rignore==0.6.2
155+
rich==14.1.0
156+
rich-toolkit==0.14.9
157+
rignore==0.6.4
159158
roman-numerals-py==3.1.0
160159
rpds-py==0.26.0
161160
ruamel.yaml==0.18.14
162161
ruamel.yaml.clib==0.2.12
163-
ruff==0.12.3
162+
ruff==0.12.7
164163
scanspec==0.8.0
165164
semver==3.0.4
166-
sentry-sdk==2.32.0
167-
setuptools==80.9.0
165+
sentry-sdk==2.34.1
168166
setuptools_dso==2.12.2
169167
shellingham==1.5.4
170168
six==1.17.0
@@ -186,9 +184,11 @@ sphinxcontrib-jsmath==1.0.1
186184
sphinxcontrib-openapi==0.8.4
187185
sphinxcontrib-qthelp==2.0.0
188186
sphinxcontrib-serializinghtml==2.0.0
187+
stamina==25.1.0
189188
starlette==0.47.2
190189
stomp.py==8.2.0
191190
super-state-machine==2.0.2
191+
tenacity==9.1.2
192192
tomlkit==0.13.3
193193
toolz==1.0.0
194194
tox==3.28.0
@@ -206,7 +206,7 @@ ujson==5.10.0
206206
urllib3==2.5.0
207207
uvicorn==0.35.0
208208
uvloop==0.21.0
209-
virtualenv==20.31.2
209+
virtualenv==20.32.0
210210
watchfiles==1.1.0
211211
wcwidth==0.2.13
212212
websocket-client==1.8.0

docs/tutorials/quickstart.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ The worker can also be started using a custom config file:
1818
blueapi --config path/to/file serve
1919
```
2020

21-
An example of a config file that starts STOMP with default values can be found in:
22-
23-
```
24-
src/script/stomp_config.yml
25-
```
26-
2721
## Test that the Worker is Running
2822

2923
Blueapi comes with a CLI so that you can query and control the worker from the terminal.

docs/tutorials/run-bus.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Blueapi can publish updates to a message bus asynchronously, the CLI can then vi
55
## Start RabbitMQ
66

77
The worker requires a running instance of RabbitMQ. The easiest way to start it is
8-
to execute the provided script:
8+
to `compose` the services in `tests/system_tests/compose.yaml`
99

10-
```
11-
src/script/start_rabbitmq.sh
10+
```sh
11+
docker compose -f tests/system_tests/compose.yaml run rabbitmq --detach
1212
```
1313

1414
## Config File

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies = [
2424
"fastapi>=0.112.0",
2525
"uvicorn",
2626
"requests",
27-
"dls-dodal>=1.51.0",
27+
"dls-dodal>=1.54.0",
2828
"super-state-machine", # https://github.com/DiamondLightSource/blueapi/issues/553
2929
"GitPython",
3030
"event-model==1.23", # https://github.com/DiamondLightSource/blueapi/issues/684

src/script/start_rabbitmq.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/system_tests/compose.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
numtracker:
3+
image: ghcr.io/diamondlightsource/numtracker:1.0.1
4+
ports:
5+
- "8406:8000"
6+
post_start:
7+
- command: /app/numtracker client configure adsim --directory '/tmp/' --scan '{instrument}-{scan_number}' --detector '{instrument}-{scan_number}-{detector}' --number 43
8+
9+
rabbitmq:
10+
image: docker.io/rabbitmq:4.0-management
11+
ports:
12+
- "5672:5672"
13+
- "15672:15672"
14+
- "61613:61613"
15+
volumes:
16+
- type: bind
17+
source: ./services/rabbitmq_plugins
18+
target: /etc/rabbitmq/enabled_plugins

tests/system_tests/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
api:
22
url: http://0.0.0.0:8000
33
env:
4+
metadata:
5+
instrument: adsim
46
sources:
57
- kind: dodal
68
module: dodal.beamlines.adsim
@@ -11,3 +13,5 @@ env:
1113
stomp:
1214
enabled: true
1315
url: tcp://localhost:61613/
16+
numtracker:
17+
url: http://localhost:8406/graphql
File renamed without changes.

0 commit comments

Comments
 (0)