Skip to content

feat: Register child devices as top level devices - #1739

Open
Alexj9837 wants to merge 5 commits into
mainfrom
register-child-devices-on-top
Open

Alexj9837 wants to merge 5 commits into
mainfrom
register-child-devices-on-top

Conversation

@Alexj9837

@Alexj9837 Alexj9837 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1724

Registering an ophyd-async device now also registers its children, including signals, under their own names at any depth (stage also gives stage-x, stage-x-velocity etc). Dotted access still works. Ophyd v1 devices are left alone.

Name clashes:

  • A child named after its parent, like a motor's readback, is registered as <parent>-<attribute> (motor-user_readback). /devices reports each device under its registered name so the two don't both show up as motor
  • If an unrelated device already has the name, e.g. something registered as stage-x before stage, then stage.x and its children are skipped with a warning, rather than adding a stage-x-position that looks like it belongs to the wrong device

Things to note:

  • /devices and the plan schemas get a lot bigger (adsim goes from 2 to 119 devices), and low level signals like setpoints now show up as plan argument options, hence the system test JSON diff. This needs a follow up ticket.
  • DeviceVector items can now be used by name (bank-axes-1). The dotted form (bank.axes.1) still doesn't work, as before
  • Tests that register Mock(spec=Device) will now fail, use a real Device

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1739      +/-   ##
==========================================
+ Coverage   96.46%   96.48%   +0.01%     
==========================================
  Files          49       49              
  Lines        3791     3811      +20     
==========================================
+ Hits         3657     3677      +20     
  Misses        134      134              

☔ 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.

@Alexj9837
Alexj9837 force-pushed the register-child-devices-on-top branch from b4975f8 to e7797e3 Compare November 3, 2026 08:35
@Alexj9837
Alexj9837 force-pushed the register-child-devices-on-top branch from e7797e3 to 396a673 Compare November 3, 2026 08:36
@Alexj9837
Alexj9837 force-pushed the register-child-devices-on-top branch from 9fd0086 to 8ee7db7 Compare November 3, 2026 09:10
@Alexj9837
Alexj9837 marked this pull request as ready for review November 3, 2026 15:12
@Alexj9837
Alexj9837 requested a review from a team as a code owner November 3, 2026 15:12
@Alexj9837 Alexj9837 assigned Alexj9837 and unassigned Alexj9837 Nov 3, 2026

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.

Register child devices as top level devices

1 participant