Skip to content

Commit eddd9ee

Browse files
authored
add child_location param to HeaterShaker (#401)
1 parent 28e9ae0 commit eddd9ee

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

pylabrobot/heating_shaking/heater_shaker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Optional
22

3+
from pylabrobot.resources.coordinate import Coordinate
34
from pylabrobot.shaking import Shaker
45
from pylabrobot.temperature_controlling import TemperatureController
56

@@ -16,6 +17,7 @@ def __init__(
1617
size_y: float,
1718
size_z: float,
1819
backend: HeaterShakerBackend,
20+
child_location: Coordinate,
1921
category: str = "heating_shaking",
2022
model: Optional[str] = None,
2123
):
@@ -25,6 +27,7 @@ def __init__(
2527
size_y=size_y,
2628
size_z=size_z,
2729
backend=backend,
30+
child_location=child_location,
2831
category=category,
2932
model=model,
3033
)

pylabrobot/shaking/shaker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Optional
33

44
from pylabrobot.machines.machine import Machine
5-
from pylabrobot.resources.resource_holder import ResourceHolder
5+
from pylabrobot.resources import Coordinate, ResourceHolder
66

77
from .backend import ShakerBackend
88

@@ -17,6 +17,7 @@ def __init__(
1717
size_y: float,
1818
size_z: float,
1919
backend: ShakerBackend,
20+
child_location: Coordinate,
2021
category: str = "shaker",
2122
model: Optional[str] = None,
2223
):
@@ -28,6 +29,7 @@ def __init__(
2829
size_z=size_z,
2930
category=category,
3031
model=model,
32+
child_location=child_location,
3133
)
3234
Machine.__init__(self, backend=backend)
3335
self.backend: ShakerBackend = backend # fix type

pylabrobot/temperature_controlling/opentrons.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def __init__(
2121
self,
2222
name: str,
2323
opentrons_id: str,
24+
child_location: Coordinate = Coordinate.zero(),
2425
child: Optional[ItemizedResource] = None,
2526
):
2627
"""Create a new Opentrons temperature module v2.
@@ -38,6 +39,7 @@ def __init__(
3839
size_x=193.5,
3940
size_y=89.2,
4041
size_z=84.0, # height without any aluminum block
42+
child_location=child_location,
4143
backend=OpentronsTemperatureModuleBackend(opentrons_id=opentrons_id),
4244
category="temperature_controller",
4345
model="temperatureModuleV2", # Must match OT moduleModel in list_connected_modules()
@@ -47,4 +49,4 @@ def __init__(
4749
self.child = child
4850

4951
if child is not None:
50-
self.assign_child_resource(child, location=Coordinate(x=0, y=0, z=0))
52+
self.assign_child_resource(child)

pylabrobot/temperature_controlling/temperature_controller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Optional
44

55
from pylabrobot.machines.machine import Machine
6-
from pylabrobot.resources.resource_holder import ResourceHolder
6+
from pylabrobot.resources import Coordinate, ResourceHolder
77

88
from .backend import TemperatureControllerBackend
99

@@ -18,6 +18,7 @@ def __init__(
1818
size_y: float,
1919
size_z: float,
2020
backend: TemperatureControllerBackend,
21+
child_location: Coordinate,
2122
category: str = "temperature_controller",
2223
model: Optional[str] = None,
2324
):
@@ -27,6 +28,7 @@ def __init__(
2728
size_x=size_x,
2829
size_y=size_y,
2930
size_z=size_z,
31+
child_location=child_location,
3032
category=category,
3133
model=model,
3234
)

0 commit comments

Comments
 (0)