Skip to content

1495 make apple2 and pgm start flying in sync#1496

Merged
Relm-Arrowny merged 26 commits into1480-make-apple2-preparable-and-flyablefrom
1495-make-apple2-and-pgm-start-flying-in-sync
Jan 8, 2026
Merged

1495 make apple2 and pgm start flying in sync#1496
Relm-Arrowny merged 26 commits into1480-make-apple2-preparable-and-flyablefrom
1495-make-apple2-and-pgm-start-flying-in-sync

Conversation

@Relm-Arrowny
Copy link
Copy Markdown
Contributor

@Relm-Arrowny Relm-Arrowny commented Sep 1, 2025

Fixes #1495
Last part of #1467

  • Added preparable and flyable to BeamEnergy.
  • Added test,

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

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}

@Relm-Arrowny Relm-Arrowny linked an issue Sep 1, 2025 that may be closed by this pull request
4 tasks
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (bddb8ed) to head (6ac4c63).
⚠️ Report is 1 commits behind head on 1480-make-apple2-preparable-and-flyable.

Additional details and impacted files
@@                           Coverage Diff                            @@
##           1480-make-apple2-preparable-and-flyable    #1496   +/-   ##
========================================================================
  Coverage                                    99.12%   99.13%           
========================================================================
  Files                                          286      286           
  Lines                                        10804    10825   +21     
========================================================================
+ Hits                                         10710    10731   +21     
  Misses                                          94       94           

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

@Relm-Arrowny Relm-Arrowny changed the base branch from main to 1480-make-apple2-preparable-and-flyable September 3, 2025 10:56
@Relm-Arrowny Relm-Arrowny marked this pull request as ready for review January 7, 2026 15:30
@Relm-Arrowny Relm-Arrowny requested a review from a team as a code owner January 7, 2026 15:30
Copy link
Copy Markdown
Contributor

@oliwenmandiamond oliwenmandiamond left a comment

Choose a reason for hiding this comment

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

Small nit / question, but other then that looks good

Comment thread src/dodal/devices/insertion_device/energy.py Outdated
@Relm-Arrowny Relm-Arrowny merged commit f032e03 into 1480-make-apple2-preparable-and-flyable Jan 8, 2026
11 checks passed
@Relm-Arrowny Relm-Arrowny deleted the 1495-make-apple2-and-pgm-start-flying-in-sync branch January 8, 2026 12:47
Relm-Arrowny added a commit that referenced this pull request Jan 28, 2026
* Make id_gap flyable

* add Flyable to UndulatorGap

* add successful test for prepare

* clean up and add logs

* correct pv

* first hack at motorise undulator

* add test plus docstring

* reduce double checking

* reordering

* remove tests

* remove motor limit test

* add typing

* correct velocity

* simply stop e.g. just remove it rather have it as soft signal.

* group functions into UndulartorBase

* make set wait

* rename mover to motor for gap

* add prepare, kickoff and complete to apple2

* correct spelling

* add typing to set_move

* remove infix in undulatorPhaseMotor

* remove logger fixture

* change Id motors to use Motor user_setpoint

* fix lint

* remove DEFAULT_MOTOR_MIN_TIMEOUT

* revert velocity back to correct pv.

* fixes type change in test

* remove _set_pol_setpoint

* typing

* combine apple2vals

* overriding user_setpoint in motor in order to get the correct behavior.

* correct fat finger

* fix typing in test

* fix lint

* Added test for the new structure

* fix test name

* change apple2 values to float

* make gap into unstoppable motor

* make phase motor

* add test for unstoppable motor

* fix dodal updates

* Better naming

* correct docstring

* correction docstring

* use partial and add decimal on test parameter instead of casting

* missed the zeros

* change trying to stop into warning

* split code into files

* add log and split out polarisation

* rename id_enum to enum to be inline with convention

* missed one

* change id_enum to enum again

* tiddy up enums

* remove fat finger

* split controller test out

* add stand alone test for energy and polarisation

* update docstring

* move fixture to conftest

* fix import to full path

* fix yet an other path

* add prepare to Insertion energy

* remove empty space

* move re test in the right place

* 1495 make apple2 and pgm start flying in sync (#1496)

* Move EnergySetter to apple2

* fix link

* update to main

* Correction on EnergySetter

* change name of apple2 typing

* add flyable and prepareable to energysetter

* fix enum

* correct test

* add type ignore for mock

* fix the final flyable

* make beam energy flyable

* fix test mock naming

* correct energy_motor_cioverter side_effect

* revert

* Move super() call to the end of the constructor

* fix lint

* Update src/dodal/devices/insertion_device/energy.py

Co-authored-by: oliwenmandiamond <136330507+oliwenmandiamond@users.noreply.github.com>

---------

Co-authored-by: oliwenmandiamond <136330507+oliwenmandiamond@users.noreply.github.com>
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.

Make apple2 and PGM start flying in sync.

2 participants