Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0adc946
Refactor scans so they are flatter
oliwenmandiamond May 1, 2026
9ad324a
Update step scan logic, tests pass
oliwenmandiamond May 7, 2026
8a476aa
Add error message to _make_stepped_list_num
oliwenmandiamond May 7, 2026
7a948f8
Update doc strings and _make_step_scan_args_and_shape logic
oliwenmandiamond May 8, 2026
4473ec5
Add stronger tests for invalid arguments
oliwenmandiamond May 8, 2026
d93ba1a
Added additional test to check for scan shape
oliwenmandiamond May 8, 2026
6503982
Fix shape test
oliwenmandiamond May 8, 2026
ed2c7e2
Add test for require
oliwenmandiamond May 8, 2026
6ee9bfd
Fix and optimise tests
oliwenmandiamond May 8, 2026
4a61b72
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond May 8, 2026
2c4587a
Update comments
oliwenmandiamond May 8, 2026
647d095
Update doc strings and error msgs
oliwenmandiamond May 11, 2026
40947ec
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond May 20, 2026
72fe2ae
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 2, 2026
425e708
Merge branch 'refactor_scans_so_they_are_flatter' of ssh://github.com…
oliwenmandiamond Sep 2, 2026
b30a406
Changes so far
oliwenmandiamond Sep 4, 2026
f5f6b75
Simply _round_list_elements and add doc strings to all uitls functions
oliwenmandiamond Sep 4, 2026
d6b910a
Update validators to use templates
oliwenmandiamond Sep 4, 2026
3f6b07f
Add back utils tests
oliwenmandiamond Sep 4, 2026
8e5c010
Separate out types and annotations
oliwenmandiamond Sep 4, 2026
32aa33c
Tidy up
oliwenmandiamond Sep 4, 2026
c482a9d
Update to be paramertised tests for complicance test, also remove no …
oliwenmandiamond Sep 4, 2026
5ed89cf
Correct remaining tests plus add doc string
oliwenmandiamond Sep 4, 2026
99728ba
Add missing code coverage
oliwenmandiamond Sep 4, 2026
4bd9b64
Remove commented out code
oliwenmandiamond Sep 4, 2026
9763df2
Reduce test_wrapped lines
oliwenmandiamond Sep 4, 2026
4ea39fe
Update doc strings for scan plans
oliwenmandiamond Sep 4, 2026
b959329
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 4, 2026
0d65b0b
Add missing plan typing for spec_path
oliwenmandiamond Sep 4, 2026
f32aa86
Assume blueapi supports *args
oliwenmandiamond Sep 4, 2026
057b47d
Use CustomPlanMetadata
oliwenmandiamond Sep 4, 2026
1691d0c
Remove double space
oliwenmandiamond Sep 7, 2026
729e555
Further improve type checking for plans, use PositiveInt and Iterable…
oliwenmandiamond Sep 7, 2026
000d3fb
Use PositiveInt for MovableStartStopNum. Add additional error messages
oliwenmandiamond Sep 7, 2026
9a39643
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 7, 2026
15450f9
Use Sequence for MovableListOfPoints
oliwenmandiamond Sep 7, 2026
61f68ef
Merge branch 'refactor_scans_so_they_are_flatter' of ssh://github.com…
oliwenmandiamond Sep 7, 2026
0a5257c
spec_scan Annotated as A
oliwenmandiamond Sep 7, 2026
bffa8c5
Reduce number of lines
oliwenmandiamond Sep 7, 2026
db1cf41
Add error msg for test_num_scan_fails_when_asked_to_snake_slow_axis
oliwenmandiamond Sep 7, 2026
13e12bc
Remove Number as it is not needed
oliwenmandiamond Sep 7, 2026
91327f2
Move type_adapter
oliwenmandiamond Sep 7, 2026
a00e2f4
Rename MovableListOfPoints to MovableListOfPositions
oliwenmandiamond Sep 7, 2026
960aad0
Remove plan reliance on attach_data_session_metadata_decorator
oliwenmandiamond Sep 7, 2026
274c5ed
Fix from renaming
oliwenmandiamond Sep 7, 2026
99da436
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 7, 2026
a378118
Implement feedback and keep error messages consistent
oliwenmandiamond Sep 8, 2026
eec41f7
Correct test name
oliwenmandiamond Sep 8, 2026
a8a13d9
Support AsyncMovable
oliwenmandiamond Sep 8, 2026
1e75aa1
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 9, 2026
762422e
Undo typing change
oliwenmandiamond Sep 9, 2026
6d48ec3
Move test_scan_spec to reflect structure change
oliwenmandiamond Sep 9, 2026
990091a
Put assert_expected_shape in assert_emitted
oliwenmandiamond Sep 9, 2026
78c4d58
Add linked PR for list_scan typing be wrong
oliwenmandiamond Sep 9, 2026
e395bc0
Match error message for test_list_scan_fails_with_differnt_list_lengths
oliwenmandiamond Sep 9, 2026
df8df8c
Update utils functions to use Sequence
oliwenmandiamond Sep 9, 2026
012433a
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 11, 2026
253204e
Merge branch 'main' into refactor_scans_so_they_are_flatter
oliwenmandiamond Sep 23, 2026
51014a5
Rename wrapped to blueapi_wrapped
oliwenmandiamond Sep 25, 2026
cb745bf
Fix change in import
oliwenmandiamond Sep 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dodal/plan_stubs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .wrapped import (
from .blueapi_wrapped import (
move,
move_relative,
rd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from bluesky.protocols import Movable, Readable, Stoppable
from bluesky.utils import MsgGenerator

"""Wrappers for Bluesky built-in plan stubs with type hinting."""
"""Wrappers for Bluesky built-in plan stubs with type hinting to be comptable with blueapi."""

Group = Annotated[str, "String identifier used by 'wait' or stubs that await"]

Expand Down
33 changes: 0 additions & 33 deletions src/dodal/plans/__init__.py
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
from .spec_path import spec_scan
from .wrapped import (
count,
list_grid_rscan,
list_grid_scan,
list_rscan,
list_scan,
num_grid_rscan,
num_grid_scan,
num_rscan,
num_scan,
step_grid_rscan,
step_grid_scan,
step_rscan,
step_scan,
)

__all__ = [
"count",
"list_grid_rscan",
"list_grid_scan",
"list_rscan",
"list_scan",
"num_grid_rscan",
"num_grid_scan",
"num_rscan",
"num_scan",
"spec_scan",
"step_grid_rscan",
"step_grid_scan",
"step_rscan",
"step_scan",
]
33 changes: 33 additions & 0 deletions src/dodal/plans/scans/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from .blueapi_wrapped import (
count,
list_grid_rscan,
list_grid_scan,
list_rscan,
list_scan,
num_grid_rscan,
num_grid_scan,
num_rscan,
num_scan,
step_grid_rscan,
step_grid_scan,
step_rscan,
step_scan,
)
from .spec_path import spec_scan

__all__ = [
"count",
"list_grid_rscan",
"list_grid_scan",
"list_rscan",
"list_scan",
"num_grid_rscan",
"num_grid_scan",
"num_rscan",
"num_scan",
"step_grid_rscan",
"step_grid_scan",
"step_rscan",
"step_scan",
"spec_scan",
]
92 changes: 92 additions & 0 deletions src/dodal/plans/scans/annotations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
from typing import Annotated as A

from pydantic import BeforeValidator, Field

from dodal.plans.scans.types import (
Detectors,
MovableListOfPositions,
MovableStartStep,
MovableStartStop,
MovableStartStopNum,
MovableStartStopStep,
)
from dodal.plans.scans.validators import trajectory_validator

DetectorsA = A[
Detectors,
Field(
description="Set of readable devices, will take a reading at each point",
),
]

MovableStartStepA = A[
MovableStartStep,
Field(
description="Trajectory defined by a movable, start position, and step size."
),
BeforeValidator(
trajectory_validator(
length=3,
template="(movable, start, step)",
expected_type=MovableStartStep,
)
),
]

MovableStartStopA = A[
MovableStartStop,
Field(
description="Trajectory defined by a movable, start position, and stop position.",
),
BeforeValidator(
trajectory_validator(
length=3,
template="(movable, start, stop)",
expected_type=MovableStartStop,
)
),
]

MovableStartStopNumA = A[
MovableStartStopNum,
Field(
description="Trajectory defined by a movable, start position, stop position, "
"and number of points."
),
BeforeValidator(
trajectory_validator(
length=4,
template="(movable, start, stop, num)",
expected_type=MovableStartStopNum,
)
),
]

MovableListOfPositionsA = A[
MovableListOfPositions,
Field(
description="Trajectory defined by a movable and a list of positions to move to."
),
BeforeValidator(
trajectory_validator(
length=2,
template="(movable, [point1, point2, ...])",
expected_type=MovableListOfPositions,
)
),
]

MovableStartStopStepA = A[
MovableStartStopStep,
Field(
description="Trajectory defined by a movable, start position, stop position, "
"and step size."
),
BeforeValidator(
trajectory_validator(
length=4,
template="(movable, start, stop, step)",
expected_type=MovableStartStopStep,
)
),
]
Loading
Loading