Skip to content

724 create an ophyd device for apple 2 undulator and add i10 as a beamline#744

Merged
Relm-Arrowny merged 95 commits intomainfrom
724-create-an-ophyd-device-for-applet2-undulator
Oct 23, 2024
Merged

724 create an ophyd device for apple 2 undulator and add i10 as a beamline#744
Relm-Arrowny merged 95 commits intomainfrom
724-create-an-ophyd-device-for-applet2-undulator

Conversation

@Relm-Arrowny
Copy link
Contributor

@Relm-Arrowny Relm-Arrowny commented Aug 12, 2024

Fixes #724

Instructions to reviewer on how to test:

  1. Confirm connection.
  2. Confirm test pass.

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 Aug 12, 2024 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.58%. Comparing base (52848b3) to head (6a56151).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #744      +/-   ##
==========================================
+ Coverage   95.20%   95.58%   +0.38%     
==========================================
  Files         120      125       +5     
  Lines        4984     5419     +435     
==========================================
+ Hits         4745     5180     +435     
  Misses        239      239              

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

@Relm-Arrowny Relm-Arrowny self-assigned this Aug 16, 2024
@Relm-Arrowny Relm-Arrowny marked this pull request as ready for review August 22, 2024 11:31
Copy link
Contributor

@stan-dot stan-dot left a comment

Choose a reason for hiding this comment

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

requests for clarity in some places

Copy link
Contributor

@stan-dot stan-dot left a comment

Choose a reason for hiding this comment

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

some typos

@stan-dot
Copy link
Contributor

overage XML written to file cov.xml
=========================== short test summary info ============================
FAILED tests/devices/unit_tests/test_apple2_undulator.py::test_gap_time_out_error - asyncio.exceptions.TimeoutError: mock_id_gap-gate didn't match <UndulatorGateStatus.close: 'Closed'> in 1.002s, last value <UndulatorGateStatus.open: 'Open'>
FAILED tests/devices/unit_tests/test_apple2_undulator.py::test_phase_time_out_error - asyncio.exceptions.TimeoutError: mock_phaseAxes-gate didn't match <UndulatorGateStatus.close: 'Closed'> in 1.0s, last value <UndulatorGateStatus.open: 'Open'>
FAILED tests/devices/unit_tests/test_apple2_undulator.py::test_jaw_phase_time_out_error - asyncio.exceptions.TimeoutError: mock_jaw_phase-gate didn't match <UndulatorGateStatus.close: 'Closed'> in 1.0s, last value <UndulatorGateStatus.open: 'Open'>
=========== 3 failed, 724 passed, 3 skipped, 30 deselected in 51.05s ===========
ERROR: InvocationError for command /opt/hostedtoolcache/Python/3.10.15/x64/bin/pytest -m 'not s03' --cov=dodal --cov-report term --cov-report xml:cov.xml (exited with code 1)

very odd failing test, just in python3.10.

also rebasing does not work

@Relm-Arrowny
Copy link
Contributor Author

overage XML written to file cov.xml
=========================== short test summary info ============================
FAILED tests/devices/unit_tests/test_apple2_undulator.py::test_gap_time_out_error - asyncio.exceptions.TimeoutError: mock_id_gap-gate didn't match <UndulatorGateStatus.close: 'Closed'> in 1.002s, last value <UndulatorGateStatus.open: 'Open'>
FAILED tests/devices/unit_tests/test_apple2_undulator.py::test_phase_time_out_error - asyncio.exceptions.TimeoutError: mock_phaseAxes-gate didn't match <UndulatorGateStatus.close: 'Closed'> in 1.0s, last value <UndulatorGateStatus.open: 'Open'>
FAILED tests/devices/unit_tests/test_apple2_undulator.py::test_jaw_phase_time_out_error - asyncio.exceptions.TimeoutError: mock_jaw_phase-gate didn't match <UndulatorGateStatus.close: 'Closed'> in 1.0s, last value <UndulatorGateStatus.open: 'Open'>
=========== 3 failed, 724 passed, 3 skipped, 30 deselected in 51.05s ===========
ERROR: InvocationError for command /opt/hostedtoolcache/Python/3.10.15/x64/bin/pytest -m 'not s03' --cov=dodal --cov-report term --cov-report xml:cov.xml (exited with code 1)

very odd failing test, just in python3.10.

also rebasing does not work

This was cause by this python/cpython#86579 but the strange thing for me is, the test should have never passed before.

Copy link
Contributor

@stan-dot stan-dot left a comment

Choose a reason for hiding this comment

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

small changes to typing

def __init__(
self,
prefix: str,
grating: type[Enum],
Copy link
Contributor

Choose a reason for hiding this comment

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

could: replace with a direct reference to I10Grating class? later on could be added or OtherGrating ?

@Relm-Arrowny Relm-Arrowny requested a review from stan-dot October 23, 2024 13:43
Copy link
Contributor

@stan-dot stan-dot left a comment

Choose a reason for hiding this comment

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

LGTM

@Relm-Arrowny Relm-Arrowny merged commit e673dbf into main Oct 23, 2024
@Relm-Arrowny Relm-Arrowny deleted the 724-create-an-ophyd-device-for-applet2-undulator branch October 23, 2024 17:44
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.

Create an ophyd device for Applet2 undulator

4 participants