-
Notifications
You must be signed in to change notification settings - Fork 2
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
Trigger Zocalo and turn on feedback after all collections in MSP #850
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #850 +/- ##
=======================================
Coverage 87.33% 87.33%
=======================================
Files 104 104
Lines 6995 6997 +2
=======================================
+ Hits 6109 6111 +2
Misses 886 886
|
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.
Looks good, thanks. My 'requested changes' comment are the ones regarding the docs, other ones are optional
def start_dict(plan_name: str = "test_plan_name", env: str = "test_env"): | ||
return {CONST.TRIGGER.ZOCALO: plan_name, "zocalo_environment": env} | ||
|
||
|
||
class TestZocaloHandler: | ||
def _setup_handler(self): | ||
zocalo_handler = ZocaloCallback("test_plan_name", "test_env") | ||
return zocalo_handler | ||
|
||
def test_handler_doesnt_trigger_on_wrong_plan(self): |
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.
I think we need an assert here now
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.
Or we can probably remove this test entirely in favour of test_zocalo_start_and_end_not_triggered_if_ispyb_ids_not_present
"mx_bluesky.common.external_interaction.callbacks.common.zocalo_callback.ZocaloTrigger", | ||
autospec=True, | ||
) | ||
def test_handler_raises_on_the_end_of_a_plan_with_no_depositions( |
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.
Could: Add some tests which assert this exception if the document's scan_points
or ispyb_dcids
aren't in a correct form
Co-authored-by: olliesilvester <122091460+olliesilvester@users.noreply.github.com>
Co-authored-by: olliesilvester <122091460+olliesilvester@users.noreply.github.com>
Fixes #826 and fixes #848
Note, this is probably a breaking change for single rotation scans but given #847 I think that's ok.
Instructions to reviewer on how to test:
Checks for reviewer