Skip to content

Commit 85cd819

Browse files
authored
chore: Add justfile for common tasks (#1498)
Simplifies the various common tasks that should be run during development. Can be added to over time but for now mainly wraps running compose services and calling blueapi so config files don't have to be specified for every command.
1 parent 7d6392f commit 85cd819

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

justfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
SESSION := "cm12345-1"
2+
3+
compose +ARGS="up -d":
4+
docker compose -f tests/system_tests/compose.yaml {{ARGS}}
5+
6+
configure-adsim: (compose "exec" "numtracker" "/app/numtracker" "client" "configure" "adsim"
7+
"--directory" '/tmp/'
8+
"--scan" '{instrument}-{scan_number}'
9+
"--detector" '{instrument}-{scan_number}-{detector}'
10+
"--number" "43")
11+
12+
services: compose configure-adsim
13+
14+
serve *OPTS: services
15+
source tests/system_tests/.env
16+
uv run blueapi -c tests/system_tests/config.yaml {{OPTS}} serve
17+
18+
run PLAN PARAMS:
19+
uv run blueapi -c tests/system_tests/config.yaml controller run -i {{ SESSION }} {{ PLAN }} '{{ PARAMS }}'
20+
21+
lint:
22+
uv run prek run --all-files
23+
uv run pyright src tests
24+
25+
unit:
26+
uv run pytest tests/unit_tests
27+
28+
system:
29+
uv run pytest tests/system_tests

0 commit comments

Comments
 (0)