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

805 move p99 detectors into dodal #807

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Relm-Arrowny
Copy link
Contributor

Fixes #805

Instructions to reviewer on how to test:

  1. Run unit test
  2. Confirm connections.

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}

@Relm-Arrowny Relm-Arrowny linked an issue Sep 25, 2024 that may be closed by this pull request
3 tasks
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (73cbfc9) to head (1f19633).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #807      +/-   ##
==========================================
+ Coverage   95.12%   95.21%   +0.08%     
==========================================
  Files         120      124       +4     
  Lines        4901     4993      +92     
==========================================
+ Hits         4662     4754      +92     
  Misses        239      239              

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

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.

Some comments in code. Additionally, I would recommend more tests that are smaller and more descriptive. For example:

  • test_get_deadtime_returns_expected <- just test deadtime
  • test_given_trigger_number_of_0_then_number_of_images_set_to_max
  • test_given_no_live_time_then_esposure_time_not_set
    The advantage of this is it very clearly lays out what is expected of the device and if one of them fail in the future it should be obvious to someone what went wrong. In general I would expect a device like this to have maybe a dozen small tests like this.

src/dodal/devices/areadetector/andor2.py Outdated Show resolved Hide resolved
src/dodal/beamlines/p99.py Show resolved Hide resolved
tests/devices/unit_tests/areadetector/test_andor2.py Outdated Show resolved Hide resolved
src/dodal/devices/areadetector/andor2_epics/andor2_io.py Outdated Show resolved Hide resolved
tests/devices/unit_tests/areadetector/test_andor2.py Outdated Show resolved Hide resolved
@Relm-Arrowny Relm-Arrowny self-assigned this Oct 8, 2024
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.

Move p99 detectors into doal
3 participants