diff --git a/.github/workflows/_tox.yml b/.github/workflows/_tox.yml index e7abe84..bb8bc6e 100644 --- a/.github/workflows/_tox.yml +++ b/.github/workflows/_tox.yml @@ -6,7 +6,6 @@ on: description: What to run under tox required: true - jobs: run: runs-on: "ubuntu-latest" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4838c36..2ac73c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,11 +5,10 @@ on: branches: - main tags: - - '*' + - "*" pull_request: jobs: - lint: uses: ./.github/workflows/_tox.yml with: @@ -28,7 +27,7 @@ jobs: dist: uses: ./.github/workflows/_dist.yml - + release: needs: [dist, test] if: github.ref_type == 'tag' diff --git a/pyproject.toml b/pyproject.toml index 2310631..b472f1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", ] @@ -42,6 +42,7 @@ requires-python = ">=3.11" dev = [ "pre-commit", "pyright", + "pyright[nodejs]", "pytest", "pytest-cov", "ruff", diff --git a/tests/unit_tests/i15_1/test_centre_sample.py b/tests/unit_tests/i15_1/test_centre_sample.py index 06b91ef..7c1ca65 100644 --- a/tests/unit_tests/i15_1/test_centre_sample.py +++ b/tests/unit_tests/i15_1/test_centre_sample.py @@ -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, @@ -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, diff --git a/tests/unit_tests/i15_1/test_static_collection.py b/tests/unit_tests/i15_1/test_static_collection.py index 2ee01ff..65f711b 100644 --- a/tests/unit_tests/i15_1/test_static_collection.py +++ b/tests/unit_tests/i15_1/test_static_collection.py @@ -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( @@ -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, diff --git a/uv.lock b/uv.lock index 56d0bb8..1a32a62 100644 --- a/uv.lock +++ b/uv.lock @@ -287,7 +287,7 @@ wheels = [ [[package]] name = "bluesky" -version = "1.15.1" +version = "1.16.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cycler" }, @@ -302,9 +302,9 @@ dependencies = [ { name = "tqdm" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e4/83/2e5d1956a1c4cd3d4f0bb34605cc2b11f2ce33e48249773292b27e6bba88/bluesky-1.15.1.tar.gz", hash = "sha256:956e161a8f34f698af28edcd501db118fa793a6c43241001e30ed8c6aaabd95c", size = 513978, upload-time = "2026-05-06T14:06:40.116Z" } +sdist = { url = "https://files.pythonhosted.org/packages/24/fb/9d72f62bb19fa10fad013a6039e51162ebaac84713a06a167083c4b68775/bluesky-1.16.0.tar.gz", hash = "sha256:e89884e5eb4e4e502d4f1e929f6862ed6827ad48272a928583bf67d2f1745261", size = 516370, upload-time = "2026-10-29T17:13:07.145Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8e/99/cc217b2a727fdf730d0c0064bc8c03473dfe5d0528f2bd0c4f59fdab4179/bluesky-1.15.1-py3-none-any.whl", hash = "sha256:7b3a0f04cf2bb0a7907771e014e59fe6fced777347df8df84adec7239f6c3d2a", size = 372701, upload-time = "2026-05-06T14:06:38.618Z" }, + { url = "https://files.pythonhosted.org/packages/da/ca/ad113309c25d01d2166a0ed17fcdcfa453dbf267147d9e9530928dda82a6/bluesky-1.16.0-py3-none-any.whl", hash = "sha256:674b6547bcab7f4dcaf5d403ce2225d52711cbfa363853ce5e2cf5119b802d60", size = 369254, upload-time = "2026-10-29T17:13:05.466Z" }, ] [[package]] @@ -1049,7 +1049,7 @@ dependencies = [ [package.dev-dependencies] dev = [ { name = "pre-commit" }, - { name = "pyright" }, + { name = "pyright", extra = ["nodejs"] }, { name = "pytest" }, { name = "pytest-asyncio" }, { name = "pytest-cov" }, @@ -1061,7 +1061,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "bluesky", specifier = "==1.15.1" }, + { name = "bluesky", specifier = ">=1.16.0" }, { name = "daq-config-server", specifier = ">=1.5.3" }, { name = "deepdiff" }, { name = "dls-dodal", git = "https://github.com/DiamondLightSource/dodal.git?rev=main" }, @@ -1083,6 +1083,7 @@ requires-dist = [ dev = [ { name = "pre-commit" }, { name = "pyright" }, + { name = "pyright", extras = ["nodejs"] }, { name = "pytest" }, { name = "pytest-asyncio" }, { name = "pytest-cov" }, @@ -1147,8 +1148,8 @@ wheels = [ [[package]] name = "dls-dodal" -version = "3.0.5.dev4+gb48576c3d" -source = { git = "https://github.com/DiamondLightSource/dodal.git?rev=main#b48576c3d3352440fdc3e027b2151dc7ba680e72" } +version = "3.0.7.dev1+g01e660fba" +source = { git = "https://github.com/DiamondLightSource/dodal.git?rev=main#01e660fba218677d284cbaa5b21ce70f198e8365" } dependencies = [ { name = "aiofiles" }, { name = "aiohttp" }, @@ -2380,6 +2381,22 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/c8/12811c9b48fde162bb72b6f2e78fada9a247a09d7bb5be2050a5d099c77b/nodeenv-1.11.0-py2.py3-none-any.whl", hash = "sha256:edaa16e6c14d7cf395d75d4bbd5a26390f4dc06501a33b4e76282b02cc688a25", size = 34277, upload-time = "2026-09-26T11:29:19.933Z" }, ] +[[package]] +name = "nodejs-wheel-binaries" +version = "24.19.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/76/7e97195e14346598565a0de4ca8bdbd5e634b3fb5b1ba590b7b1b89f8a63/nodejs_wheel_binaries-24.19.0.tar.gz", hash = "sha256:db217eef8cab8551667863379b08db4d9067403f6cbbe87481eb40edceb8aa9b", size = 8058, upload-time = "2026-08-19T21:47:19.671Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8c/52/0774b52c7be8151ad9d5aff44edc100c3f13d6d8eb3765f63ffa40e69fe8/nodejs_wheel_binaries-24.19.0-py2.py3-none-macosx_13_0_arm64.whl", hash = "sha256:e12cbfd69089504e42fb14194ce734a9dcf3eb38c820ca63dd511d36fb964e9c", size = 56047203, upload-time = "2026-08-19T21:46:43.448Z" }, + { url = "https://files.pythonhosted.org/packages/67/3a/4fdbbfecf2c23d52c0e3f68de7f7c1b3c97a26d328c69c5f6c49c48e340e/nodejs_wheel_binaries-24.19.0-py2.py3-none-macosx_13_0_x86_64.whl", hash = "sha256:1c890adf4b7e6556ccc1ca66c866bb81884b6c9a581dee4e530dc7f78fb9d514", size = 56219459, upload-time = "2026-08-19T21:46:48.45Z" }, + { url = "https://files.pythonhosted.org/packages/5f/a8/0147149415195c59b8a72a594916bfb80d6be4d586f9fbfda313889e0efc/nodejs_wheel_binaries-24.19.0-py2.py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:4e029dadfae1295876063c96b236f673487e8c27379fe146c1e2250283520227", size = 60588256, upload-time = "2026-08-19T21:46:53.298Z" }, + { url = "https://files.pythonhosted.org/packages/f4/89/6631d0982353da1bb7bc00bb1988f702822c62b42634f57999ee53b5c337/nodejs_wheel_binaries-24.19.0-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:4196a947bcc883f2003ab101762d729f3e99b5e86b75bd09151563403e2eceb8", size = 61123607, upload-time = "2026-08-19T21:46:58.117Z" }, + { url = "https://files.pythonhosted.org/packages/32/a2/fa30f0841e4602995782e124359f9b910c7b481d98decf61ef0b2fc3ebfb/nodejs_wheel_binaries-24.19.0-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:352e048ab4dd35e7de5f338d1cc4fcbf77a0e93da30bf7336a8217ee246b31d7", size = 62632842, upload-time = "2026-08-19T21:47:03.42Z" }, + { url = "https://files.pythonhosted.org/packages/18/01/22d97ca72213f66cc386ee638db30c2e62757fdf761c6029074bced83d1c/nodejs_wheel_binaries-24.19.0-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:28d078b2ced9e2069516e652dc4b1380e7a1a7f2d3934eccd1611586d283ba4c", size = 63250653, upload-time = "2026-08-19T21:47:07.938Z" }, + { url = "https://files.pythonhosted.org/packages/88/d1/e3be8fa327a795bcaf7a19cd84299e338a7bce32ff0665fdce9cfa22573c/nodejs_wheel_binaries-24.19.0-py2.py3-none-win_amd64.whl", hash = "sha256:67e3abeb9c3830cae8c8487ae8a2af7cc27dfa75af06145cee5ca7d1857c81bd", size = 42448503, upload-time = "2026-08-19T21:47:12.093Z" }, + { url = "https://files.pythonhosted.org/packages/1d/37/34cf28ba1691a060174948a9927fe61091982d6048b2e403071a9acce443/nodejs_wheel_binaries-24.19.0-py2.py3-none-win_arm64.whl", hash = "sha256:d9074c665ea68b04e183d82482c86dc907d3a9bd15eb6cf85542cb785266bb36", size = 40090155, upload-time = "2026-08-19T21:47:16.032Z" }, +] + [[package]] name = "nose2" version = "0.16.0" @@ -3459,6 +3476,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d7/ba/18b6e682ead424ad24bcc134339ae5d1b931cd9ae260540592a058a91279/pyright-1.1.414-py3-none-any.whl", hash = "sha256:2a6b4b3298c9eec174c5ed83bd338de6eee82df2992f3e1930e6199d381be36f", size = 6225049, upload-time = "2026-09-10T12:26:51.427Z" }, ] +[package.optional-dependencies] +nodejs = [ + { name = "nodejs-wheel-binaries" }, +] + [[package]] name = "pytest" version = "9.1.1"