Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ classifiers = [
dependencies = [
"bluesky", # Bluesky framework
"bluesky-kafka", # Bluesky-kafka integration
"ophyd-async[ca] == 0.13.6", # Device abstraction. When changing, also change in doc/conf.py
"ophyd-async[ca] == 0.13.7", # Device abstraction. When changing, also change in doc/conf.py
Copy link
Member

Choose a reason for hiding this comment

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

When changing, also change in doc/conf.py

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, missed that

"lmfit", # Fitting
"matplotlib", # Plotting
"msgpack-numpy", # Encoding kafka messages
Expand Down
18 changes: 4 additions & 14 deletions tests/devices/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import bluesky.plan_stubs as bps
import bluesky.plans as bp
import ophyd_async
import pytest
from ophyd_async.epics.motor import MotorLimitsError
from ophyd_async.testing import get_mock_put, set_mock_value

from ibex_bluesky_core.devices.block import (
Expand Down Expand Up @@ -353,21 +353,11 @@ async def test_block_mot_set_within_limits(mot_block):


async def test_block_mot_set_outside_limits(mot_block):
# Local import as API not available in older ophyd_async versions
if ophyd_async._version.version_tuple >= (0, 13, 5):
from ophyd_async.epics.motor import MotorLimitsError # pyright: ignore # noqa PLC0415

err = MotorLimitsError
else:
from ophyd_async.epics.motor import MotorLimitsException # pyright: ignore # noqa PLC0415

err = MotorLimitsException

set_mock_value(mot_block.user_setpoint, 10)
set_mock_value(mot_block.velocity, 10)
set_mock_value(mot_block.high_limit_travel, 15)
set_mock_value(mot_block.low_limit_travel, 5)
with pytest.raises(err):
set_mock_value(mot_block.dial_high_limit_travel, 15)
set_mock_value(mot_block.dial_low_limit_travel, 5)
with pytest.raises(MotorLimitsError):
Comment on lines +358 to +360
Copy link
Member

Choose a reason for hiding this comment

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

Did you actually check what it does with these limits? This feels weird to me that it applies limits to dial positions but user setpoints - we should check this isn't just an ophyd-async bug...

await mot_block.set(20)


Expand Down