Skip to content

Update to ophyd-async 0.17a4#1979

Open
gkalua wants to merge 36 commits intomainfrom
update_dodal_ophyd_async_v0.17a1
Open

Update to ophyd-async 0.17a4#1979
gkalua wants to merge 36 commits intomainfrom
update_dodal_ophyd_async_v0.17a1

Conversation

@gkalua
Copy link
Copy Markdown

@gkalua gkalua commented Mar 13, 2026

WIP

OOO until 1/4/26

@oliwenmandiamond oliwenmandiamond changed the title WIP-Updates-some-imports-and-names Update to ophyd-async 0.17a1 Apr 14, 2026
@shihab-dls
Copy link
Copy Markdown
Contributor

I'm going to make a new release of ophyd-async soon, that includes changes to OdinIO, necessary to fix some existing bugs, but also includes quality of life changes that may reduce the number of operations we do in the configure_arm_trigger_and_disarm_detector plan. Let's block this until I've released the changes, then I will pick up converting the the plan and related test.

@DominicOram
Copy link
Copy Markdown
Contributor

Where are we up to with the new release @shihab-dls? It would be really good to get this working so that we can test the new StandardDetector

@shihab-dls shihab-dls force-pushed the update_dodal_ophyd_async_v0.17a1 branch from e3b8f9f to 914c03a Compare April 28, 2026 16:45
@shihab-dls shihab-dls force-pushed the update_dodal_ophyd_async_v0.17a1 branch from 914c03a to ce542ed Compare April 28, 2026 16:48
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 97.29730% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.05%. Comparing base (d4c4ae9) to head (32e05ec).

Files with missing lines Patch % Lines
src/dodal/devices/single_trigger_detector.py 77.27% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1979      +/-   ##
==========================================
- Coverage   99.11%   99.05%   -0.07%     
==========================================
  Files         328      325       -3     
  Lines       12774    12662     -112     
==========================================
- Hits        12661    12542     -119     
- Misses        113      120       +7     

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

@shihab-dls shihab-dls marked this pull request as ready for review April 28, 2026 18:18
@shihab-dls shihab-dls requested a review from a team as a code owner April 28, 2026 18:18
@shihab-dls shihab-dls changed the title Update to ophyd-async 0.17a1 Update to ophyd-async 0.17a4 Apr 28, 2026
@shihab-dls
Copy link
Copy Markdown
Contributor

Where are we up to with the new release @shihab-dls? It would be really good to get this working so that we can test the new StandardDetector

Codecov seems wrong to me, but this PR should be ready for a review now.

…iamondLightSource/dodal into update_dodal_ophyd_async_v0.17a1
@oliwenmandiamond
Copy link
Copy Markdown
Contributor

oliwenmandiamond commented Apr 29, 2026

I've tested a bunch of beamlines dodal connects to see if this change breaks beamlines

adsim
can't test locally

b01_1
fails connect (every device a part from synchrotron)
Note: Still connection errors without this change, so not related from what I can tell

b16
passes

b21
Everything connects except

ophyd_async.core._utils.NotConnectedError: 
panda1: NotConnectedError: pva://BL21B-MO-PANDA-01:PVI
waxs: NotConnectedError: pva://BL21BPVI
saxs: NotConnectedError: pva://BL21BPVI

Note: Still fails without this change

i03
Everything connects except

ophyd_async.core._utils.NotConnectedError: 
panda: NotConnectedError: pva://BL03I-EA-PANDA-01:PVI
pin_tip_detection: NotConnectedError:
    array_data: NotConnectedError: pva://BL03I-DI-OAV-01:PVA:ARRAY
fastcs_eiger: NotConnectedError: pva://BL03IPVI

Note: still fails without this change

i11

ophyd_async.core._utils.NotConnectedError: 
mythen3: NotConnectedError:
    driver: NotConnectedError:
        detector_state: TypeError: BL11I-EA-DET-07:DET:DetectorState_RBV has choices ('Idle', 'Error', 'Waiting', 'Finished', 'Transmitting', 'Running', 'Stopped', 'Waiting', 'Initializing', 'Disconnected', 'Aborted'), but <enum 'ADState'> requested ['Idle', 'Acquire', 'Readout', 'Correct', 'Saving', 'Aborting', 'Error', 'Waiting', 'Initializing', 'Disconnected', 'Aborted'] to be strictly equal to them.

NOTE: everything passes without this change, the above us wrong and broken by this change.

i13-1
connects fine

i18

it: NotConnectedError:
    driver: NotConnectedError:
        acquire_time: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:AcquireTime_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:AcquireTime
        acquire_period: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:AcquirePeriod_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:AcquirePeriod
        num_images: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:NumImages_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:NumImages
        image_mode: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:ImageMode_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:ImageMode
        detector_state: NotConnectedError: ca://BL18I-DI-XBPM-01:DRV:DetectorState_RBV
i0: NotConnectedError:
    driver: NotConnectedError:
        acquire_time: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:AcquireTime_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:AcquireTime
        acquire_period: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:AcquirePeriod_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:AcquirePeriod
        num_images: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:NumImages_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:NumImages
        image_mode: NotConnectedError:
            read_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:ImageMode_RBV
            write_pv: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:ImageMode
        detector_state: NotConnectedError: ca://BL18I-DI-XBPM-02:DRV:DetectorState_RBV

NOTE: dodal connect passes for all devices without this change, something in this change broke it.

i19-2

ophyd_async.core._utils.NotConnectedError: 
eiger: NotConnectedError: pva://BL19IPVI
panda: NotConnectedError: pva://BL19I-EA-PANDA-01:PVI

Note: without this change, the dodal connect error is

