Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Convert UDCDirectoryProvider to standard pattern #1352

Merged
merged 6 commits into from
May 9, 2024
Merged
Changes from 1 commit
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
Next Next commit
Convert UDCDirectoryProvider to standard pattern
DiamondJoseph committed May 7, 2024
commit a24732c0c00c0a611fd0607072695ee268d5bb4f
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
import bluesky.preprocessors as bpp
import numpy as np
from blueapi.core import BlueskyContext, MsgGenerator
from dodal.common import udc_directory_provider
from dodal.beamlines.beamline_utils import get_directory_provider
from dodal.devices.panda_fast_grid_scan import (
set_fast_grid_scan_params as set_flyscan_params,
)
@@ -196,9 +196,7 @@ def run_gridscan_and_move(
time_between_x_steps_ms,
)

udc_directory_provider.set_directory(
Path(parameters.hyperion_params.detector_params.directory)
)
get_directory_provider().update(directory=Path(parameters.hyperion_params.detector_params.directory))
yield from setup_panda_for_flyscan(
fgs_composite.panda,
PANDA_SETUP_PATH,
Original file line number Diff line number Diff line change
@@ -485,7 +485,7 @@ def wrapped_run_gridscan_and_move():
new=MagicMock(return_value=iter([])),
)
@patch(
"hyperion.experiment_plans.panda_flyscan_xray_centre_plan.udc_directory_provider.set_directory",
"hyperion.experiment_plans.panda_flyscan_xray_centre_plan.get_directory_provider.update",
autospec=True,
)
def test_when_gridscan_run_panda_directory_applied(