From ab8152219ba4ebdc42dfaaf5f600a689c26bdf98 Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Tue, 30 Jun 2026 16:41:23 +0100 Subject: [PATCH 1/3] Change centring limits --- src/daq_queuing_service/app/_config.py | 1 + src/daq_queuing_service/plugins/i15_1_converter.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/daq_queuing_service/app/_config.py b/src/daq_queuing_service/app/_config.py index c3706ae..1f88d32 100644 --- a/src/daq_queuing_service/app/_config.py +++ b/src/daq_queuing_service/app/_config.py @@ -26,4 +26,5 @@ def get_default_config() -> str: def load_config(config_path: Path) -> AppConfig: with open(config_path) as f: data = yaml.safe_load(f) + print(data) return AppConfig(**data) diff --git a/src/daq_queuing_service/plugins/i15_1_converter.py b/src/daq_queuing_service/plugins/i15_1_converter.py index 6fff767..6805df7 100644 --- a/src/daq_queuing_service/plugins/i15_1_converter.py +++ b/src/daq_queuing_service/plugins/i15_1_converter.py @@ -19,7 +19,7 @@ def construct_blueapi_tasks_from_i15_1_experiment( ), TaskRequest( name="centre_sample", - params={"start_z": -5, "end_z": 5, "steps": 20, "exposure_time": 0.01}, + params={"start_z": -20, "end_z": 0, "steps": 20, "exposure_time": 0.01}, instrument_session=experiment_definition.instrument_session, ), TaskRequest( From 49b147c226e3a700e9f5a3ca8908597ead4ba005 Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Tue, 30 Jun 2026 16:42:03 +0100 Subject: [PATCH 2/3] Fix accidentally added print statement --- src/daq_queuing_service/app/_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/daq_queuing_service/app/_config.py b/src/daq_queuing_service/app/_config.py index 1f88d32..c3706ae 100644 --- a/src/daq_queuing_service/app/_config.py +++ b/src/daq_queuing_service/app/_config.py @@ -26,5 +26,4 @@ def get_default_config() -> str: def load_config(config_path: Path) -> AppConfig: with open(config_path) as f: data = yaml.safe_load(f) - print(data) return AppConfig(**data) From ddde124f9f8677022e86ebcdd1e0da7caf37fa91 Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Wed, 1 Jul 2026 14:30:39 +0100 Subject: [PATCH 3/3] Fix test --- docs/reference/rest_api.json | 129 ++++++++---------- .../plugins/test_i15_1_converter.py | 4 +- 2 files changed, 62 insertions(+), 71 deletions(-) diff --git a/docs/reference/rest_api.json b/docs/reference/rest_api.json index 2ab291e..afe8317 100644 --- a/docs/reference/rest_api.json +++ b/docs/reference/rest_api.json @@ -669,6 +669,16 @@ "type": "null" } ] + }, + "opa": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpaConfig" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -893,54 +903,6 @@ ], "title": "DeviceManagerSource" }, - "DeviceSource": { - "properties": { - "module": { - "type": "string", - "title": "Module", - "description": "Module to be imported" - }, - "kind": { - "type": "string", - "const": "deviceFunctions", - "title": "Kind", - "default": "deviceFunctions" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "module" - ], - "title": "DeviceSource" - }, - "DodalSource": { - "properties": { - "module": { - "type": "string", - "title": "Module", - "description": "Module to be imported" - }, - "kind": { - "type": "string", - "const": "dodal", - "title": "Kind", - "default": "dodal" - }, - "mock": { - "type": "boolean", - "title": "Mock", - "description": "If true, ophyd_async device connections are mocked", - "default": false - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "module" - ], - "title": "DodalSource" - }, "EnvironmentConfig": { "properties": { "sources": { @@ -949,12 +911,6 @@ { "$ref": "#/components/schemas/PlanSource" }, - { - "$ref": "#/components/schemas/DeviceSource" - }, - { - "$ref": "#/components/schemas/DodalSource" - }, { "$ref": "#/components/schemas/DeviceManagerSource" } @@ -962,25 +918,14 @@ "discriminator": { "propertyName": "kind", "mapping": { - "deviceFunctions": "#/components/schemas/DeviceSource", "deviceManager": "#/components/schemas/DeviceManagerSource", - "dodal": "#/components/schemas/DodalSource", "planFunctions": "#/components/schemas/PlanSource" } } }, "type": "array", "title": "Sources", - "default": [ - { - "module": "dodal.plans", - "kind": "planFunctions" - }, - { - "module": "dodal.plan_stubs.wrapped", - "kind": "planFunctions" - } - ] + "default": [] }, "events": { "$ref": "#/components/schemas/WorkerEventConfig" @@ -1126,9 +1071,29 @@ "OIDCConfig": { "properties": { "well_known_url": { - "type": "string", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "title": "Well Known Url", - "description": "URL to fetch OIDC config from the provider" + "description": "URL to fetch OIDC config from the provider", + "deprecated": true + }, + "issuer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Issuer", + "description": "URL of OIDC provider" }, "client_id": { "type": "string", @@ -1151,11 +1116,37 @@ "additionalProperties": false, "type": "object", "required": [ - "well_known_url", "client_id" ], "title": "OIDCConfig" }, + "OpaConfig": { + "properties": { + "root": { + "type": "string", + "maxLength": 2083, + "minLength": 1, + "format": "uri", + "title": "Root", + "default": "http://localhost:8181/" + }, + "audience": { + "type": "string", + "title": "Audience", + "default": "account" + }, + "tiled_service_account_check": { + "type": "string", + "title": "Tiled Service Account Check" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tiled_service_account_check" + ], + "title": "OpaConfig" + }, "PlanSource": { "properties": { "module": { diff --git a/tests/unit_tests/plugins/test_i15_1_converter.py b/tests/unit_tests/plugins/test_i15_1_converter.py index cf5d1f0..d193c9a 100644 --- a/tests/unit_tests/plugins/test_i15_1_converter.py +++ b/tests/unit_tests/plugins/test_i15_1_converter.py @@ -30,8 +30,8 @@ def test_sample_centre_uses_expected_params(): tasks = construct_blueapi_tasks_from_i15_1_experiment(experiment_definition) assert tasks[1].name == "centre_sample" assert tasks[1].params == { - "start_z": -5, - "end_z": 5, + "start_z": -20, + "end_z": 0, "steps": 20, "exposure_time": 0.01, }