Skip to content

Fix Prep Import & Access smart During .setup() #496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 10, 2025
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: 1 addition & 0 deletions pylabrobot/liquid_handling/backends/hamilton/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

from .base import HamiltonLiquidHandler
from .pump import Pump # TODO: move elsewhere.
from .prep import Prep
from .STAR_backend import STAR
from .vantage_backend import Vantage
24 changes: 12 additions & 12 deletions pylabrobot/liquid_handling/backends/hamilton/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

from pylabrobot.liquid_handling.backends import LiquidHandlerBackend
from pylabrobot.liquid_handling.standard import (
Aspiration,
AspirationContainer,
AspirationPlate,
Dispense,
DispenseContainer,
DispensePlate,
SingleChannelAspiration,
MultiHeadAspirationContainer,
MultiHeadAspirationPlate,
SingleChannelDispense,
MultiHeadDispenseContainer,
MultiHeadDispensePlate,
Drop,
DropTipRack,
Pickup,
Expand Down Expand Up @@ -260,7 +260,7 @@ def __init__(self, host: str = "192.168.100.102", port: int = 2000):
self.port = port
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

async def setup(self):
async def setup(self, smart: bool = False):
self.socket.connect((self.host, self.port))
self.socket.settimeout(30)

Expand All @@ -271,7 +271,7 @@ async def setup(self):
rolloff_distance=3,
channel_parameters=[],
),
smart=False,
smart=smart,
)

await super().setup()
Expand Down Expand Up @@ -2465,7 +2465,7 @@ async def drop_tips(

async def aspirate(
self,
ops: List[Aspiration],
ops: List[SingleChannelAspiration],
use_channels: List[int],
z_final: float = 96.97,
timeout: Optional[float] = None,
Expand Down Expand Up @@ -2543,7 +2543,7 @@ async def aspirate(

async def dispense(
self,
ops: List[Dispense],
ops: List[SingleChannelDispense],
use_channels: List[int],
final_z: float = 96.97,
timeout: Optional[float] = None,
Expand Down Expand Up @@ -2623,10 +2623,10 @@ async def pick_up_tips96(self, pickup: PickupTipRack):
async def drop_tips96(self, drop: DropTipRack):
raise NotImplementedError("This operation is not supported on the Prep")

async def aspirate96(self, aspiration: Union[AspirationPlate, AspirationContainer]):
async def aspirate96(self, aspiration: Union[MultiHeadAspirationPlate, MultiHeadAspirationContainer]):
raise NotImplementedError("This operation is not supported on the Prep")

async def dispense96(self, dispense: Union[DispensePlate, DispenseContainer]):
async def dispense96(self, dispense: Union[MultiHeadDispensePlate, MultiHeadDispenseContainer]):
raise NotImplementedError("This operation is not supported on the Prep")

async def pick_up_resource(self, pickup: ResourcePickup):
Expand Down
Loading