Skip to content

846 device factory support for ophyd v1#984

Merged
rtuck99 merged 11 commits intomainfrom
846_device_factory_support_for_ophyd_v1
Jan 30, 2025
Merged

846 device factory support for ophyd v1#984
rtuck99 merged 11 commits intomainfrom
846_device_factory_support_for_ophyd_v1

Conversation

@rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Jan 13, 2025

Fixes #846

Builds on top of and was previously part of

This PR adds support for Ophyd v1 to the device_factory, and migrates the i03 eiger, s4_slit_gaps and flux devices to the device_factory

See also mx-bluesky PR

Instructions to reviewer on how to test:

  1. dodal connect i03 works
  2. Tests 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}

@rtuck99 rtuck99 requested a review from a team as a code owner January 13, 2025 13:52
@codecov
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.59%. Comparing base (91de68e) to head (709df01).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
+ Coverage   97.57%   97.59%   +0.01%     
==========================================
  Files         154      154              
  Lines        6445     6448       +3     
==========================================
+ Hits         6289     6293       +4     
+ Misses        156      155       -1     

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



class DeviceInitializationController(Generic[D]):
class DeviceInitializationController(Generic[T]):
Copy link
Contributor

Choose a reason for hiding this comment

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

Does D have any other uses? If not it should be deleted

if is_v2_device:
device: T = self._factory(**kwargs)
else:
device: T = self._factory(mock=is_mock, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have tests that cover this and the other else parts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tests added

Copy link
Contributor

@callumforrester callumforrester left a comment

Choose a reason for hiding this comment

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

LGTM

@rtuck99 rtuck99 force-pushed the 846_update_mx_beamlines_to_use_device_factory branch 3 times, most recently from d6fa71e to e52f976 Compare January 28, 2025 17:46
@rtuck99 rtuck99 force-pushed the 846_device_factory_support_for_ophyd_v1 branch from 333ec5b to 69a37be Compare January 29, 2025 10:31
Base automatically changed from 846_update_mx_beamlines_to_use_device_factory to main January 29, 2025 15:18
@rtuck99 rtuck99 force-pushed the 846_device_factory_support_for_ophyd_v1 branch from 69a37be to 1b12cef Compare January 29, 2025 16:27
@rtuck99 rtuck99 force-pushed the 846_device_factory_support_for_ophyd_v1 branch from 1b12cef to 709df01 Compare January 29, 2025 16:34
@rtuck99 rtuck99 merged commit 4abd5c7 into main Jan 30, 2025
19 checks passed
@rtuck99 rtuck99 deleted the 846_device_factory_support_for_ophyd_v1 branch January 30, 2025 10:08
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.

Update MX beamlines to use new device factory

2 participants