Repository navigation
Tighten up I19 Attenuator related definitions - #2125
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2125 +/- ##
=======================================
Coverage 99.15% 99.15%
=======================================
Files 353 353
Lines 13793 13794 +1
=======================================
+ Hits 13677 13678 +1
Misses 116 116 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CoePaul
force-pushed
the
dodal2123_a
branch
2 times, most recently
from
July 21, 2026 10:34
50df20e to
b4bf6d0
Compare
Contributes to #2123 * Rename the attenuator motor position dataclass to make it clear it can be used for more than just setting demands * Fix associated test which was brittle on the class name * Replace looser PositiveInt type ( which coerces ) with the stricter Annotated StrictInt type for wheel index positions * Adjust tests of Attenuator positions to catch up with these changes -- widen tests of invalid definitions using parametized testing
rtuck99
approved these changes
Jul 21, 2026
rtuck99
left a comment
Contributor
There was a problem hiding this comment.
Looks fine, I don't have particular opinons other than it feels like set() should call model_dump() instead of validate_complete_damnd() otherwise you're only getting half the benefit of using pydantic models. But that would require a change in the logic at both ends, so I'm not going to insist on it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to #2123
Rename the attenuator motor position dataclass to make it clear it can be used for more than just setting demands
Fix associated test which was brittle on the class name
Replace looser PositiveInt type ( which coerces ) with the stricter Annotated StrictInt type for wheel index positions
Adjust tests of Attenuator positions to catch up with these changes -- widen tests of invalid definitions using parametized testing
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}