Releases: bluesky/ophyd-async
v0.12
Breaking changes
Flyscanning plan stubs have been deleted
In preparation for flyscanning development, the following have been deleted from ophyd_async.plan_stubs:
fly_and_collect. Plans should now usebps.collect_while_completing- The
prepare_*plan stubs will eventually make their way back here, but only when we've defined a bunch of specific ones to make a generic plan stub out of - The convenience
*_fly_and_collect_*plan stubs that wrap together the preparing and the flying should be wrapped into a generic plan at a later date
What's Changed
- add full_match parameter and amend tests by @Villtord in #938
- Add partial reading by @oliwenmandiamond in #944
- Add retries to signals by @shihab-dls in #943
- Fix dictionary changing size during iteration by @gkalua in #947
- Write docs on what plan stubs do to devices by @stan-dot in #906
- Delete existing flyscan plan stubs by @gkalua in #951
- Flyscanning expansion of terms by @coretl in #945
- Fix CA Virtual Circuit error when running full test suite. by @jwlodek in #958
New Contributors
Full Changelog: v0.11...v0.12
v0.11
Notable changes
Child signals named on attach to device
Previously the naming of child signals was inconsistent between those named by passing name in __init__, and those named after the fact using set_name via init_devices or something similar. Now child devices are now named when they are attached to a parent, which means that the super order in __init__ doesn't matter from the perspective of naming. For example:
class Base(Device):
def __init__(self, name: str = ""):
self.sig1 = soft_signal_rw(float)
super().__init__(name=name)
class Derived1(Base):
def __init__(self, name: str = ""):
self.sig2 = soft_signal_rw(float)
super().__init__(name=name)
class Derived2(Base):
def __init__(self, name: str = ""):
super().__init__(name=name)
self.sig2 = soft_signal_rw(float)Previously:
-If device = Derived1(name="mydevice") then device.sig2.name == "mydevice-sig2"
-If device = Derived2(name="mydevice") then device.sig2.name == ""
Now:
device.sig2.name == "mydevice-sig2"in both cases
The canonical way to rename a signal to something different to {parent.name}-{signal_name} is to override set_name, e.g. in motor:
def set_name(self, name: str, *, child_name_separator: str | None = None) -> None:
"""Set name of the motor and its children."""
super().set_name(name, child_name_separator=child_name_separator)
# Readback should be named the same as its parent in read()
self.user_readback.set_name(name)Shared FlyMotorInfo for SimMotor and EpicsMotor
# old
from ophyd_async.sim import FlySimMotorInfo
info = FlySimMotorInfo(cv_start=0, cv_end=1, cv_time=0.2)
# new
from ophyd_async.core import FlyMotorInfo
info = FlyMotorInfo(start_position=0, end_position=1, time_for_move=0.2)or
# old
from ophyd_async.epics import motor
info = motor.FlyMotorInfo(start_position=0, end_position=1, time_for_move=0.2)
# new
from ophyd_async.core import FlyMotorInfo
info = FlyMotorInfo(start_position=0, end_position=1, time_for_move=0.2)Remove EigerTriggerInfo
# old
from ophyd_async.fastcs.eiger import EigerDetector, EigerTriggerInfo
await det.prepare(
EigerTriggerInfo(
number_of_events=1,
trigger=DetectorTrigger.INTERNAL,
energy_ev=10000,
)
)
# new
from ophyd_async.core import TriggerInfo
await det.drv.detector.photon_energy.set(10000)
await det.prepare(
TriggerInfo(
number_of_events=1,
trigger=DetectorTrigger.INTERNAL,
)
)What's Changed
- 729 make it easier to spot when slow tests are added by @Relm-Arrowny in #916
- Modify SimMotor to use the same FlyMotorInfo as the EPICS motor, move… by @jwlodek in #920
- Fix CI tests which involve ophyd by @coretl in #927
- Add
ConfinedModelto explicitly defined fields in the model schema by @hyperrealist in #925 - Simplify HDFDocumentComposer by @shihab-dls in #858
- add ExampleTable to
test_soft_signal_backend_get_put_monitorby @hyperrealist in #930 - Allow constants in kwargs of derived_signal by @shihab-dls in #859
- Allow n nodes in Odin by @RJCD-Diamond in #926
- create pmac IO interface classes for trajectory scanning by @gilesknap in #929
- Remove EigerTriggerInfo by @shihab-dls in #928
- Add check_value utility function fixes #874 by @gilesknap in #931
- Set device name when child device attached by @coretl in #899
- Point back at latest ophyd release by @coretl in #934
- signal walking added for debugging by @stan-dot in #917
- Update ADAndor to match ADAravis by @Relm-Arrowny in #942
New Contributors
- @hyperrealist made their first contribution in #925
- @RJCD-Diamond made their first contribution in #926
Full Changelog: v0.10.1...v0.11
v0.10.1
v0.10.0
What's Changed
- Add 0.10 docs by @coretl in #700
- copy workflows from blueapi, [still need to configure env values -not a code change] by @stan-dot in #664
- Tweak wording of article by @coretl in #759
- Add save load docs by @olliesilvester in #763
- Rewrite docstrings in markdown by @coretl in #764
- Add to observe_value docstring by @coretl in #769
- Add flyable support to SimMotor by @coretl in #767
- Fix flaky motor tests by @coretl in #775
- Allow typing.Sequence[str] as well as collections.abc.Sequence[str] by @coretl in #774
- Update _codeql.yml by @stan-dot in #760
- Add "How to use settings to put devices back in their original state" by @coretl in #772
- Update implementing-devices.md by @burkeds in #778
- add use/set switch by @rerpha in #780
- Remove functions from ADHDFWriter that are exact copies of superclass… by @jwlodek in #782
- Simpler fix standard det by @jwlodek in #784
- add offset mode switch and other missing motor fields by @rerpha in #783
- Rename HDFFile -> HDFDocumentComposer by @coretl in #794
- Auto fill devices by @burkeds in #798
- store_config_settings by @burkeds in #797
- Adding ConfigSignal version of get_current_settings and retrieve_settings. by @burkeds in #803
- Ignore annotation by @burkeds in #802
- Detector docs by @coretl in #801
- Update core and tango tests to match structure of epics tests by @jsouter in #723
- Update ADCore to match ADAravis by @shihab-dls in #807
- Update ADSimDetector to match ADAravis by @shihab-dls in #808
- Moved all tests common to all AD detectors to shared parametrized tes… by @jwlodek in #812
- Make a demo extra for tutorial deps by @coretl in #765
- Update Vimba and Kinetix classes to match Aravis by @jwlodek in #814
- Remove deprecated
get_pipe_list()calls by @jsouter in #809 - Update ADPilatus to match ADAravis by @paula-mg in #810
- Add a flyscanning explanation by @douglaswinter in #813
- Don't return completed_status() in set_and_wait_for_value by @jsouter in #805
- Add missing docstrings, remove unused enum class by @jwlodek in #822
- feature: Support new pvi structure by @evvaaaa in #824
- DOCS: change mermaid configuration by @jacopoabramo in #823
- Allow no-op moves for SimMotor by @Tom-Willemsen in #834
- Allow setting read timeout by @Tom-Willemsen in #831
- Remove hard-dependency on p4p from ophyd_async.plan_stubs by @Tom-Willemsen in #833
- Create 1-many and many-many versions of DerivedSignal by @coretl in #661
- Add support for a continuous acquisition interface for AD dets by @jwlodek in #793
- Allow no alarm_severity in assert_reading by @coretl in #840
- Support future annotations in derived signal by @coretl in #843
- Make length of mocked pvi device vectors a class attribute so it can … by @jwlodek in #845
- Add test that checks to make sure put completion works for PVA signals by @jwlodek in #846
- Remove NameProvider by @paula-mg in #842
- Raise exception when duplicate readable device found in derived class and test by @shihab-dls in #853
- Support signal_r for one-to-many derived_signal_rw by @coretl in #852
- Rename multiplier to exposures_per_event and move to first dim of shape by @thomashopkins32 in #726
- Remove unnecessary _RBV from armed signal PV suffix for PIL by @jwlodek in #861
- Use fastCS-Eiger Without fastCS-Odin Changes by @shihab-dls in #862
- Use ADOdin with FastCS-Eiger by @shihab-dls in #863
- Add datatype to signal and check that derived params have correct type by @shihab-dls in #854
- Pass datatype between FastCS-Eiger and ADOdin by @shihab-dls in #870
- remove unnecessary function by @Villtord in #869
- Improve error message from observe value by @Villtord in #856
- Fix minor pilatus issues by @DominicOram in #880
- Fix areaDetector naming by @coretl in #890
- Add SupersetEnum and use it in ADBaseDataType by @oliwenmandiamond in #864
- Fix prepare motor path by @tomtrafford in #892
- Don't consider tests as first party imports by @coretl in #897
- fix: correct signal types and types for Stats plugin by @DiamondJoseph in #891
- Await eiger_controller arm by @shihab-dls in #873
- Fix ADOdin writer.open() for dodal plan by @shihab-dls in #900
- Fix for detector race condition when checking acquire status by @canismarko in #889
- Allow None in Shapes by @Tom-Willemsen in #895
- Add default value for pop() listener and add test. by @Villtord in #908
New Contributors
- @paula-mg made their first contribution in #810
- @douglaswinter made their first contribution in #813
- @jacopoabramo made their first contribution in #823
- @oliwenmandiamond made their first contribution in #864
- @canismarko made their first contribution in #889
Full Changelog: v0.9.0...v0.10.0
v0.10.0a4
What's Changed
- Add datatype to signal and check that derived params have correct type by @shihab-dls in #854
- Pass datatype between FastCS-Eiger and ADOdin by @shihab-dls in #870
- remove unnecessary function by @Villtord in #869
- Improve error message from observe value by @Villtord in #856
- Fix minor pilatus issues by @DominicOram in #880
- Fix areaDetector naming by @coretl in #890
- Add SupersetEnum and use it in ADBaseDataType by @oliwenmandiamond in #864
- Fix prepare motor path by @tomtrafford in #892
- Don't consider tests as first party imports by @coretl in #897
- fix: correct signal types and types for Stats plugin by @DiamondJoseph in #891
- Await eiger_controller arm by @shihab-dls in #873
- Fix ADOdin writer.open() for dodal plan by @shihab-dls in #900
New Contributors
- @oliwenmandiamond made their first contribution in #864
Full Changelog: v0.10.0a3...v0.10.0a4
v0.10.0a3
What's Changed
- Make length of mocked pvi device vectors a class attribute so it can … by @jwlodek in #845
- Add test that checks to make sure put completion works for PVA signals by @jwlodek in #846
- Remove NameProvider by @paula-mg in #842
- Raise exception when duplicate readable device found in derived class and test by @shihab-dls in #853
- Support signal_r for one-to-many derived_signal_rw by @coretl in #852
- Rename multiplier to exposures_per_event and move to first dim of shape by @thomashopkins32 in #726
- Remove unnecessary _RBV from armed signal PV suffix for PIL by @jwlodek in #861
- Use fastCS-Eiger Without fastCS-Odin Changes by @shihab-dls in #862
- Use ADOdin with FastCS-Eiger by @shihab-dls in #863
Full Changelog: v0.10.0a2...v0.10.0a3
v0.10.0a2
v0.10.0a1
What's Changed
- Add 0.10 docs by @coretl in #700
- copy workflows from blueapi, [still need to configure env values -not a code change] by @stan-dot in #664
- Tweak wording of article by @coretl in #759
- Add save load docs by @olliesilvester in #763
- Rewrite docstrings in markdown by @coretl in #764
- Add to observe_value docstring by @coretl in #769
- Add flyable support to SimMotor by @coretl in #767
- Fix flaky motor tests by @coretl in #775
- Allow typing.Sequence[str] as well as collections.abc.Sequence[str] by @coretl in #774
- Update _codeql.yml by @stan-dot in #760
- Add "How to use settings to put devices back in their original state" by @coretl in #772
- Update implementing-devices.md by @burkeds in #778
- add use/set switch by @rerpha in #780
- Remove functions from ADHDFWriter that are exact copies of superclass… by @jwlodek in #782
- Simpler fix standard det by @jwlodek in #784
- add offset mode switch and other missing motor fields by @rerpha in #783
- Rename HDFFile -> HDFDocumentComposer by @coretl in #794
- Auto fill devices by @burkeds in #798
- store_config_settings by @burkeds in #797
- Adding ConfigSignal version of get_current_settings and retrieve_settings. by @burkeds in #803
- Ignore annotation by @burkeds in #802
- Detector docs by @coretl in #801
- Update core and tango tests to match structure of epics tests by @jsouter in #723
- Update ADCore to match ADAravis by @shihab-dls in #807
- Update ADSimDetector to match ADAravis by @shihab-dls in #808
- Moved all tests common to all AD detectors to shared parametrized tes… by @jwlodek in #812
- Make a demo extra for tutorial deps by @coretl in #765
- Update Vimba and Kinetix classes to match Aravis by @jwlodek in #814
- Remove deprecated
get_pipe_list()calls by @jsouter in #809 - Update ADPilatus to match ADAravis by @paula-mg in #810
- Add a flyscanning explanation by @douglaswinter in #813
- Don't return completed_status() in set_and_wait_for_value by @jsouter in #805
- Add missing docstrings, remove unused enum class by @jwlodek in #822
- feature: Support new pvi structure by @evvaaaa in #824
- DOCS: change mermaid configuration by @jacopoabramo in #823
- Allow no-op moves for SimMotor by @Tom-Willemsen in #834
- Allow setting read timeout by @Tom-Willemsen in #831
- Remove hard-dependency on p4p from ophyd_async.plan_stubs by @Tom-Willemsen in #833
- Create 1-many and many-many versions of DerivedSignal by @coretl in #661
- Add support for a continuous acquisition interface for AD dets by @jwlodek in #793
New Contributors
- @paula-mg made their first contribution in #810
- @douglaswinter made their first contribution in #813
- @jacopoabramo made their first contribution in #823
Full Changelog: v0.9.0...v0.10.0a1
v0.9.0
Breaking changes since v0.8.0
DeviceCollector renamed to init_device
Functionality is the same, just the name is different
# old
from ophyd_async.core import DeviceCollector
with DeviceCollector():
...
# old
from ophyd_async.core import init_devices
with init_devices():
...sim.demo renamed to sim
# old
from ophyd_async.sim.demo import SimMotor
# new
from ophyd_async.sim import SimMotorAreaDetector support TIFF and JPEG as well as HDF writers
The initialisation arguments for HDF change slightly as a result
from ophyd_async.epics import adaravis
# old
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", hdf_suffix="HDF:")
# new
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", fileio_suffix="HDF:")Load/Save has been rewritten
Docs for this will follow in the 0.10 production release
mock_puts_blocked is now sync rather than async
# old
async with mock_puts_blocked(sig):
...
# old
with mock_puts_blocked(sig):
...All enums are now uppercase, and StrictEnum and SubsetEnum subclasses enforce this.
# old
trigger_mode = DetectorTrigger.internal
image_mode = adcore.ImageMode.multiple
# new
trigger_mode = DetectorTrigger.INTERNAL
image_mode = adcore.ImageMode.MULTIPLETesting utils moved to ophyd_async.testing
The following have moved to ophyd_async.testing and should be imported from there:
- assert_configuration
- assert_emitted
- assert_reading
- assert_value
- callback_on_mock_put
- get_mock
- get_mock_put
- mock_puts_blocked
- reset_mock_put_calls
- set_mock_put_proceeds
- set_mock_value
- set_mock_values
- wait_for_pending_wakeups
# old
from ophyd_async.core import set_mock_value
# new
from ophyd_async.testing import set_mock_valueIn detail
- Make mock_puts_blocked a sync contextmanager as it doesn't do any async things by @coretl in #672
- Update all Enums to UPPER_CASE across the code base by @jennmald in #673
- Add a hint to PandA if we can't find a block by @coretl in #668
- Make name separator configurable by @coretl in #675
- Prevent issues with writing data with software scans by @DiamondJoseph in #685
- Add new timeout for observe_value by @coretl in #650
- Ensure motors can be stopped by @Tom-Willemsen in #688
- adjusted tests to avoid
pytest.approxboolcomparison by @evalott100 in #689 - Remove mailmap by @coretl in #690
- Allow for fields w/
epics_signal_rw_rbv, also support long strings/waveforms with PVA backend. by @jwlodek in #682 - Add Python 3.12 to CI now that p4p is updated by @OCopping in #655
- fixed bad logic introducted to
test_observeby @evalott100 in #692 - Fix SimMotor watcher output direction by @coretl in #670
- Move testing utils from core to testing by @coretl in #695
- Update copier template to 2.6.0 by @coretl in #698
- Faster tango tests by @jsouter in #684
- 618 assert statements broken in tests by @Relm-Arrowny in #702
- Improve import linting by @coretl in #704
- Switch from intelligent save to intelligent load by @coretl in #697
- Reimplement DeviceCollector as init_devices by @coretl in #705
- Move contents of
simby @coretl in #708 - Move make_detector to conftest.py and make it a fixture by @thomashopkins32 in #716
- Rewrite EPICS signal tests by @coretl in #714
- Split out common AD file plugin logic into core writer class, create ADTiffWriter by @jwlodek in #606
- Convert float prec 0 pvs to int on request by @coretl in #718
- Add queue size signal to base AD plugin IO class by @jwlodek in #725
- Sync files with new version of ruff by @thomashopkins32 in #731
- fixed persistent tasks by @evalott100 in #730
- use ophyd async logger for logging.debug statements by @rerpha in #686
- Remove assert in production code by @kivel in #728
- Add areaDetector JPEG writer by @jwlodek in #720
- Expand assert_* functions to work with all signal types by @jsouter in #711
- Widen Array1D to fix changes to numpy shape by @coretl in #736
- Add embed scene for set_and_wait_for svg by @ZohebShaikh in #745
- Adding offset signal for epics motor by @jwlodek in #746
- Port andor new ad format by @jwlodek in #724
- Update to offer more helpful error message if str fallback is used wi… by @jwlodek in #752
- Add doc string to SubsetEnumMeta dunder by @shihab-dls in #749
- Remove unnecessary attribute from hdf writer by @jwlodek in #756
New Contributors
- @jennmald made their first contribution in #673
- @thomashopkins32 made their first contribution in #716
- @kivel made their first contribution in #728
- @shihab-dls made their first contribution in #749
Full Changelog: v0.8.0...v0.9.0
v0.9.0a2
Breaking changes
DeviceCollector renamed to init_device
Functionality is the same, just the name is different
# old
from ophyd_async.core import DeviceCollector
with DeviceCollector():
...
# old
from ophyd_async.core import init_devices
with init_devices():
...sim.demo renamed to sim
# old
from ophyd_async.sim.demo import SimMotor
# new
from ophyd_async.sim import SimMotorAreaDetector support TIFF and JPEG as well as HDF writers
The initialisation arguments for HDF change slightly as a result
from ophyd_async.epics import adaravis
# old
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", hdf_suffix="HDF:")
# new
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", fileio_suffix="HDF:")Load/Save has been rewritten
Docs for this will follow in the 0.9 production release
In detail
- 618 assert statements broken in tests by @Relm-Arrowny in #702
- Improve import linting by @coretl in #704
- Switch from intelligent save to intelligent load by @coretl in #697
- Reimplement DeviceCollector as init_devices by @coretl in #705
- Move contents of
simby @coretl in #708 - Move make_detector to conftest.py and make it a fixture by @thomashopkins32 in #716
- Rewrite EPICS signal tests by @coretl in #714
- Split out common AD file plugin logic into core writer class, create ADTiffWriter by @jwlodek in #606
- Convert float prec 0 pvs to int on request by @coretl in #718
- Add queue size signal to base AD plugin IO class by @jwlodek in #725
- Sync files with new version of ruff by @thomashopkins32 in #731
- fixed persistent tasks by @evalott100 in #730
- use ophyd async logger for logging.debug statements by @rerpha in #686
- Remove assert in production code by @kivel in #728
- Add areaDetector JPEG writer by @jwlodek in #720
- Expand assert_* functions to work with all signal types by @jsouter in #711
- Widen Array1D to fix changes to numpy shape by @coretl in #736
- Add embed scene for set_and_wait_for svg by @ZohebShaikh in #745
- Adding offset signal for epics motor by @jwlodek in #746
- Port andor new ad format by @jwlodek in #724
New Contributors
Full Changelog: v0.9.0a1...v0.9.0a2