Skip to content

Associate a sample changing robot device with i24 - #2185

Open
ndevenish wants to merge 3 commits into
DiamondLightSource:mainfrom
ndevenish:i24_sample
Open

ndevenish wants to merge 3 commits into
DiamondLightSource:mainfrom
ndevenish:i24_sample

Conversation

@ndevenish

Copy link
Copy Markdown
Contributor

It's PVs are the standard BART ones, and it is the only thing that knows which sample is mounted.

Instructions to reviewer on how to test:

With access to I24 PV:

import bluesky.plan_stubs as bps
from bluesky.run_engine import RunEngine

from dodal.beamlines.i24 import robot

RE = RunEngine()
device = robot.build(connect_immediately=True)


def dump_robot():
  reading = yield from bps.read(device)
  for name, value in reading.items():
      print(f"{name:<32} {value['value']!r}")

  for signal in (device.sample_id, device.program_name, device.program_running):
      print(f"{signal.name:<32} {(yield from bps.rd(signal))!r}")


RE(dump_robot())

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}. Yes, but fails for outside reasons (Trying to read :PVI on jungfrau CAM).

Its PVs are the standard BART ones, and it is the only thing that knows
which sample is mounted.
@ndevenish
ndevenish requested a review from a team as a code owner August 24, 2026 11:28
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.19%. Comparing base (3922223) to head (15c6633).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2185   +/-   ##
=======================================
  Coverage   99.19%   99.19%           
=======================================
  Files         367      367           
  Lines       14596    14600    +4     
=======================================
+ Hits        14479    14483    +4     
  Misses        117      117           

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

@oliwenmandiamond oliwenmandiamond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, robot connects using dodal connect i24

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.

2 participants