From 8ea76bb6503741a46e7711a13d33b9521f244f06 Mon Sep 17 00:00:00 2001 From: Robert Queenin <2177841+ecalifornica@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:25:02 -0800 Subject: [PATCH 1/4] Add pytest filter to suppress expected warning This change cleans up the test output by preventing the expected warning from being printed. No alterations were made to the test logic or functionality of the code being tested. --- pylabrobot/liquid_handling/liquid_handler_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylabrobot/liquid_handling/liquid_handler_tests.py b/pylabrobot/liquid_handling/liquid_handler_tests.py index 33bd0731b7..03bbbb0164 100644 --- a/pylabrobot/liquid_handling/liquid_handler_tests.py +++ b/pylabrobot/liquid_handling/liquid_handler_tests.py @@ -1,6 +1,7 @@ """ Tests for LiquidHandler """ # pylint: disable=missing-class-docstring +import pytest import tempfile from typing import Any, Dict, List, Optional, cast import unittest @@ -496,6 +497,7 @@ async def test_aspirate_with_lid(self): with self.assertRaises(ValueError): await self.lh.aspirate([well], vols=10) + @pytest.mark.filterwarnings("ignore:Extra arguments to backend.pick_up_tips") async def test_strictness(self): class TestBackend(backends.SaverBackend): """ Override pick_up_tips for testing. """ From 04fff0d8bfe50fc8302d5ac0df654a20254fcab3 Mon Sep 17 00:00:00 2001 From: Robert Queenin <2177841+ecalifornica@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:50:15 -0800 Subject: [PATCH 2/4] Update LiquidHandler method argument names --- pylabrobot/liquid_handling/liquid_handler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pylabrobot/liquid_handling/liquid_handler.py b/pylabrobot/liquid_handling/liquid_handler.py index 17d251411d..1b6ce50d8d 100644 --- a/pylabrobot/liquid_handling/liquid_handler.py +++ b/pylabrobot/liquid_handling/liquid_handler.py @@ -1216,7 +1216,7 @@ async def move_lid( to: Union[Plate, ResourceStack, Coordinate], intermediate_locations: Optional[List[Coordinate]] = None, resource_offset: Coordinate = Coordinate.zero(), - to_offset: Coordinate = Coordinate.zero(), + destination_offset: Coordinate = Coordinate.zero(), get_direction: GripDirection = GripDirection.FRONT, put_direction: GripDirection = GripDirection.FRONT, pickup_distance_from_top: float = 5.7, @@ -1240,7 +1240,7 @@ async def move_lid( lid: The lid to move. Can be either a Plate object or a Lid object. to: The location to move the lid to, either a plate, ResourceStack or a Coordinate. resource_offset: The offset from the resource's origin, optional (rarely necessary). - to_offset: The offset from the location's origin, optional (rarely necessary). + destination_offset: The offset from the location's origin, optional (rarely necessary). Raises: ValueError: If the lid is not assigned to a resource. @@ -1270,7 +1270,7 @@ async def move_lid( intermediate_locations=intermediate_locations, pickup_distance_from_top=pickup_distance_from_top, resource_offset=resource_offset, - to_offset=to_offset, + destination_offset=destination_offset, get_direction=get_direction, put_direction=put_direction, **backend_kwargs) @@ -1289,7 +1289,7 @@ async def move_plate( to: Union[ResourceStack, CarrierSite, Resource, Coordinate], intermediate_locations: Optional[List[Coordinate]] = None, resource_offset: Coordinate = Coordinate.zero(), - to_offset: Coordinate = Coordinate.zero(), + destination_offset: Coordinate = Coordinate.zero(), put_direction: GripDirection = GripDirection.FRONT, get_direction: GripDirection = GripDirection.FRONT, pickup_distance_from_top: float = 13.2, @@ -1324,7 +1324,7 @@ async def move_plate( plate: The plate to move. Can be either a Plate object or a CarrierSite object. to: The location to move the plate to, either a plate, CarrierSite or a Coordinate. resource_offset: The offset from the resource's origin, optional (rarely necessary). - to_offset: The offset from the location's origin, optional (rarely necessary). + destination_offset: The offset from the location's origin, optional (rarely necessary). """ if isinstance(to, ResourceStack): @@ -1345,7 +1345,7 @@ async def move_plate( intermediate_locations=intermediate_locations, pickup_distance_from_top=pickup_distance_from_top, resource_offset=resource_offset, - to_offset=to_offset, + destination_offset=destination_offset, get_direction=get_direction, put_direction=put_direction, **backend_kwargs) From 47a8f904b37b1e78c1e89ffba633e9f00323d74f Mon Sep 17 00:00:00 2001 From: Robert Queenin <2177841+ecalifornica@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:27:17 -0800 Subject: [PATCH 3/4] Update SerializingBackend method argument name --- pylabrobot/liquid_handling/backends/serializing_backend.py | 2 +- .../liquid_handling/backends/serializing_backend_tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/serializing_backend.py b/pylabrobot/liquid_handling/backends/serializing_backend.py index d2215f5972..70d90f9a1b 100644 --- a/pylabrobot/liquid_handling/backends/serializing_backend.py +++ b/pylabrobot/liquid_handling/backends/serializing_backend.py @@ -146,7 +146,7 @@ async def move_resource(self, move: Move, **backend_kwargs): "to": serialize(move.destination), "intermediate_locations": [serialize(loc) for loc in move.intermediate_locations], "resource_offset": serialize(move.resource_offset), - "to_offset": serialize(move.destination_offset), + "destination_offset": serialize(move.destination_offset), "pickup_distance_from_top": move.pickup_distance_from_top, "get_direction": serialize(move.get_direction), "put_direction": serialize(move.put_direction), diff --git a/pylabrobot/liquid_handling/backends/serializing_backend_tests.py b/pylabrobot/liquid_handling/backends/serializing_backend_tests.py index 95c76d7576..deb2556a45 100644 --- a/pylabrobot/liquid_handling/backends/serializing_backend_tests.py +++ b/pylabrobot/liquid_handling/backends/serializing_backend_tests.py @@ -184,7 +184,7 @@ async def test_move(self): "to": serialize(to), "intermediate_locations": [], "resource_offset": serialize(Coordinate.zero()), - "to_offset": serialize(Coordinate.zero()), + "destination_offset": serialize(Coordinate.zero()), "pickup_distance_from_top": 13.2, "get_direction": "FRONT", "put_direction": "FRONT", From 5c738cd2d60c1f4464fc45ea39883ae6ab770d1e Mon Sep 17 00:00:00 2001 From: Robert Queenin <2177841+ecalifornica@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:35:16 -0800 Subject: [PATCH 4/4] Fix broken link in documentation --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1380b65f8..2e7234de88 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Thank you for your interest in contributing to PyLabRobot! This document will he See the installation instructions [here](docs/installation.md). For contributing, you should install PyLabRobot from source. -If this is your first time contributing to open source, check out [How to Open Source](./how-to-open-source.md) for an easy introduction. +If this is your first time contributing to open source, check out [How to Open Source](./docs/how-to-open-source.md) for an easy introduction. It's highly appreciated by the PyLabRobot developers if you communicate what you want to work on, to minimize any duplicate work. You can do this on the [forum](https://forums.pylabrobot.org/c/pylabrobot-development/23).