Refactor wrapped scan plans so they more user friendly - #2050
Refactor wrapped scan plans so they more user friendly#2050oliwenmandiamond wants to merge 15 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.19% 99.33% +0.14%
==========================================
Files 367 367
Lines 14598 14367 -231
==========================================
- Hits 14481 14272 -209
+ Misses 117 95 -22 ☔ View full report in Codecov by Harness. 🚀 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."
…/DiamondLightSource/dodal into refactor_scans_so_they_are_flatter
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}