Skip to content

v1 STAR and Prep tip commands: a rack no head can reach is refused - #1472

Merged
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:tiprack-is-accessible
Oct 7, 2026
Merged

BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:tiprack-is-accessible

Conversation

@BioCam

@BioCam BioCam commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

The Problem

The legacy LiquidHandler refuses to pick up from, or drop into, a tip rack with a lid on or with another rack standing on it (#1288). The v1 STAR and Prep drivers do not: handed the bottom rack of a stack of four nested racks, pick_up_tips sends the command, on the channels and on the 96-head. The check behind legacy's refusal is TipRack._available_for_tip_handling, a private property, so no driver and no library function may ask it - which is also why find_tip_spots (#1381) returns spots from every rack of a stack, covered ones included.

PR Content/Solution

  • TipRack.available_for_tip_handling, public: a rack is available when it is placed, has no lid on, and no other rack stands on it in its z-growing stack. Only "placed" is new; the rest is StandingTipRack: a tip rack that stands on its own, and can nest in a stack #1288's check
  • the private name is gone, two weeks after it went in and before any release carried it; legacy's one caller reads the public property
  • check_tip_racks_available(tip_spots, action) in resources.tip_rack raises ValueError for a rack that is not available, asking each rack once
  • pick_up_tips and drop_tips call it before anything is sent: Pipettes and Head96 on the STAR, Pipettes and Head8 on the Prep. return_tips, the tip presence probes and consolidate_tip_inventory go through them
  • find_tip_spots(..., available_for_tip_handling=...), a selection argument like has_tip: True for spots in racks a head can reach, False for the others, None for both. None is the default and it is the last argument, so every existing call returns what it did
stack = ResourceStack("ntr_stack", "z")
carrier[0] = stack
for level in range(4):
  stack.assign_child_resource(hamilton_96_tiprack_300uL_NTR(name=f"ntr_{level}"))

await star.head96.pick_up_tips(deck.get_resource("ntr_0"))
# on main: C0EP is sent
# here: ValueError: Cannot pick up tips from 'ntr_0': it is not available for tip handling.

find_tip_spots(deck, has_tip=True, count=8, x_aligned=True, available_for_tip_handling=True)  # ntr_3

Tests: pipettes_tests and head_tests on the STAR, pipettes_tests and head8_tests on the Prep - a rack with a lid on is refused for pick-up and for drop, and nothing is sent; tip_rack_tests - a rack placed nowhere is not available; tip_spot_finding_tests - on a stack of two racks None gives both racks' spots, True the top rack's, False the lower one's.

🤖 Generated with Claude Code

@BioCam BioCam changed the title find_tip_spots: only racks available for tip handling are searched TipRack.available_for_tip_handling: a public property, and find_tip_spots asks it Oct 6, 2026
@BioCam
BioCam force-pushed the tiprack-is-accessible branch from c623623 to 9c0420d Compare October 7, 2026 08:16
@BioCam BioCam changed the title TipRack.available_for_tip_handling: a public property, and find_tip_spots asks it TipRack.available_for_tip_handling: a public property, and find_tip_spots selects by it Oct 7, 2026
@BioCam
BioCam force-pushed the tiprack-is-accessible branch from 9c0420d to 453bbaf Compare October 7, 2026 08:40
@BioCam
BioCam marked this pull request as ready for review October 7, 2026 09:12
@BioCam
BioCam requested a review from a team as a code owner October 7, 2026 09:12
@BioCam
BioCam force-pushed the tiprack-is-accessible branch 2 times, most recently from dc8beb3 to c6ef285 Compare October 7, 2026 09:45
@BioCam BioCam changed the title TipRack.available_for_tip_handling: a public property, and find_tip_spots selects by it v1 STAR and Prep tip commands: a rack no head can reach is refused Oct 7, 2026
@BioCam
BioCam force-pushed the tiprack-is-accessible branch 2 times, most recently from b26cc98 to d2572d9 Compare October 7, 2026 09:51
The legacy `LiquidHandler` refuses to pick up from, or drop into, a tip rack with a lid on
or with another rack standing on it. The v1 `STAR` and Prep drivers do not: handed the
bottom rack of a stack of four, `pick_up_tips` sends the command. The check behind
legacy's refusal is a private property on `TipRack` that nothing else may read.

- `TipRack.available_for_tip_handling` is that property, public: a rack is available when
  it is placed, has no lid on, and no other rack stands on it in its stack. The private
  name goes; legacy's one caller reads the public one.
- `check_tip_racks_available(tip_spots, action)` raises for a rack that is not available,
  asking each rack once.
- `pick_up_tips` and `drop_tips` call it before anything is sent: on the `STAR`'s channels
  and 96-head, and on the Prep's channels and head8.
- `find_tip_spots(..., available_for_tip_handling=True)` returns spots only from racks a
  head can reach, `False` only from those it cannot, and `None`, the default, from both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BioCam
BioCam force-pushed the tiprack-is-accessible branch from d2572d9 to 31fd153 Compare October 7, 2026 10:05
@BioCam BioCam changed the title v1 STAR and Prep tip commands: a rack no head can reach is refused v1 STAR and Prep tip commands: a rack no head can reach is refused Oct 7, 2026
@BioCam
BioCam merged commit d5dc1f0 into PyLabRobot:main Oct 7, 2026
23 checks passed
@BioCam
BioCam deleted the tiprack-is-accessible branch October 7, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant