Skip to content

Conversation

@oliwenmandiamond
Copy link
Contributor

@oliwenmandiamond oliwenmandiamond commented Dec 17, 2025

Fixes #1615

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (3fe8680) to head (e746994).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1795   +/-   ##
=======================================
  Coverage   99.12%   99.13%           
=======================================
  Files         286      287    +1     
  Lines       10786    10862   +76     
=======================================
+ Hits        10692    10768   +76     
  Misses         94       94           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oliwenmandiamond oliwenmandiamond marked this pull request as ready for review January 5, 2026 10:44
@oliwenmandiamond oliwenmandiamond requested a review from a team as a code owner January 5, 2026 10:44
Copy link
Contributor

@Relm-Arrowny Relm-Arrowny left a comment

Choose a reason for hiding this comment

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

looks good to me, I have some comments/questions consider them all nits. Going through the code, I have a feeling the the shutter are not really fast shutter as they are open for a prolong period of time, for me fast shutter are those open only when the detector is ready and close as soon as detector is finish, but it probably a dissuasion for an other issue.

Comment on lines +58 to +60
# Should this be moved to a VGScientController only?
if self.shutter is not None:
await self.shutter.set(self.shutter.close_state)
Copy link
Contributor

Choose a reason for hiding this comment

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

I vote for yes, consider not every sub class has it than it is not base.

Comment on lines +73 to +75
if self.shutter is not None:
await self.shutter.set(self.shutter.open_state)

Copy link
Contributor

Choose a reason for hiding this comment

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

Question, is this want you want? Do you want to open the shutter during arm?

Comment on lines +125 to +129
def _validate_shutter_states(self, state1: EnumTypesT, state2: EnumTypesT) -> None:
if state1 is not state2:
raise ValueError(
f"{state1} is not same value as {state2}. They must be the same to be compatible."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really necessary, as long as they are GenericFastShutter They can only have two state open or close, does the underlining enum really needed to match?

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.

GenericShutter is added to AbstractEnergySource, EnergySource and DualEnergySource devices

3 participants