Skip to content
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
description: What to run under tox
required: true


jobs:
run:
runs-on: "ubuntu-latest"
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ on:
branches:
- main
tags:
- '*'
- "*"
pull_request:

jobs:

lint:
uses: ./.github/workflows/_tox.yml
with:
Expand All @@ -28,7 +27,7 @@ jobs:

dist:
uses: ./.github/workflows/_dist.yml

release:
needs: [dist, test]
if: github.ref_type == 'tag'
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"deepdiff",
"heliotrapi >= v0.3.3",
"ophyd-async[ca,pva] >=0.21.2",
"bluesky == 1.15.1",
"bluesky >= 1.16.0",
"daq-config-server >= 1.5.3",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@main",
]
Expand All @@ -42,6 +42,7 @@ requires-python = ">=3.11"
dev = [
"pre-commit",
"pyright",
"pyright[nodejs]",
"pytest",
"pytest-cov",
"ruff",
Expand Down
42 changes: 24 additions & 18 deletions tests/unit_tests/i15_1/test_centre_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,18 @@ def test_centre_sample_plan_makes_expected_calls(
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "robot",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "xtal",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "tth",
predicate=lambda msg: (
msg.command == "read"
and msg.obj is common_collection_devices.robot
and msg.args
== (
common_collection_devices.xtal,
common_collection_devices.tth,
common_collection_devices.fast_attenuator,
common_collection_devices.slow_attenuator,
common_collection_devices.hexapod,
)
),
)
msgs = assert_message_and_return_remaining(
msgs,
Expand Down Expand Up @@ -206,15 +209,18 @@ def test_centre_sample_plan_makes_expected_calls(
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "robot",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "xtal",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "tth",
predicate=lambda msg: (
msg.command == "read"
and msg.obj is common_collection_devices.robot
and msg.args
== (
common_collection_devices.xtal,
common_collection_devices.tth,
common_collection_devices.fast_attenuator,
common_collection_devices.slow_attenuator,
common_collection_devices.hexapod,
)
),
)
msgs = assert_message_and_return_remaining(
msgs,
Expand Down
50 changes: 22 additions & 28 deletions tests/unit_tests/i15_1/test_static_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,19 @@ def test_static_collection_plan_makes_expected_calls(
msg.command == "declare_stream" and msg.kwargs["name"] == "baseline"
),
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "robot",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "xtal",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "tth",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: (
msg.command == "read" and msg.obj.name == "fast_attenuator"
),
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: (
msg.command == "read" and msg.obj.name == "slow_attenuator"
msg.command == "read"
and msg.obj is common_collection_devices.robot
and msg.args
== (
common_collection_devices.xtal,
common_collection_devices.tth,
common_collection_devices.fast_attenuator,
common_collection_devices.slow_attenuator,
common_collection_devices.hexapod,
)
),
)
msgs = assert_message_and_return_remaining(
Expand Down Expand Up @@ -200,15 +191,18 @@ def test_static_collection_plan_makes_expected_calls(
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "robot",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "xtal",
)
msgs = assert_message_and_return_remaining(
msgs,
predicate=lambda msg: msg.command == "read" and msg.obj.name == "tth",
predicate=lambda msg: (
msg.command == "read"
and msg.obj is common_collection_devices.robot
and msg.args
== (
common_collection_devices.xtal,
common_collection_devices.tth,
common_collection_devices.fast_attenuator,
common_collection_devices.slow_attenuator,
common_collection_devices.hexapod,
)
),
)
msgs = assert_message_and_return_remaining(
msgs,
Expand Down
36 changes: 29 additions & 7 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading