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

Commit

Permalink
Merge branch 'main' into 1119_apply_panda_hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
olliesilvester authored Feb 5, 2024
2 parents e357085 + 024dc71 commit f36ef3c
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 287 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_requires =
xarray
doct
databroker
dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@0aabdb389f65a30e629cec60a36c3b5298b7647f
dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@90d0e19427a6a22818deb3b2cff108ea6d1c1efa
pydantic<2.0 # See https://github.com/DiamondLightSource/hyperion/issues/774
scipy
pyzmq<25 # See https://github.com/DiamondLightSource/hyperion/issues/1103
Expand Down
2 changes: 2 additions & 0 deletions src/hyperion/experiment_plans/flyscan_xray_centre_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def do_fgs():
total_exposure,
30.0,
)
LOGGER.info("Wait for all moves with no assigned group")
yield from bps.wait()
LOGGER.info("kicking off FGS")
yield from bps.kickoff(fgs_motors)
LOGGER.info("Waiting for Zocalo device queue to have been cleared...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def run_gridscan(
else_plan=lambda: (yield from bps.unstage(fgs_composite.eiger)),
)
def do_fgs():
yield from bps.wait() # Wait for all moves to complete
# Check topup gate
total_exposure = (
parameters.experiment_params.get_num_images()
Expand All @@ -141,7 +140,11 @@ def do_fgs():
total_exposure,
30.0,
)
yield from bps.wait() # Wait for all moves with no explicitly signed group


LOGGER.info("Wait for all moves with no assigned group")
yield from bps.wait()

LOGGER.info("kicking off FGS")
yield from bps.kickoff(fgs_motors)
LOGGER.info("Waiting for Zocalo device queue to have been cleared...")
Expand Down
14 changes: 10 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def mock_set(motor: EpicsMotor, val):
return Status(done=True, success=True)


def patch_motor(motor):
return patch.object(motor, "set", partial(mock_set, motor))
def patch_motor(motor: EpicsMotor):
return patch.object(motor, "set", MagicMock(side_effect=partial(mock_set, motor)))


@pytest.fixture
Expand Down Expand Up @@ -212,13 +212,19 @@ def smargon() -> Generator[Smargon, None, None]:

with patch_motor(smargon.omega), patch_motor(smargon.x), patch_motor(
smargon.y
), patch_motor(smargon.z):
), patch_motor(smargon.z), patch_motor(smargon.chi), patch_motor(smargon.phi):
yield smargon


@pytest.fixture
def zebra():
return i03.zebra(fake_with_ophyd_sim=True)
zebra = i03.zebra(fake_with_ophyd_sim=True)
mock_arm = MagicMock(
side_effect=zebra.pc.arm.armed.set,
return_value=Status(done=True, success=True),
)
with patch.object(zebra.pc.arm.arm_set, "set", mock_arm):
return i03.zebra(fake_with_ophyd_sim=True)


@pytest.fixture
Expand Down
Loading

0 comments on commit f36ef3c

Please sign in to comment.