From 0a98d32b45c892595ad729f8b07d0748f2e3fa23 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Mon, 20 Apr 2026 14:58:08 +0100 Subject: [PATCH 1/5] chore: Add justfile for common tasks 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. --- justfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 000000000..6ce7575e8 --- /dev/null +++ b/justfile @@ -0,0 +1,17 @@ +set dotenv-filename := "tests/system_tests/.env" + +compose +ARGS="up -d": + podman compose -f tests/system_tests/compose.yaml {{ARGS}} + +blueapi *ARGS="serve": + uv run blueapi -c tests/system_tests/config.yaml {{ARGS}} + +lint: + uv run ruff check + uv run pyright + +unit: + uv run pytest tests/unit_tests + +system: + uv run pytest tests/system_tests From c2a31befed0ffa5a60511c738bda820bc8657c59 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Mon, 20 Apr 2026 15:25:10 +0100 Subject: [PATCH 2/5] Add 'services' task that configures numtracker correctly --- justfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/justfile b/justfile index 6ce7575e8..180ef52ad 100644 --- a/justfile +++ b/justfile @@ -3,6 +3,14 @@ set dotenv-filename := "tests/system_tests/.env" compose +ARGS="up -d": podman compose -f tests/system_tests/compose.yaml {{ARGS}} +configure-adsim: (compose "exec" "numtracker" "/app/numtracker" "client" "configure" "adsim" + "--directory" '/tmp/' + "--scan" '{instrument}-{scan_number}' + "--detector" '{instrument}-{scan_number}-{detector}' + "--number" "43") + +services: compose configure-adsim + blueapi *ARGS="serve": uv run blueapi -c tests/system_tests/config.yaml {{ARGS}} From 80c83eac27006f024696635d795588ece8a4d289 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Tue, 21 Apr 2026 14:14:28 +0100 Subject: [PATCH 3/5] Use docker instead of podman --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 180ef52ad..df88452f7 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,7 @@ set dotenv-filename := "tests/system_tests/.env" compose +ARGS="up -d": - podman compose -f tests/system_tests/compose.yaml {{ARGS}} + docker compose -f tests/system_tests/compose.yaml {{ARGS}} configure-adsim: (compose "exec" "numtracker" "/app/numtracker" "client" "configure" "adsim" "--directory" '/tmp/' From 98ecf098cb33c93f2e1d5aaf373b970dec2e2743 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Tue, 21 Apr 2026 15:13:39 +0100 Subject: [PATCH 4/5] Split blueapi task into serve and run --- justfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index df88452f7..435e8a46d 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -set dotenv-filename := "tests/system_tests/.env" +SESSION := "cm12345-1" compose +ARGS="up -d": docker compose -f tests/system_tests/compose.yaml {{ARGS}} @@ -11,8 +11,12 @@ configure-adsim: (compose "exec" "numtracker" "/app/numtracker" "client" "config services: compose configure-adsim -blueapi *ARGS="serve": - uv run blueapi -c tests/system_tests/config.yaml {{ARGS}} +serve *OPTS: services + source tests/system_tests/.env + uv run blueapi -c tests/system_tests/config.yaml {{OPTS}} serve + +run PLAN PARAMS: + uv run blueapi -c tests/system_tests/config.yaml controller run -i {{ SESSION }} {{ PLAN }} '{{ PARAMS }}' lint: uv run ruff check From 62f222b45e768ff7443c879d61c4ac20f9013d9f Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Fri, 24 Apr 2026 14:37:51 +0100 Subject: [PATCH 5/5] Run all prek tests instead of just ruff check --- justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 435e8a46d..fa29b3a71 100644 --- a/justfile +++ b/justfile @@ -19,8 +19,8 @@ run PLAN PARAMS: uv run blueapi -c tests/system_tests/config.yaml controller run -i {{ SESSION }} {{ PLAN }} '{{ PARAMS }}' lint: - uv run ruff check - uv run pyright + uv run prek run --all-files + uv run pyright src tests unit: uv run pytest tests/unit_tests