-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redo the i18 add #1030
redo the i18 add #1030
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1030 +/- ##
==========================================
+ Coverage 97.60% 97.63% +0.03%
==========================================
Files 154 159 +5
Lines 6468 6564 +96
==========================================
+ Hits 6313 6409 +96
Misses 155 155 ☔ View full report in Codecov by Sentry. |
tests/devices/i18/test_table.py
Outdated
set_mock_value(table.x.user_readback, 1.23) | ||
set_mock_value(table.y.user_readback, 4.56) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must
set_mock_value(table.x.user_readback, 1.23) | |
set_mock_value(table.y.user_readback, 4.56) |
# Mock the initial values of the x and y signals | ||
set_mock_value(kbmirror.x, 0.0) | ||
set_mock_value(kbmirror.y, 0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should: 0 is the default value for a float signal, so this shouldn't be required.
# Mock the initial values of the x and y signals | |
set_mock_value(kbmirror.x, 0.0) | |
set_mock_value(kbmirror.y, 0.0) |
"alarm_severity": 0, | ||
"timestamp": ANY, | ||
"value": 0.0, | ||
}, | ||
"table-z": {"alarm_severity": 0, "timestamp": ANY, "value": 0.0}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"alarm_severity": 0, | |
"timestamp": ANY, | |
"value": 0.0, | |
}, | |
"table-z": {"alarm_severity": 0, "timestamp": ANY, "value": 0.0}, | |
} | |
"value": 0.0, | |
"timestamp": ANY, | |
"alarm_severity": 0, | |
}, | |
"table-z": { | |
"value": 0.0, | |
"timestamp": ANY, | |
"alarm_severity": 0, | |
}, | |
} |
nit: consistency with above
"table-theta": { | ||
"alarm_severity": 0, | ||
"timestamp": ANY, | ||
"value": 10.11, | ||
}, | ||
"table-z": {"alarm_severity": 0, "timestamp": ANY, "value": 7.89}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: make this consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the formatting of "table-z"
the same as the formatting of "table-theta"
it would seem that the set_mock_value is indeed required, the tests are failing now https://github.com/DiamondLightSource/dodal/actions/runs/13013408223/job/36296490106?pr=1030 |
You want something like this callback_on_mock_put that ensure the |
okay but its per-signal basis so do I need to make 4 of those? set_mock_value is quite low-granular |
#1031 |
what do you mean by that? |
0ab008e
to
68ffb09
Compare
@stan-dot resolving #1031 would dictate whether or not we keep the This PR is already long-standing and I do not think we need to resolve #1031 to everyone's satisfaction in order to get it merged. The discussion in there is trending towards a consensus:
As far as I can see there's no concrete use case for atomicity for any of these devices, I don't think that it streamlines the operation from the user point of view since yield from mv(mirror, XYPosition(1.0, 2.0)) Is the same as yield from mv(mirror.x, 1.0, mirror.y, 2.0) The other possibility is that you think the first example is neater/more readable. I won't comment on that except to say that it's usually more important to be consistent with the rest of the codebase than to write exactly what makes the most sense to you, since a future developer will read a broad swathe of code in dodal and will find it easiest to read consistent code. So in summary I think the quickest path to getting this merged is either removing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Fixes #709
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}