Refactor wrapped scan plans so they more user friendly#2050
Refactor wrapped scan plans so they more user friendly#2050oliwenmandiamond wants to merge 13 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2050 +/- ##
==========================================
- Coverage 99.12% 99.12% -0.01%
==========================================
Files 336 336
Lines 13065 13053 -12
==========================================
- Hits 12951 12939 -12
Misses 114 114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
EmsArnold
left a comment
There was a problem hiding this comment.
A few comments, but hopefully nothing too onerous. I would like to try it on test rig or similar if it hasn't been tested there yet.
| description="List of tuples (device, parameter). For independent \ | ||
| trajectories, provide '[(movable1, [start1, stop1, num1]), (movable2, \ | ||
| [start2, stop2, num2]), ... , (movableN, [startN, stopN, numN])]'." |
There was a problem hiding this comment.
Should: have an updated description
description="Sequence of Movable, float, or int. For independent \
trajectories, provide '[movable 1, start1, stop1, num1, movable2, \
start2, stop2, num2, ..., movableN, startN, stopN, numN]'."
| list[tuple[Movable, list[float | int]]], | ||
| Sequence[Movable | float | int], | ||
| Field( | ||
| description="List of tuples (device, parameter). For concurrent \ |
There was a problem hiding this comment.
Should: have an updated description
description="Sequence of Movable, float, or int. ...
| description="List of tuples (device, parameter). For independent \ | ||
| trajectories, provide '[(movable1, [start1, stop1, num1]), (movable2, \ | ||
| [start2, stop2, num2]), ... , (movableN, [startN, stopN, numN])]'." |
There was a problem hiding this comment.
Should: have an updated description
description="Sequence of Movable, float, or int. For independent \
trajectories, provide '[movable 1, start1, stop1, num1, movable2, \
start2, stop2, num2, ..., movableN, startN, stopN, numN]'."
| ], | ||
| params: Annotated[ | ||
| list[tuple[Movable, list[float | int]]], | ||
| list[Movable | list[float | int]], |
There was a problem hiding this comment.
Is there a reason for this remain a list rather than a Sequence, as the others have been swapped?
| description="List of tuples (device, positions). For concurrent \ | ||
| trajectories, provide '[(movable1, [point1, point2, ...]), (movable2, \ | ||
| [point1, point2, ...]), ... , (movableN, [point1, point2, ...])]'. Number \ | ||
| of points for each movable must be equal." |
There was a problem hiding this comment.
Should: have an updated description
description="Sequence of Movable or list containing float or int. For concurrent \
trajectories, provide '[movable 1, [point1, point2, ...], movable2, [point1, point2, ...], \
..., movableN, [point1, point2, ...]]'. Number of points for each movable must be equal."
This change aims to make the scan syntax much more user friendly. Some examples are show below:
Old syntax
New syntax
When BlueAPI supports *args, we can simplifier this even further by removing the final set of brackets:
or BlueAPI client equivalent
I've also tried to improve the tests, they now check that the scan shape is correct and checks every custom error message for scan syntax being wrong for step scans.
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}