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

Added back the shutter selector to the voltmeters display. #323

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

canismarko
Copy link
Contributor

@canismarko canismarko commented Dec 7, 2024

Things to do before merging:

  • add tests
  • write docs
  • update iconfig_testing.toml
  • flake8, black, and isort
  • Test at the beamline

@canismarko canismarko force-pushed the dark_current_shutter branch from 1e7a477 to 18a004c Compare December 8, 2024 21:38
@canismarko
Copy link
Contributor Author

Ready to be tested at the beamline.

@canismarko canismarko marked this pull request as ready for review December 8, 2024 21:59
@canismarko canismarko requested a review from Cathyhjj December 17, 2024 19:39
for idx in range(self.ui.shutter_combobox.count()):
self.ui.shutter_combobox.removeItem(idx)
# Add the shutters to the shutter combobox
shutters = registry.findall("shutters", allow_none=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would like explicitly remove 'front end shutter' from the list because it happens very often that ppl accidentally choose front end shutter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that the FES should not be available.

Instead of hard-coding the name "front_end_shutter", though, I used the existing allow_close and allow_open attributes on the shutter devices. The shutter will only be present if both are not False. A corollary is that shutters without those attributes will still be allowed.

assert checkbox.isEnabled()
# Check that shutters were added to the combobox
combobox_items = [combobox.itemText(idx) for idx in range(combobox.count())]
assert "front_end_shutter" in combobox_items
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we decided to remove front end shutter, the test should be modified too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@canismarko canismarko requested a review from Cathyhjj December 19, 2024 18:50
@canismarko canismarko merged commit d40fc30 into main Dec 20, 2024
1 check passed
@canismarko canismarko deleted the dark_current_shutter branch December 20, 2024 18:35
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