Merged
Conversation
1 task
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1144 +/- ##
==========================================
+ Coverage 97.72% 97.75% +0.03%
==========================================
Files 171 172 +1
Lines 6848 6859 +11
==========================================
+ Hits 6692 6705 +13
+ Misses 156 154 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1 task
rtuck99
reviewed
Mar 27, 2025
| @@ -0,0 +1,17 @@ | |||
| from typing import Annotated as A | |||
|
|
|||
Contributor
There was a problem hiding this comment.
Is it a deliberate decision not to include this in the beamline i03.py?
Contributor
Author
There was a problem hiding this comment.
It doesn't yet exist on the beamline but I will add it in with an appropriate skip I think
noemifrisina
approved these changes
Mar 31, 2025
oliwenmandiamond
pushed a commit
that referenced
this pull request
Apr 7, 2025
* Add baton device * Add baton to i03 * Add smoke tests for baton
oliwenmandiamond
added a commit
that referenced
this pull request
Apr 7, 2025
* Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Remove reference to Abstract regions from analyser as logic moved to plan * Adding reading analyser devices to tests * Fix linitng issue * Update oav pv on i19-1 (#1146) * Ban time.sleep, exempting tests (#1134) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Update to latest ophyd async (#1143) * Fix import errors * Fix tests * Remove ophyd-async pin * Skip broken test * Fix types for amplifiers * Fix minor typing issue * Use Motor types in motor_utils * Add beamstop to I19 (#1071) * Add i19 beamstop device# * Fix PV names and add bevice to i19-2 * Add beamstop to i19-1 (won't connect yet) * Comment out instantiation in i19-1 and add link to issue * Add small test * Skip beamstop in 19-1 * Add baton device (#1144) * Add baton device * Add baton to i03 * Add smoke tests for baton * Add XYZ positioner as sample stage to ViSR (#1127) * add xyz positioner * remove the unneeded path provider for xyz positioner * rename to sample stage at visr * sort imports * Implement a new access controlled shutter for i19 (#1135) * A start * Start adding REST call * Small note on order of things * Fill in some blanks * Run pre-commits * This should be working * Run pre-commits * Tidy up, add docstring and instantiate in beamlines * Make pre commits happy * Remove old shutter and tests * Forgot an async * Add read method and test * Maybe add the file * Fix dumb mistake * Run pre-commits, again * Maybe it can be simplified * Add a test for exception * Make ruff happy * Add comment * Comment out failing test * Add test * Add a couple of tests * Remove tests for old shutter and rename file * Update commet * Update device to use new wrapper * Remove hutch invalid option as logic now moved to i19-bluesky * Get dodal connect to work for i19-1 and link issue * Fix docstrings * Update src/dodal/devices/i19/shutter.py Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Remove read * Reword comment * Pull device name for hutch control into constant * Change log level --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Get fixes from beamline testing and fix unit tests (#1160) * Removed all references to EpicsMotor, replacing with Motor where appropriate. (#1158) Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> Co-authored-by: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Co-authored-by: Jacob Williamson <jacob.williamson@diamond.ac.uk> Co-authored-by: Stanisław Malinowski <56644812+stan-dot@users.noreply.github.com> Co-authored-by: Tamoor <tamoor_shahid@hotmail.com> Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk>
oliwenmandiamond
pushed a commit
that referenced
this pull request
Apr 7, 2025
* Add baton device * Add baton to i03 * Add smoke tests for baton
oliwenmandiamond
added a commit
that referenced
this pull request
Apr 7, 2025
* Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Remove reference to Abstract regions from analyser as logic moved to plan * Adding reading analyser devices to tests * Fix linitng issue * Update oav pv on i19-1 (#1146) * Ban time.sleep, exempting tests (#1134) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Update to latest ophyd async (#1143) * Fix import errors * Fix tests * Remove ophyd-async pin * Skip broken test * Fix types for amplifiers * Fix minor typing issue * Use Motor types in motor_utils * Add beamstop to I19 (#1071) * Add i19 beamstop device# * Fix PV names and add bevice to i19-2 * Add beamstop to i19-1 (won't connect yet) * Comment out instantiation in i19-1 and add link to issue * Add small test * Skip beamstop in 19-1 * Add baton device (#1144) * Add baton device * Add baton to i03 * Add smoke tests for baton * Add XYZ positioner as sample stage to ViSR (#1127) * add xyz positioner * remove the unneeded path provider for xyz positioner * rename to sample stage at visr * sort imports * Implement a new access controlled shutter for i19 (#1135) * A start * Start adding REST call * Small note on order of things * Fill in some blanks * Run pre-commits * This should be working * Run pre-commits * Tidy up, add docstring and instantiate in beamlines * Make pre commits happy * Remove old shutter and tests * Forgot an async * Add read method and test * Maybe add the file * Fix dumb mistake * Run pre-commits, again * Maybe it can be simplified * Add a test for exception * Make ruff happy * Add comment * Comment out failing test * Add test * Add a couple of tests * Remove tests for old shutter and rename file * Update commet * Update device to use new wrapper * Remove hutch invalid option as logic now moved to i19-bluesky * Get dodal connect to work for i19-1 and link issue * Fix docstrings * Update src/dodal/devices/i19/shutter.py Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Remove read * Reword comment * Pull device name for hutch control into constant * Change log level --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Get fixes from beamline testing and fix unit tests (#1160) * Removed all references to EpicsMotor, replacing with Motor where appropriate. (#1158) Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> Co-authored-by: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Co-authored-by: Jacob Williamson <jacob.williamson@diamond.ac.uk> Co-authored-by: Stanisław Malinowski <56644812+stan-dot@users.noreply.github.com> Co-authored-by: Tamoor <tamoor_shahid@hotmail.com> Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk>
oliwenmandiamond
added a commit
that referenced
this pull request
May 1, 2025
* Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Added analyser_controller to i09, i09-1, p60, b07, b07-1 * Added generic data that can be read * Remove reference to Abstract regions from analyser as logic moved to plan * Add energy and angle axis to specs * switched round arguments for energy conversion functions * Remove reference to Abstract regions from analyser as logic moved to plan * Added generic data that can be read * Adding reading analyser devices to tests * Adding reading analyser devices to tests * Added generic data that can be read * Add energy and angle axis to specs * Added MsgGenerator to analyser plans * Added binding energy axis * Made energy_axis and angle_axis signals inside abstract controller * Added AdBaseIO to abstract analyser class * Renamed controllers to be driver io * Renamed analyser_controller for beamlines to analyser_driver * Fix liniting issues * Renamed analyser controller to driver io * Update oav pv on i19-1 (#1146) * Ban time.sleep, exempting tests (#1134) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Update to latest ophyd async (#1143) * Fix import errors * Fix tests * Remove ophyd-async pin * Skip broken test * Fix types for amplifiers * Fix minor typing issue * Use Motor types in motor_utils * Add beamstop to I19 (#1071) * Add i19 beamstop device# * Fix PV names and add bevice to i19-2 * Add beamstop to i19-1 (won't connect yet) * Comment out instantiation in i19-1 and add link to issue * Add small test * Skip beamstop in 19-1 * Add baton device (#1144) * Add baton device * Add baton to i03 * Add smoke tests for baton * Add XYZ positioner as sample stage to ViSR (#1127) * add xyz positioner * remove the unneeded path provider for xyz positioner * rename to sample stage at visr * sort imports * Implement a new access controlled shutter for i19 (#1135) * A start * Start adding REST call * Small note on order of things * Fill in some blanks * Run pre-commits * This should be working * Run pre-commits * Tidy up, add docstring and instantiate in beamlines * Make pre commits happy * Remove old shutter and tests * Forgot an async * Add read method and test * Maybe add the file * Fix dumb mistake * Run pre-commits, again * Maybe it can be simplified * Add a test for exception * Make ruff happy * Add comment * Comment out failing test * Add test * Add a couple of tests * Remove tests for old shutter and rename file * Update commet * Update device to use new wrapper * Remove hutch invalid option as logic now moved to i19-bluesky * Get dodal connect to work for i19-1 and link issue * Fix docstrings * Update src/dodal/devices/i19/shutter.py Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Remove read * Reword comment * Pull device name for hutch control into constant * Change log level --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Get fixes from beamline testing and fix unit tests (#1160) * Removed all references to EpicsMotor, replacing with Motor where appropriate. (#1158) Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Add analyser classes (#1125) * Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Remove reference to Abstract regions from analyser as logic moved to plan * Adding reading analyser devices to tests * Fix linitng issue * Update oav pv on i19-1 (#1146) * Ban time.sleep, exempting tests (#1134) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Update to latest ophyd async (#1143) * Fix import errors * Fix tests * Remove ophyd-async pin * Skip broken test * Fix types for amplifiers * Fix minor typing issue * Use Motor types in motor_utils * Add beamstop to I19 (#1071) * Add i19 beamstop device# * Fix PV names and add bevice to i19-2 * Add beamstop to i19-1 (won't connect yet) * Comment out instantiation in i19-1 and add link to issue * Add small test * Skip beamstop in 19-1 * Add baton device (#1144) * Add baton device * Add baton to i03 * Add smoke tests for baton * Add XYZ positioner as sample stage to ViSR (#1127) * add xyz positioner * remove the unneeded path provider for xyz positioner * rename to sample stage at visr * sort imports * Implement a new access controlled shutter for i19 (#1135) * A start * Start adding REST call * Small note on order of things * Fill in some blanks * Run pre-commits * This should be working * Run pre-commits * Tidy up, add docstring and instantiate in beamlines * Make pre commits happy * Remove old shutter and tests * Forgot an async * Add read method and test * Maybe add the file * Fix dumb mistake * Run pre-commits, again * Maybe it can be simplified * Add a test for exception * Make ruff happy * Add comment * Comment out failing test * Add test * Add a couple of tests * Remove tests for old shutter and rename file * Update commet * Update device to use new wrapper * Remove hutch invalid option as logic now moved to i19-bluesky * Get dodal connect to work for i19-1 and link issue * Fix docstrings * Update src/dodal/devices/i19/shutter.py Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Remove read * Reword comment * Pull device name for hutch control into constant * Change log level --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Get fixes from beamline testing and fix unit tests (#1160) * Removed all references to EpicsMotor, replacing with Motor where appropriate. (#1158) Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> Co-authored-by: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Co-authored-by: Jacob Williamson <jacob.williamson@diamond.ac.uk> Co-authored-by: Stanisław Malinowski <56644812+stan-dot@users.noreply.github.com> Co-authored-by: Tamoor <tamoor_shahid@hotmail.com> Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> * Renamed controllers to be driver io * Fix liniting issues * Added generic data that can be read * Add energy and angle axis to specs * Added generic data that can be read * Adding reading analyser devices to tests * Added generic data that can be read * Add energy and angle axis to specs * Added binding energy axis * Made energy_axis and angle_axis signals inside abstract controller * Added AdBaseIO to abstract analyser class * Renamed analyser controller to driver io * Fix tests * Remove duplicate analyer class left over from rebase * Fixed step time pv value * Changed EnergyMode to be a StrictEnum * Correct import for ADImageMode * Corrected energy step to be in eV rather than meV * Added different pass energy type in driver as cannot be resolved in epics * Added synchrotron to relavent beamlines. Removed name from device_factory functions * Removed pass on abstract method and gave docstring * make turbo slit movable (#1126) * make turbo slit movable * respond to comments * Update turbo_slit.py - delete the unneeded set_full method * trying to write tests but it's difficult while it should be simple * fix test setup * add velocity and mock to the set * Update src/dodal/devices/turbo_slit.py - comment capitalization Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Add i23 goniometer (#1163) * Add i23 goniometer * Add max velocity to patched motor * Remove start document path provider (#1170) * Create a common base device that sends requests to blueapi on I19 optics (#1161) * Get fixes from beamline testing and fix unit tests * Start by creating a common device * Add some docstrings * Have the shutter inherit from the generic blueapi device * Fix linting * Fix imports * Fix test * Start adding local rmq for blueapi system test * Revert "Start adding local rmq for blueapi system test" This reverts commit 6128a2a. * Add polling on the server to check on plan * Update src/dodal/devices/i19/blueapi_device.py Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk> * Fix import and plans * remove comment --------- Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk> * Allow interpolation in undulator gap (#1155) * Allow interpolation in undulator gap * Fix tests and improve logging * 949 make ophyd devices for the diagonstics for i10 (#960) * test * Added Rasor diagnostics * Correct pvs * added slits drain current * Added drain current and diode detection for d5a * added test for the single shot webcam * added docsting and clean up * added missing typing * change test name * fix typo * correct pv suffix * feedback correction * change drop down to Position * add test * remove unused import * fixed connection issue * fix centroid connection issue. * fix spelling of diagnostic * add docstring to clarify why primary slits is more aperture than slits * added docstring * remove I10WebCamIODataType * fix spelling in i10 * add aptr in docstring --------- Co-authored-by: root <root@Relm> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * (mx-bluesky#719) Beam centre lookup table should support linear extrapolation (#1074) * WIP * Fix extrapolation calcs, tests * Remove redundant file parsing code * Add tests for lookup table extrapolation --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Renamed configure_controller plan to configure_driver * Added analyser_controller to i09, i09-1, p60, b07, b07-1 (#1152) * Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Added analyser_controller to i09, i09-1, p60, b07, b07-1 * Remove reference to Abstract regions from analyser as logic moved to plan * Adding reading analyser devices to tests * Renamed controllers to be driver io * Renamed analyser_controller for beamlines to analyser_driver * Added different pass energy type in driver as cannot be resolved in epics * Added synchrotron to relavent beamlines. Removed name from device_factory functions * Removed pass on abstract method and gave docstring --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Made abstract analyser class inherit from AdBaseIO * Added name, excitation_energy, energy_mode, and binding_energy_axis as signals * Added tests for new signals * Added binding energy test * Added additional comments to signals * Add plan decorator * Fixed dodal connect errors * Added classes / functions to __init__. Redone imports * Remove duplicate name from device_facotry functions * Make BaseDCM (#1111) * Create BaseDCM * Modify other DCM's to inherit from BaseDCM * Add shutter for i23 (#1169) * Update turbo_slit.py with units inside a comment (#1167) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * fix circular import issue * Revert device_factory formatting * Converted create_r_hardware_backed_soft_signals to derived_signal_r * Added tests for specs energy and angle axis * Separated out read and read_configuration signals * Swapped round if statement * Added snapshot_values to tests * Update abstract_analyser_io.py to cast intensity to native float * Update vgscienta_analyser_io.py to have better type checking on axes * Update specs_analyser_io.py type checking for axes * Moved fields that can be read per point and per scan --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> Co-authored-by: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Co-authored-by: Jacob Williamson <jacob.williamson@diamond.ac.uk> Co-authored-by: Stanisław Malinowski <56644812+stan-dot@users.noreply.github.com> Co-authored-by: Tamoor <tamoor_shahid@hotmail.com> Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Abigail Emery <abigail.emery@diamond.ac.uk> Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk> Co-authored-by: Raymond Fan <raymond.fan@diamond.ac.uk> Co-authored-by: root <root@Relm> Co-authored-by: rtuck99 <robert.tuck@diamond.ac.uk> Co-authored-by: olliesilvester <122091460+olliesilvester@users.noreply.github.com>
oliwenmandiamond
added a commit
that referenced
this pull request
May 9, 2025
* Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Added analyser_controller to i09, i09-1, p60, b07, b07-1 * Added generic data that can be read * Remove reference to Abstract regions from analyser as logic moved to plan * Add energy and angle axis to specs * switched round arguments for energy conversion functions * Remove reference to Abstract regions from analyser as logic moved to plan * Added generic data that can be read * Adding reading analyser devices to tests * Adding reading analyser devices to tests * Added generic data that can be read * Add energy and angle axis to specs * Added MsgGenerator to analyser plans * Added binding energy axis * Made energy_axis and angle_axis signals inside abstract controller * Added AdBaseIO to abstract analyser class * Renamed controllers to be driver io * Renamed analyser_controller for beamlines to analyser_driver * Fix liniting issues * Renamed analyser controller to driver io * Update oav pv on i19-1 (#1146) * Ban time.sleep, exempting tests (#1134) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Update to latest ophyd async (#1143) * Fix import errors * Fix tests * Remove ophyd-async pin * Skip broken test * Fix types for amplifiers * Fix minor typing issue * Use Motor types in motor_utils * Add beamstop to I19 (#1071) * Add i19 beamstop device# * Fix PV names and add bevice to i19-2 * Add beamstop to i19-1 (won't connect yet) * Comment out instantiation in i19-1 and add link to issue * Add small test * Skip beamstop in 19-1 * Add baton device (#1144) * Add baton device * Add baton to i03 * Add smoke tests for baton * Add XYZ positioner as sample stage to ViSR (#1127) * add xyz positioner * remove the unneeded path provider for xyz positioner * rename to sample stage at visr * sort imports * Implement a new access controlled shutter for i19 (#1135) * A start * Start adding REST call * Small note on order of things * Fill in some blanks * Run pre-commits * This should be working * Run pre-commits * Tidy up, add docstring and instantiate in beamlines * Make pre commits happy * Remove old shutter and tests * Forgot an async * Add read method and test * Maybe add the file * Fix dumb mistake * Run pre-commits, again * Maybe it can be simplified * Add a test for exception * Make ruff happy * Add comment * Comment out failing test * Add test * Add a couple of tests * Remove tests for old shutter and rename file * Update commet * Update device to use new wrapper * Remove hutch invalid option as logic now moved to i19-bluesky * Get dodal connect to work for i19-1 and link issue * Fix docstrings * Update src/dodal/devices/i19/shutter.py Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Remove read * Reword comment * Pull device name for hutch control into constant * Change log level --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Get fixes from beamline testing and fix unit tests (#1160) * Removed all references to EpicsMotor, replacing with Motor where appropriate. (#1158) Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Add analyser classes (#1125) * Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Remove reference to Abstract regions from analyser as logic moved to plan * Adding reading analyser devices to tests * Fix linitng issue * Update oav pv on i19-1 (#1146) * Ban time.sleep, exempting tests (#1134) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Update to latest ophyd async (#1143) * Fix import errors * Fix tests * Remove ophyd-async pin * Skip broken test * Fix types for amplifiers * Fix minor typing issue * Use Motor types in motor_utils * Add beamstop to I19 (#1071) * Add i19 beamstop device# * Fix PV names and add bevice to i19-2 * Add beamstop to i19-1 (won't connect yet) * Comment out instantiation in i19-1 and add link to issue * Add small test * Skip beamstop in 19-1 * Add baton device (#1144) * Add baton device * Add baton to i03 * Add smoke tests for baton * Add XYZ positioner as sample stage to ViSR (#1127) * add xyz positioner * remove the unneeded path provider for xyz positioner * rename to sample stage at visr * sort imports * Implement a new access controlled shutter for i19 (#1135) * A start * Start adding REST call * Small note on order of things * Fill in some blanks * Run pre-commits * This should be working * Run pre-commits * Tidy up, add docstring and instantiate in beamlines * Make pre commits happy * Remove old shutter and tests * Forgot an async * Add read method and test * Maybe add the file * Fix dumb mistake * Run pre-commits, again * Maybe it can be simplified * Add a test for exception * Make ruff happy * Add comment * Comment out failing test * Add test * Add a couple of tests * Remove tests for old shutter and rename file * Update commet * Update device to use new wrapper * Remove hutch invalid option as logic now moved to i19-bluesky * Get dodal connect to work for i19-1 and link issue * Fix docstrings * Update src/dodal/devices/i19/shutter.py Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Remove read * Reword comment * Pull device name for hutch control into constant * Change log level --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Get fixes from beamline testing and fix unit tests (#1160) * Removed all references to EpicsMotor, replacing with Motor where appropriate. (#1158) Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> Co-authored-by: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Co-authored-by: Jacob Williamson <jacob.williamson@diamond.ac.uk> Co-authored-by: Stanisław Malinowski <56644812+stan-dot@users.noreply.github.com> Co-authored-by: Tamoor <tamoor_shahid@hotmail.com> Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> * Renamed controllers to be driver io * Fix liniting issues * Added generic data that can be read * Add energy and angle axis to specs * Added generic data that can be read * Adding reading analyser devices to tests * Added generic data that can be read * Add energy and angle axis to specs * Added binding energy axis * Made energy_axis and angle_axis signals inside abstract controller * Added AdBaseIO to abstract analyser class * Renamed analyser controller to driver io * Fix tests * Remove duplicate analyer class left over from rebase * Fixed step time pv value * Changed EnergyMode to be a StrictEnum * Correct import for ADImageMode * Corrected energy step to be in eV rather than meV * Added different pass energy type in driver as cannot be resolved in epics * Added synchrotron to relavent beamlines. Removed name from device_factory functions * Removed pass on abstract method and gave docstring * make turbo slit movable (#1126) * make turbo slit movable * respond to comments * Update turbo_slit.py - delete the unneeded set_full method * trying to write tests but it's difficult while it should be simple * fix test setup * add velocity and mock to the set * Update src/dodal/devices/turbo_slit.py - comment capitalization Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Add i23 goniometer (#1163) * Add i23 goniometer * Add max velocity to patched motor * Remove start document path provider (#1170) * Create a common base device that sends requests to blueapi on I19 optics (#1161) * Get fixes from beamline testing and fix unit tests * Start by creating a common device * Add some docstrings * Have the shutter inherit from the generic blueapi device * Fix linting * Fix imports * Fix test * Start adding local rmq for blueapi system test * Revert "Start adding local rmq for blueapi system test" This reverts commit 6128a2a. * Add polling on the server to check on plan * Update src/dodal/devices/i19/blueapi_device.py Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk> * Fix import and plans * remove comment --------- Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk> * Allow interpolation in undulator gap (#1155) * Allow interpolation in undulator gap * Fix tests and improve logging * 949 make ophyd devices for the diagonstics for i10 (#960) * test * Added Rasor diagnostics * Correct pvs * added slits drain current * Added drain current and diode detection for d5a * added test for the single shot webcam * added docsting and clean up * added missing typing * change test name * fix typo * correct pv suffix * feedback correction * change drop down to Position * add test * remove unused import * fixed connection issue * fix centroid connection issue. * fix spelling of diagnostic * add docstring to clarify why primary slits is more aperture than slits * added docstring * remove I10WebCamIODataType * fix spelling in i10 * add aptr in docstring --------- Co-authored-by: root <root@Relm> Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * (mx-bluesky#719) Beam centre lookup table should support linear extrapolation (#1074) * WIP * Fix extrapolation calcs, tests * Remove redundant file parsing code * Add tests for lookup table extrapolation --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Renamed configure_controller plan to configure_driver * Added analyser_controller to i09, i09-1, p60, b07, b07-1 (#1152) * Add classes to read sequence files into classes * Added I09 epics analyser detector * Created generic region class to extend from. Moved setting detector logic to a plan * helper functions to load json file into a class and save * Generic electron analyser device class added along with generic region data * Added more specialised electron analyser device classes than inherit from generic base * Removed __main__ testing * Update BaseRegion text * Correct region names to be VGScienta * Create BaseSequence class that specialised classes inherit from * Make signals for devices rw rather than just w * Remove unused TypeVar * Added some basic tests for region classes * Correct PV types to stop errors on connect() * Added more in depth tests for data region classes * Removed analyser classes * Add analyser classes * Made VGScientaAnalyser compatible with bps.abs_set plan * Made SpecsAnalyser compatible with bps.abs_set plan * Corrected BaseRegion.get_enabled_regions() type * Corrected VGScientaRegion.get_excitation_energy_source_by_region() * Added basic analyser tests and common util for testing * Removed specs and vgscienta folder, more modular tests * Added helper functions to region classes and corrected typing syntax * Improved tests for region classes * Analyser code now uses region helper functions * Cleaned up code by applying commits in PR * Added VGScientaAnalyser tests * Fixed paramitised tests for analyser * Added full tests for specs * Removed duplicate classes and tests after rebase * excitation energy is a madatory arg * Refactored tests into abstract classes to reduce duplicate tests between classes * Fix for unit tests not passing * Removed unused base region class * Renamed analyser classes to analyser controllers for clarify * correct analyser test import after name change * Removed beamline implementation as will be committed in different PR * Removed I09 as will be added in different PR * Updated classes to assume region.energyStep is eV and passEnergy is str * Fixed unit tests by adding __init__.py * Removed reference to pass energy type * Corrected .gitignore to ignore Pipfile * Converted classes to use snake_case * Moved analyser logic to plans, flattened tests * Added analyser_controller to i09, i09-1, p60, b07, b07-1 * Remove reference to Abstract regions from analyser as logic moved to plan * Adding reading analyser devices to tests * Renamed controllers to be driver io * Renamed analyser_controller for beamlines to analyser_driver * Added different pass energy type in driver as cannot be resolved in epics * Added synchrotron to relavent beamlines. Removed name from device_factory functions * Removed pass on abstract method and gave docstring --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * Made abstract analyser class inherit from AdBaseIO * Added name, excitation_energy, energy_mode, and binding_energy_axis as signals * Added tests for new signals * Added binding energy test * Added additional comments to signals * Add plan decorator * Fixed dodal connect errors * Added classes / functions to __init__. Redone imports * Remove duplicate name from device_facotry functions * Make BaseDCM (#1111) * Create BaseDCM * Modify other DCM's to inherit from BaseDCM * Add shutter for i23 (#1169) * Update turbo_slit.py with units inside a comment (#1167) Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> * fix circular import issue * Revert device_factory formatting * Converted create_r_hardware_backed_soft_signals to derived_signal_r * Added tests for specs energy and angle axis * Separated out read and read_configuration signals * Swapped round if statement * Added snapshot_values to tests * Added analyser detectors, renamed _io from analysers * Added analyserscan plan * Removed list of per point and per scan values, added get_sequence method to abstract detector * Update MsgGenerator import * Changed get_signals to create_signals * Reverted formatting of create_signal functions from merge * Remove unused comments * Add detector to package * Remove analyserscan * Improve error message load_json_file_to_class * Created detector module, renamed others back to _Io.py * Remove Reference from abstract analyser * Renamed detector to abstract detector, created specialised classes * Restructured electron_analyser to be hierarchical for better module management * Restuctured and fixed tests * Added ToDo comments * Renamed tests to fit new pattern * Added additional methods to determine how driver is stored * Simplified pytest fixtures * Moved EnergyMode into types.py, added new imports * Changed load_sequence to implementation, added StandardDetector issue * Remove unsued generic Sequence from driver class * Fixed test linting issue * Adjust name for sim_driver * additional update to name of sim_detector for tests * Added test to check detectors child devices and driver parent --------- Co-authored-by: Dominic Oram <dominic.oram@diamond.ac.uk> Co-authored-by: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Co-authored-by: Jacob Williamson <jacob.williamson@diamond.ac.uk> Co-authored-by: Stanisław Malinowski <56644812+stan-dot@users.noreply.github.com> Co-authored-by: Tamoor <tamoor_shahid@hotmail.com> Co-authored-by: adaudon <odm32222@ws521.diamond.ac.uk> Co-authored-by: Abigail Emery <abigail.emery@diamond.ac.uk> Co-authored-by: Callum Forrester <callum.forrester@diamond.ac.uk> Co-authored-by: Raymond Fan <raymond.fan@diamond.ac.uk> Co-authored-by: root <root@Relm> Co-authored-by: rtuck99 <robert.tuck@diamond.ac.uk> Co-authored-by: olliesilvester <122091460+olliesilvester@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes DiamondLightSource/mx-bluesky#358
Instructions to reviewer on how to test:
mx-blueskyPRChecks for reviewer
dodal connect ${BEAMLINE}