From 2ac1c0ad70ba296817900d4909cbaf881c8b9474 Mon Sep 17 00:00:00 2001 From: Rick Wierenga Date: Sun, 5 Jan 2025 16:19:42 -0800 Subject: [PATCH 1/5] lh.summary for resources with an undefined location --- pylabrobot/resources/hamilton/hamilton_decks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pylabrobot/resources/hamilton/hamilton_decks.py b/pylabrobot/resources/hamilton/hamilton_decks.py index 963d8bb702..689dc81de8 100644 --- a/pylabrobot/resources/hamilton/hamilton_decks.py +++ b/pylabrobot/resources/hamilton/hamilton_decks.py @@ -308,8 +308,11 @@ def print_resource_line(resource: Resource, depth=0) -> str: r_summary += resource.__class__.__name__.ljust(type_column_length) # Print resource location - location = resource.get_absolute_location() - r_summary += str(location).ljust(location_column_length) + try: + location = str(resource.get_absolute_location()) + except NoLocationError: + location = "Undefined" + r_summary += location.ljust(location_column_length) return r_summary From febfb985ba004d7ef3bde41ecab83575f40413f7 Mon Sep 17 00:00:00 2001 From: Rick Wierenga Date: Mon, 6 Jan 2025 10:14:57 -0800 Subject: [PATCH 2/5] PlateHolder only takes skirted plates (#330) --- pylabrobot/resources/carrier.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylabrobot/resources/carrier.py b/pylabrobot/resources/carrier.py index 3f88a70a85..d58940e85a 100644 --- a/pylabrobot/resources/carrier.py +++ b/pylabrobot/resources/carrier.py @@ -191,6 +191,8 @@ def assign_child_resource( "PlateHolder can only store Plate, PlateAdapter or ResourceStack " + f"resources, not {type(resource)}" ) + if isinstance(resource, Plate) and resource.plate_type != "skirted": + raise ValueError("PlateHolder can only store plates that are skirted") return super().assign_child_resource(resource, location, reassign) def _get_sinking_depth(self, resource: Resource) -> Coordinate: From 56405f6999ff93971502743e340d26762ae01230 Mon Sep 17 00:00:00 2001 From: Rick Wierenga Date: Mon, 6 Jan 2025 10:46:43 -0800 Subject: [PATCH 3/5] =?UTF-8?q?don=E2=80=99t=20format=20on=20save?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index da429d1252..714c508189 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,7 +33,6 @@ "python.testing.pytestEnabled": true, "python.testing.autoTestDiscoverOnSaveEnabled": true, "editor.rulers": [100], - "editor.formatOnSave": true, "files.exclude": { "**/__pycache__": true }, From c39bd0bc8f234dc4711f0af3374895b856de3967 Mon Sep 17 00:00:00 2001 From: Rick Wierenga Date: Mon, 6 Jan 2025 14:31:07 -0800 Subject: [PATCH 4/5] Update rpi.md --- docs/user_guide/rpi.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/user_guide/rpi.md b/docs/user_guide/rpi.md index 970c730856..070be87be2 100644 --- a/docs/user_guide/rpi.md +++ b/docs/user_guide/rpi.md @@ -21,6 +21,10 @@ You can use PLR on any operating system, but Raspberry Pis can be a good choice ``` SUBSYSTEM=="usb", MODE="0666" ``` +- Reload the udev rules with + ```bash + sudo udevadm control --reload-rules && sudo udevadm trigger + ``` ```{warning} This adds permissions to all USB devices. This is useful when you control the device and don't want to worry when plugging in new devices, but it could be a security risk if the machine is shared with untrusted users. See [udev documentation](https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html) for more granular control. From 140cd81ac94d55fb5d77616457bdddbc2063ee6e Mon Sep 17 00:00:00 2001 From: Camillo Moschner <122165124+BioCam@users.noreply.github.com> Date: Tue, 7 Jan 2025 02:07:41 +0000 Subject: [PATCH 5/5] Fix teaching needle block positions on STARlet (#350) --- pylabrobot/resources/hamilton/hamilton_deck_tests.py | 2 +- pylabrobot/resources/hamilton/hamilton_decks.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pylabrobot/resources/hamilton/hamilton_deck_tests.py b/pylabrobot/resources/hamilton/hamilton_deck_tests.py index 7270883bca..93d7c9199e 100644 --- a/pylabrobot/resources/hamilton/hamilton_deck_tests.py +++ b/pylabrobot/resources/hamilton/hamilton_deck_tests.py @@ -63,7 +63,7 @@ def test_summary(self): │ ├── │ (31) ├── teaching_carrier Resource (775.000, 051.800, 100.000) - │ ├── teaching_tip_rack TipRack (780.900, 452.100, 100.000) + │ ├── teaching_tip_rack TipRack (780.900, 461.100, 100.000) │ (32) ├── trash Trash (800.000, 190.600, 137.100) """[1:] diff --git a/pylabrobot/resources/hamilton/hamilton_decks.py b/pylabrobot/resources/hamilton/hamilton_decks.py index 689dc81de8..788fc84484 100644 --- a/pylabrobot/resources/hamilton/hamilton_decks.py +++ b/pylabrobot/resources/hamilton/hamilton_decks.py @@ -424,12 +424,12 @@ def __init__( size_x=9 * 8, size_y=9, size_z=50.4, - ordered_items={f"A{i}": tip_spots[i] for i in range(8)}, + ordered_items={f"{letter}1": tip_spots[idx] for idx, letter in enumerate("HGFEDCBA")}, with_tips=True, model="hamilton_teaching_tip_rack", ) teaching_carrier.assign_child_resource( - teaching_tip_rack, location=Coordinate(x=5.9, y=400.3, z=0) + teaching_tip_rack, location=Coordinate(x=5.9, y=409.3, z=0) ) self.assign_child_resource( teaching_carrier,