Skip to content

refactor: Wrap Devices in BlueapiDevice - #1744

Open
shree-iyengar-dls wants to merge 4 commits into
mainfrom
wrap_devices_in_blueapidevice
Open

shree-iyengar-dls wants to merge 4 commits into
mainfrom
wrap_devices_in_blueapidevice

Conversation

@shree-iyengar-dls

@shree-iyengar-dls shree-iyengar-dls commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Until #1739 gets merged, this PR wraps the devices in BlueskyContext in a BlueapiDevice dataclass. After #1739, there will be a follow up and BlueapiDevice will hold the device and the tree.

Summary of changes:

  • BlueskyContext.devices was dict[str, Device] where Device represented bluesky protocols. Now BlueskyContext.devices is a dict[str, BlueapiDevice]
  • DeviceModel remains unchanged
  • ctx.devices now holds BlueapiDevices (wrappers) instead of actual devices so when we want to access the actual device, we get it from entry.device
  • find_device unwraps the BlueapiDevice and returns a Device
  • generic_bounds and is_compatible_args functions accept normal unwrapped Devices and wrapped BlueapiDevices (had to do this to fix linting issues but not sure if its correct)

@shree-iyengar-dls
shree-iyengar-dls requested a review from a team as a code owner November 6, 2026 14:08
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.42%. Comparing base (4353ae2) to head (22fea7d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1744      +/-   ##
==========================================
- Coverage   96.46%   96.42%   -0.05%     
==========================================
  Files          49       49              
  Lines        3791     3801      +10     
==========================================
+ Hits         3657     3665       +8     
- Misses        134      136       +2     

☔ View full report in Codecov by Harness.
📢 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.

This branch has not been deployed

No deployments
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.

1 participant