fix: validate screening instead of running it
CI / lint (pull_request) Successful in 44s
CI / test (3.12) (pull_request) Successful in 1m2s
CI / test (3.13) (pull_request) Successful in 1m8s
CI / test (3.14) (pull_request) Successful in 1m10s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m9s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m12s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m37s
CI / coverage-analysis (pull_request) Failing after 4s
CI / lint (push) Successful in 34s
Docs build and publish / docker (push) Successful in 17s
CI / test (3.12) (push) Canceled after 36s
CI / test (3.13) (push) Canceled after 32s
CI / test (3.14) (push) Canceled after 31s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 28s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 23s
CI / test-with-coverage (push) Canceled after 22s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 19s

This commit was merged in pull request #208.
This commit is contained in:
David Perl
2026-09-09 15:03:37 +02:00
parent 0dbbf03144
commit 29f5357d10
+5 -49
View File
@@ -3,15 +3,7 @@ from aarecommon.config.logger import setup_logger
from aarecommon.errors.exception_handler import AerotechCommunicationError
from aarecommon.math.coordinate import AerotechCoordinate, Coordinate
from aarecommon.models.beamline import MXBeamline
from aarescan_client import (
ApiClient,
AxisStatus,
Configuration,
DefaultApi,
RotationRequest,
Status,
Target,
)
from aarescan_client import ApiClient, Configuration, DefaultApi, RotationRequest, Status, Target
from aarescan_client.models.grid_request import GridRequest
from aarescan_client.models.screen_request import ScreenRequest
@@ -95,42 +87,6 @@ class AerotechController:
)
def status(self) -> Status:
if self._simulated:
return Status(
state=Status.State.IDLE,
x=AxisStatus(
pos=self._pos.x,
vel=self._vel,
enabled=False,
homed=False,
moving=False,
fault=False,
),
y=AxisStatus(
pos=self._pos.y,
vel=self._vel,
enabled=False,
homed=False,
moving=False,
fault=False,
),
z=AxisStatus(
pos=self._pos.z,
vel=self._vel,
enabled=False,
homed=False,
moving=False,
fault=False,
),
u=AxisStatus(
pos=self._pos.u,
vel=self._vel,
enabled=False,
homed=False,
moving=False,
fault=False,
),
)
try:
return self._api.status_get()
except Exception as e:
@@ -226,9 +182,9 @@ class AerotechController:
grid_elem_count_y: int,
grid_elem_size_y_um: float,
time_sec: float,
grid_elem_size_x_um: float | None = None,
grid_elem_count_x: int | None = None,
run_async: bool | None = False,
grid_elem_size_x_um: float,
grid_elem_count_x: int,
run_async: bool = False,
):
payload = GridRequest(
grid_elem_count_x=grid_elem_count_x,
@@ -328,7 +284,7 @@ class AerotechController:
logger.info(
f"sending screening scan request to aarescan for validation with payload {payload}"
)
return self._api.screening_post(payload)
return self._api.validate_screening_post(payload)
except Exception as e:
raise AerotechCommunicationError(
f"Aerotech screening validation failed: {e}",