Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Unstage detector if there is an issue in grid detection#772

Merged
DominicOram merged 2 commits into
mainfrom
765_disarm_if_grid_detection_fails
Jul 6, 2023
Merged

Unstage detector if there is an issue in grid detection#772
DominicOram merged 2 commits into
mainfrom
765_disarm_if_grid_detection_fails

Conversation

@DominicOram

Copy link
Copy Markdown
Collaborator

Fixes #765

To test:

  1. Confirm unit tests pass

@DominicOram
DominicOram requested a review from noemifrisina June 30, 2023 15:49
@codecov

codecov Bot commented Jun 30, 2023

Copy link
Copy Markdown

Codecov Report

Merging #772 (0b44833) into main (6b3f53a) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #772      +/-   ##
==========================================
- Coverage   93.26%   93.25%   -0.01%     
==========================================
  Files          37       37              
  Lines        1855     1854       -1     
==========================================
- Hits         1730     1729       -1     
  Misses        125      125              
Impacted Files Coverage Δ
src/artemis/device_setup_plans/setup_oav.py 97.29% <100.00%> (-0.14%) ⬇️
src/artemis/experiment_plans/full_grid_scan.py 100.00% <100.00%> (ø)
...rtemis/experiment_plans/oav_grid_detection_plan.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

)

# Check detector was armed
eiger.do_arm.set.assert_called_once_with(1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the exception was raised before the detector was armed as this fails with an AssertionError becauseset is never called.

 FAILED src/artemis/experiment_plans/tests/test_full_grid_scan_plan.py::test_grid_detection_running_when_exception_raised_then_eiger_unstaged - AssertionError: Expected 'set' to be called once. Called 0 times.

@DominicOram
DominicOram requested a review from noemifrisina July 6, 2023 08:56
@DominicOram

Copy link
Copy Markdown
Collaborator Author

Works on my machine and in CI, could be dodal version? Can you check you're on at least https://github.com/DiamondLightSource/python-dodal.git@3106d1f2e4f97bde92720d115c8fbb827ad374b1 in dodal?

@noemifrisina noemifrisina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, sorry, turns out it was the dodal version. I was on main before that commit was merged. All good now.

@DominicOram
DominicOram merged commit 0b83859 into main Jul 6, 2023
@DominicOram
DominicOram deleted the 765_disarm_if_grid_detection_fails branch July 6, 2023 10:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disarm detector if there is an issue in grid detection

2 participants