ophyd_async.core._utils.NotConnectedError: 
panda: NotConnectedError: pva://BL19I-EA-PANDA-01:PVI
eiger: NotConnectedError:
    drv: NotConnectedError: pva://BL19I-EA-EIGER-01:PVI

i22

it: NotConnectedError:
    driver: NotConnectedError:
        acquire_time: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:AcquireTime_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:AcquireTime
        acquire_period: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:AcquirePeriod_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:AcquirePeriod
        num_images: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:NumImages_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:NumImages
        image_mode: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:ImageMode_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:ImageMode
        detector_state: NotConnectedError: ca://BL22I-EA-TTRM-02:DRV:DetectorState_RBV
...
i0: NotConnectedError:
    driver: NotConnectedError:
        acquire_time: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:AcquireTime_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:AcquireTime
        acquire_period: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:AcquirePeriod_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:AcquirePeriod
        num_images: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:NumImages_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:NumImages
        image_mode: NotConnectedError:
            read_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:ImageMode_RBV
            write_pv: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:ImageMode
        detector_state: NotConnectedError: ca://BL22I-EA-XBPM-02:DRV:DetectorState_RBV

NOTE: without this change the above connects, something in this change broke it.

i23
connects fine

i24

oav: KeyError: '1.0'
jungfrau: NotConnectedError:
    detector: NotConnectedError: pva://BL24I-EA-JFRAU-01:CAM:PVI
    odin: NotConnectedError: pva://BL24I-EA-JFRAU-01:OD:PVI

Note: different connect error without this change

commissioning_jungfrau: NotConnectedError:
    drv: NotConnectedError: pva://BL24I-EA-JFRAU-01:PVI
    _writer: NotConnectedError:
        frame_counter: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:NumCaptured
        file_name: NotConnectedError:
            read_pv: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:FileName_RBV
            write_pv: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:FileName
        file_path: NotConnectedError:
            read_pv: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:FilePath_RBV
            write_pv: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:FilePath
        writer_ready: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:Ready_RBV
        expected_frames: NotConnectedError: ca://BL24I-JUNGFRAU-META:FD:NumCapture
oav: KeyError: '1.0'

p38
Can't test locally

p45
can't test locally

p99
can't test locally

training_rig
can't test locally?

There is still some stuff to fix...

@oliwenmandiamond
Copy link
Copy Markdown
Contributor

oliwenmandiamond commented Apr 29, 2026

So in summary, changes that need to be made in ophyd-async in a new alpha release @coretl @shihab-dls from what I've spotted so far:

i18, 122
TetrammDriver has been changed to inherit from NDArrayBaseIO to ADBaseIO. This needs to be reverted.

Then for i11

mythen3: NotConnectedError:
    driver: NotConnectedError:
        detector_state: TypeError: BL11I-EA-DET-07:DET:DetectorState_RBV has choices ('Idle', 'Error', 'Waiting', 'Finished', 'Transmitting', 'Running', 'Stopped', 'Waiting', 'Initializing', 'Disconnected', 'Aborted'), but <enum 'ADState'> requested ['Idle', 'Acquire', 'Readout', 'Correct', 'Saving', 'Aborting', 'Error', 'Waiting', 'Initializing', 'Disconnected', 'Aborted'] to be strictly equal to them.

Again, this seems to be because Mythen3Driver has changed from NDArrayBaseIO to ADBaseIO. Needs to be changed back.

@oliwenmandiamond
Copy link
Copy Markdown
Contributor

So in summary, changes that need to be made in ophyd-async in a new alpha release @coretl @shihab-dls from what I've spotted so far:

i18, 122 TetrammDriver has been changed to inherit from NDArrayBaseIO to ADBaseIO. This needs to be reverted.

Then for i11

mythen3: NotConnectedError:
    driver: NotConnectedError:
        detector_state: TypeError: BL11I-EA-DET-07:DET:DetectorState_RBV has choices ('Idle', 'Error', 'Waiting', 'Finished', 'Transmitting', 'Running', 'Stopped', 'Waiting', 'Initializing', 'Disconnected', 'Aborted'), but <enum 'ADState'> requested ['Idle', 'Acquire', 'Readout', 'Correct', 'Saving', 'Aborting', 'Error', 'Waiting', 'Initializing', 'Disconnected', 'Aborted'] to be strictly equal to them.

Again, this seems to be because Mythen3Driver has changed from NDArrayBaseIO to ADBaseIO. Needs to be changed back.

Actually, this doesn't seem possible because the API of NDArrayBaseIO and ADBaseIO has changed between versions. Thoughts on how to resolve?

@DominicOram
Copy link
Copy Markdown
Contributor

I've tested a bunch of beamlines dodal connects to see if this change breaks beamlines

Thanks @oliwenmandiamond! It's expected that the PVI's cannot connect remotely as they use PVA and there is currently no PVA gateway on that allows us to read them remotely. We can test them fully by running dodal connect on the beamlines however, it is worrying that the PVI pvs now seem wrong e.g. pva://BL19I-EA-EIGER-01:PVI is obviously more correct than BL19IPVI, which I think does need looking into.

Actually, this doesn't seem possible because the API of NDArrayBaseIO and ADBaseIO has changed between versions. Thoughts on how to resolve?

I think for the tetramms we can just change it back. For i11 it looks like the enum on BL11I-EA-DET-07:DET:DetectorState_RBV doesn't match that on the latest version of ADCore, I will discuss with controls.

@EmsArnold
Copy link
Copy Markdown
Contributor

b01_1
fails connect (every device a part from synchrotron)
Note: Still connection errors without this change, so not related from what I can tell

Just checked this on the beamline, we're connecting to everything that we expect to connect to (imaging_detector is physically unplugged at the moment, and we've not been able to connect to the synchrotron for a while on the beamline - a separate issue).

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.

6 participants