Skip to content
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

Make it clear to a user that we're skipping collections after blank XRC #814

Merged
merged 10 commits into from
Feb 13, 2025

Conversation

shihab-dls
Copy link
Collaborator

Fixes issue #784
Added the hotfix @DominicOram wrote in the beamline deployment, and a unit test to test the ispyb callback stop event.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.94%. Comparing base (2ff4607) to head (a91d86f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #814   +/-   ##
=======================================
  Coverage   86.94%   86.94%           
=======================================
  Files         102      102           
  Lines        6968     6972    +4     
=======================================
+ Hits         6058     6062    +4     
  Misses        910      910           
Components Coverage Δ
i24 SSX 72.84% <ø> (ø)
hyperion 96.33% <ø> (ø)
other 96.62% <100.00%> (+<0.01%) ⬆️

@shihab-dls
Copy link
Collaborator Author

I assigned the conftest runstop event test_gridscan3d_stop_document_with_crystal_exception the values:
"time": 1666604299.6149616
"uid": "65b2bde5-5740-42d7-9047-e860e06fbe15"
arbitrarily, as they are required; I think this is fine, but commenting just in case it is not.

Copy link
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test. As discussed, I think there's a cleaner solution

Comment on lines 284 to 285
reason = doc.get("reason") or ""
if "CrystalNotFoundException" in reason:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: As discussed, checking strings is bad, we can use type_and_message_from_reason here I think

@DominicOram
Copy link
Contributor

I assigned the conftest runstop event test_gridscan3d_stop_document_with_crystal_exception the values: "time": 1666604299.6149616 "uid": "65b2bde5-5740-42d7-9047-e860e06fbe15" arbitrarily, as they are required; I think this is fine, but commenting just in case it is not.

Yep, this is fine, thanks!

Copy link
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Much cleaner than my hotfix. Optional change, take it or leave it.

@shihab-dls shihab-dls merged commit 788b3fe into main Feb 13, 2025
22 checks passed
@shihab-dls shihab-dls deleted the 784_alert_user_xrc_sample_skipping branch February 13, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants