Skip to content

Commit

Permalink
Expose check_and_cache_values required for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph committed Sep 19, 2024
1 parent 644a9fd commit 9e0afdf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/dodal/plan_stubs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
from .data_session_metadata import attach_data_session_metadata_decorator
from .motor_util_plans import (
MoveTooLarge,
check_and_cache_values,
home_and_reset_decorator,
home_and_reset_wrapper,
move_and_reset_wrapper,
)

__all__ = [
"check_and_cache_values",
"check_topup_and_wait_if_necessary",
"wait_for_topup_complete",
"attach_data_session_metadata_decorator",
Expand Down
4 changes: 2 additions & 2 deletions src/dodal/plan_stubs/motor_util_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
super().__init__(*args)


def _check_and_cache_values(
def check_and_cache_values(
devices_and_positions: dict[AnyDevice, float],
smallest_move: float,
maximum_move: float,
Expand Down Expand Up @@ -87,7 +87,7 @@ def move_and_reset_wrapper(
on. If false it is left up to the caller to wait on
them. Defaults to True.
"""
initial_positions = yield from _check_and_cache_values(
initial_positions = yield from check_and_cache_values(
device_and_positions, smallest_move, maximum_move
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from ophyd_async.epics.motor import Motor

from dodal.devices.util.test_utils import patch_motor
from dodal.plans.motor_util_plans import (
from dodal.plan_stubs import (
MoveTooLarge,
_check_and_cache_values,
check_and_cache_values,
home_and_reset_wrapper,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from dodal.beamlines import i03
from dodal.devices.synchrotron import Synchrotron, SynchrotronMode
from dodal.plans.check_topup import (
from dodal.plan_stubs import (
check_topup_and_wait_if_necessary,
wait_for_topup_complete,
)
Expand Down

0 comments on commit 9e0afdf

Please sign in to comment.