Skip to content

Commit

Permalink
deprecate _L and _P in resource definitions (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickwierenga authored Oct 23, 2024
1 parent 9a9bb39 commit 15dce32
Show file tree
Hide file tree
Showing 24 changed files with 292 additions and 164 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- `Thermo_TS_96_wellplate_1200ul_Rb` (https://github.com/PyLabRobot/pylabrobot/pull/215)
- `Thermo_AB_96_wellplate_300ul_Vb_EnduraPlate` (https://github.com/PyLabRobot/pylabrobot/pull/215)
- `adapter_hole_size_z` and `plate_z_offset` parameters to `PlateAdapter` (https://github.com/PyLabRobot/pylabrobot/pull/215)
- `wide_high_volume_tip_with_filter` and `HTF_L_WIDE` (https://github.com/PyLabRobot/pylabrobot/pull/222)
- `wide_high_volume_tip_with_filter` and `HTF_WIDE` (https://github.com/PyLabRobot/pylabrobot/pull/222)
- Serialize code cells and closures (https://github.com/PyLabRobot/pylabrobot/pull/220)
- `Container.get_anchor()` now supports `"cavity_bottom"` as an argument for `z` (https://github.com/PyLabRobot/pylabrobot/pull/205/)
- `pylabrobot.resources.utils.query` for basic querying (https://github.com/PyLabRobot/pylabrobot/commit/4a07f6a32a9a33d0370eb9c29015567c98aea002)
- `HamiltonLiquidHandler.allow_firmware_planning` to allow STAR/Vantage to plan complex liquid handling operations automatically (may break hardware agnosticity unexpectedly) (https://github.com/PyLabRobot/pylabrobot/pull/224)
- `size_z` and `nesting_z_height` for `Cor_96_wellplate_360ul_Fb_Lid` (https://github.com/PyLabRobot/pylabrobot/pull/226)
- `NestedTipRack` (https://github.com/PyLabRobot/pylabrobot/pull/228)
- `HTF_L_ULTRAWIDE`, `ultrawide_high_volume_tip_with_filter` (https://github.com/PyLabRobot/pylabrobot/pull/229/)
- `HTF_ULTRAWIDE`, `ultrawide_high_volume_tip_with_filter` (https://github.com/PyLabRobot/pylabrobot/pull/229/)
- `get_absolute_size_x`, `get_absolute_size_y`, `get_absolute_size_z` for `Resource` (https://github.com/PyLabRobot/pylabrobot/pull/235)
- `Cytation5Backend` for plate reading on BioTek Cytation 5 (https://github.com/PyLabRobot/pylabrobot/pull/238)
- imaging (https://github.com/PyLabRobot/pylabrobot/pull/277)
Expand All @@ -93,6 +93,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- `ThermoScientific_96_DWP_1200ul_Rd` in favor of `Thermo_TS_96_wellplate_1200ul_Rb` (https://github.com/PyLabRobot/pylabrobot/pull/215)
- `Azenta4titudeFrameStar_96_wellplate_skirted` in favor of `Azenta4titudeFrameStar_96_wellplate_200ul_Vb` (https://github.com/PyLabRobot/pylabrobot/pull/205/)
- `Cos_96_DWP_2mL_Vb` in favor of `Cos_96_wellplate_2mL_Vb (https://github.com/PyLabRobot/pylabrobot/pull/205/)`
- Resource definitions with `_L` and `_P`, it is easy enough to use the stem and `.rotated(z=90)` for `_P` (https://github.com/PyLabRobot/pylabrobot/pull/288)

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions docs/user_guide/basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"- {class}`~pylabrobot.resources.ml_star.tip_carriers.TIP_CAR_480_A00` tip carrier\n",
"- {class}`~pylabrobot.resources.ml_star.plate_carriers.PLT_CAR_L5AC_A00` plate carrier\n",
"- {class}`~pylabrobot.resources.corning_costar.plates.Cor_96_wellplate_360ul_Fb` wells\n",
"- {class}`~pylabrobot.resources.ml_star.tip_racks.HTF_L` tips"
"- {class}`~pylabrobot.resources.ml_star.tip_racks.HTF` tips"
]
},
{
Expand All @@ -128,7 +128,7 @@
" TIP_CAR_480_A00,\n",
" PLT_CAR_L5AC_A00,\n",
" Cor_96_wellplate_360ul_Fb,\n",
" HTF_L,\n",
" HTF,\n",
")"
]
},
Expand All @@ -146,7 +146,7 @@
"outputs": [],
"source": [
"tip_car = TIP_CAR_480_A00(name=\"tip carrier\")\n",
"tip_car[0] = HTF_L(name=\"tips_01\")"
"tip_car[0] = HTF(name=\"tips_01\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/moving-channels-around.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
"outputs": [],
"source": [
"from pylabrobot.liquid_handling import LiquidHandler, STAR\n",
"from pylabrobot.resources import STARDeck, TIP_CAR_480_A00, HTF_L\n",
"from pylabrobot.resources import STARDeck, TIP_CAR_480_A00, HTF\n",
"\n",
"lh = LiquidHandler(backend=STAR(), deck=STARDeck())\n",
"await lh.setup()\n",
"\n",
"# assign a tip rack\n",
"tip_carrier = TIP_CAR_480_A00(name=\"tip_carrier\")\n",
"tip_carrier[0] = tip_rack = HTF_L(name=\"tip_rack\")\n",
"tip_carrier[0] = tip_rack = HTF(name=\"tip_rack\")\n",
"lh.deck.assign_child_resource(tip_carrier, rails=0)"
]
},
Expand Down
12 changes: 6 additions & 6 deletions docs/user_guide/using-the-visualizer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
" TIP_CAR_480_A00,\n",
" PLT_CAR_L5AC_A00,\n",
" Cor_96_wellplate_360ul_Fb,\n",
" HTF_L\n",
" HTF\n",
")"
]
},
Expand All @@ -155,11 +155,11 @@
"outputs": [],
"source": [
"tip_car = TIP_CAR_480_A00(name='tip carrier')\n",
"tip_car[0] = tip_rack1 = HTF_L(name='tips_01', with_tips=False)\n",
"tip_car[1] = tip_rack2 = HTF_L(name='tips_02', with_tips=False)\n",
"tip_car[2] = tip_rack3 = HTF_L(name='tips_03', with_tips=False)\n",
"tip_car[3] = tip_rack4 = HTF_L(name='tips_04', with_tips=False)\n",
"tip_car[4] = tip_rack5 = HTF_L(name='tips_05', with_tips=False)"
"tip_car[0] = tip_rack1 = HTF(name='tips_01', with_tips=False)\n",
"tip_car[1] = tip_rack2 = HTF(name='tips_02', with_tips=False)\n",
"tip_car[2] = tip_rack3 = HTF(name='tips_03', with_tips=False)\n",
"tip_car[3] = tip_rack4 = HTF(name='tips_04', with_tips=False)\n",
"tip_car[4] = tip_rack5 = HTF(name='tips_05', with_tips=False)"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/user_guide/using-trackers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"from pylabrobot.liquid_handling.backends.chatterbox_backend import ChatterboxBackend\n",
"from pylabrobot.resources import (\n",
" TIP_CAR_480_A00,\n",
" HTF_L,\n",
" HTF,\n",
" PLT_CAR_L5AC_A00,\n",
" Cor_96_wellplate_360ul_Fbate_360ul_Fb,\n",
" set_tip_tracking,\n",
Expand Down Expand Up @@ -105,7 +105,7 @@
"metadata": {},
"outputs": [],
"source": [
"tip_carrier[0] = tip_rack = HTF_L(name=\"tip rack\")"
"tip_carrier[0] = tip_rack = HTF(name=\"tip rack\")"
]
},
{
Expand Down Expand Up @@ -142,7 +142,7 @@
"metadata": {},
"outputs": [],
"source": [
"tip_carrier[1] = empty_tip_rack = HTF_L(name=\"empty tip rack\", with_tips=False)"
"tip_carrier[1] = empty_tip_rack = HTF(name=\"empty tip rack\", with_tips=False)"
]
},
{
Expand Down Expand Up @@ -996,4 +996,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
52 changes: 26 additions & 26 deletions pylabrobot/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,58 +50,58 @@ def list_resources():
return jsonify(
plates=[
"Cos_1536_10ul",
"Cos_1536_10ul_L",
"Cos_1536_10ul",
"Cos_1536_10ul_P",
"Cos_384_DW",
"Cos_384_DW_L",
"Cos_384_DW",
"Cos_384_DW_P",
"Cos_384_PCR",
"Cos_384_PCR_L",
"Cos_384_PCR",
"Cos_384_PCR_P",
"Cos_384_Sq",
"Cos_384_Sq_L",
"Cos_384_Sq",
"Cos_384_Sq_P",
"Cos_384_Sq_Rd",
"Cos_384_Sq_Rd_L",
"Cos_384_Sq_Rd",
"Cos_384_Sq_Rd_P",
"Cos_96_DW_1mL",
"Cos_96_DW_1mL_L",
"Cos_96_DW_1mL",
"Cos_96_DW_1mL_P",
"Cos_96_DW_2mL",
"Cos_96_DW_2mL_L",
"Cos_96_DW_2mL",
"Cos_96_DW_2mL_P",
"Cos_96_DW_500ul",
"Cos_96_DW_500ul_L",
"Cos_96_DW_500ul",
"Cos_96_DW_500ul_P",
"Cor_96_wellplate_360ul_Fb",
"Cor_96_wellplate_360ul_Fb_L",
"Cor_96_wellplate_360ul_Fb",
"Cor_96_wellplate_360ul_Fb_P",
"Cos_96_FL",
"Cos_96_Filter",
"Cos_96_Filter_L",
"Cos_96_Filter",
"Cos_96_Filter_P",
"Cos_96_Fl_L",
"Cos_96_Fl",
"Cos_96_Fl_P",
"Cos_96_HalfArea",
"Cos_96_HalfArea_L",
"Cos_96_HalfArea",
"Cos_96_HalfArea_P",
"Cos_96_PCR",
"Cos_96_PCR_L",
"Cos_96_PCR",
"Cos_96_PCR_P",
"Cos_96_ProtCryst",
"Cos_96_ProtCryst_L",
"Cos_96_ProtCryst",
"Cos_96_ProtCryst_P",
"Cos_96_Rd",
"Cos_96_Rd_L",
"Cos_96_Rd",
"Cos_96_Rd_P",
"Cos_96_SpecOps",
"Cos_96_SpecOps_L",
"Cos_96_SpecOps",
"Cos_96_SpecOps_P",
"Cos_96_UV",
"Cos_96_UV_L",
"Cos_96_UV",
"Cos_96_UV_P",
"Cos_96_Vb",
"Cos_96_Vb_L",
"Cos_96_Vb",
"Cos_96_Vb_P",
],
plate_carriers=[
Expand Down Expand Up @@ -197,21 +197,21 @@ def list_resources():
"TIP_CAR_NTR_A00",
],
tip_racks=[
"FourmlTF_L",
"FourmlTF",
"FourmlTF_P",
"FivemlT_L",
"FivemlT",
"FivemlT_P",
"HTF_L",
"HTF",
"HTF_P",
"HT_L",
"HT",
"HT_P",
"LTF_L",
"LTF",
"LTF_P",
"LT_L",
"LT",
"LT_P",
"STF_L",
"STF",
"STF_P",
"ST_L",
"ST",
"ST_P",
],
)
Expand Down
4 changes: 2 additions & 2 deletions pylabrobot/liquid_handling/backends/chatterbox_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
)
from pylabrobot.resources import (
Cor_96_wellplate_360ul_Fb,
HTF_L,
HTF,
Coordinate,
)
from pylabrobot.resources.hamilton import STARLetDeck
Expand All @@ -19,7 +19,7 @@ def setUp(self) -> None:
self.deck = STARLetDeck()
self.backend = LiquidHandlerChatterboxBackend(num_channels=8)
self.lh = LiquidHandler(self.backend, deck=self.deck)
self.tip_rack = HTF_L(name="tip_rack")
self.tip_rack = HTF(name="tip_rack")
self.deck.assign_child_resource(self.tip_rack, rails=3)
self.plate = Cor_96_wellplate_360ul_Fb(name="plate")
self.deck.assign_child_resource(self.plate, rails=9)
Expand Down
14 changes: 6 additions & 8 deletions pylabrobot/liquid_handling/backends/hamilton/STAR_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
TIP_CAR_480_A00,
TIP_CAR_288_C00,
PLT_CAR_L5AC_A00,
HT_P,
HTF_L,
HT,
HTF,
Cor_96_wellplate_360ul_Fb,
no_volume_tracking,
)
from pylabrobot.resources.hamilton import STARLetDeck
from pylabrobot.resources.ml_star import STF_L
from pylabrobot.resources.ml_star import STF

from tests.usb import MockDev, MockEndpoint

Expand Down Expand Up @@ -221,8 +221,8 @@ async def asyncSetUp(self):
self.lh = LiquidHandler(self.mockSTAR, deck=self.deck)

self.tip_car = TIP_CAR_480_A00(name="tip carrier")
self.tip_car[1] = self.tip_rack = STF_L(name="tip_rack_01")
self.tip_car[2] = self.tip_rack2 = HTF_L(name="tip_rack_02")
self.tip_car[1] = self.tip_rack = STF(name="tip_rack_01")
self.tip_car[2] = self.tip_rack2 = HTF(name="tip_rack_02")
self.deck.assign_child_resource(self.tip_car, rails=1)

self.plt_car = PLT_CAR_L5AC_A00(name="plate carrier")
Expand Down Expand Up @@ -900,12 +900,10 @@ async def test_discard_tips(self):
)

async def test_portrait_tip_rack_handling(self):
# Test with an alternative setup.

deck = STARLetDeck()
lh = LiquidHandler(self.mockSTAR, deck=deck)
tip_car = TIP_CAR_288_C00(name="tip carrier")
tip_car[0] = tr = HT_P(name="tips_01")
tip_car[0] = tr = HT(name="tips_01").rotated(z=90)
assert tr.rotation.z == 90
assert tr.location == Coordinate(82.6, 0, 0)
deck.assign_child_resource(tip_car, rails=2)
Expand Down
8 changes: 4 additions & 4 deletions pylabrobot/liquid_handling/backends/hamilton/vantage_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Coordinate,
TIP_CAR_480_A00,
PLT_CAR_L5AC_A00,
HT_L,
LT_L,
HT,
LT,
Cor_96_wellplate_360ul_Fb,
)
from pylabrobot.resources.hamilton import VantageDeck
Expand Down Expand Up @@ -244,8 +244,8 @@ async def asyncSetUp(self):
self.lh = LiquidHandler(self.mockVantage, deck=self.deck)

self.tip_car = TIP_CAR_480_A00(name="tip carrier")
self.tip_car[0] = self.tip_rack = HT_L(name="tip_rack_01")
self.tip_car[1] = self.small_tip_rack = LT_L(name="tip_rack_02")
self.tip_car[0] = self.tip_rack = HT(name="tip_rack_01")
self.tip_car[1] = self.small_tip_rack = LT(name="tip_rack_02")
self.deck.assign_child_resource(self.tip_car, rails=18)

self.plt_car = PLT_CAR_L5AC_A00(name="plate carrier")
Expand Down
4 changes: 2 additions & 2 deletions pylabrobot/liquid_handling/backends/http_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pylabrobot.resources import (
PLT_CAR_L5AC_A00,
TIP_CAR_480_A00,
HTF_L,
HTF,
Cor_96_wellplate_360ul_Fb,
no_tip_tracking,
no_volume_tracking,
Expand Down Expand Up @@ -74,7 +74,7 @@ async def asyncSetUp(self) -> None: # type: ignore

self.deck = STARLetDeck()
self.tip_carrier = TIP_CAR_480_A00(name="tip_carrier")
self.tip_carrier[0] = self.tip_rack = HTF_L(name="tiprack")
self.tip_carrier[0] = self.tip_rack = HTF(name="tiprack")
self.plate_carrier = PLT_CAR_L5AC_A00(name="plate_carrier")
self.plate_carrier[0] = self.plate = Cor_96_wellplate_360ul_Fb(name="plate")
self.deck.assign_child_resource(self.tip_carrier, rails=3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
TIP_CAR_480_A00,
PLT_CAR_L5AC_A00,
Cor_96_wellplate_360ul_Fb,
STF_L,
STF,
Coordinate,
no_tip_tracking,
no_volume_tracking,
Expand All @@ -27,7 +27,7 @@ async def asyncSetUp(self) -> None:
await self.lh.setup()

self.tip_car = TIP_CAR_480_A00(name="tip carrier")
self.tip_car[0] = self.tip_rack = STF_L(name="tip_rack_01")
self.tip_car[0] = self.tip_rack = STF(name="tip_rack_01")
self.deck.assign_child_resource(self.tip_car, rails=1)

self.plt_car = PLT_CAR_L5AC_A00(name="plate carrier")
Expand Down
Loading

0 comments on commit 15dce32

Please sign in to comment.