-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(robot-server,app): extend pipette offset cal to include tip length cal if needed #6641
Conversation
…th cal if needed Add functionality to the pipette offset calibration user flow to allow a user to set the tip length for the pipette-tip combination that they intend to use for the pipette offset calibration. Add branching and assertion logic to guide the state transitions in the user flow accordingly. Also add the last of the tip length cal child components to the shared calibration panels and map to them from the new pipette offset calibration states when appropriate. Closes #6420
# recache tip length cal which has just been saved | ||
self._has_calibrated_tip_length: bool =\ | ||
self._get_stored_tip_length_cal() is not None | ||
if self._saved_offset_this_session: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only save the data if it's a legal transition
Codecov Report
@@ Coverage Diff @@
## edge #6641 +/- ##
=======================================
Coverage ? 89.03%
=======================================
Files ? 101
Lines ? 4505
Branches ? 0
=======================================
Hits ? 4011
Misses ? 494
Partials ? 0
Continue to review full report at Codecov.
|
|
||
self._saved_offset_this_session = False | ||
self._current_state = State.sessionStarted | ||
self._state_machine = PipetteOffsetCalibrationStateMachine() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try implementing loading one of two different state machines instead of doing checks in the handlers
@@ -44,12 +46,19 @@ const contentsBySessionType: { [SessionType]: { headerText: string } } = { | |||
} | |||
|
|||
export function CompleteConfirmation(props: CalibrationPanelProps): React.Node { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add an intermediate complete state we can get rid of the bool
TRASH_WELL = 'A1' | ||
TRASH_REF_POINT_OFFSET = Point(-57.84, -55, 0) # offset from center of trash | ||
|
||
CAL_BLOCK_SETUP_BY_MOUNT: Dict[Mount, Dict[str, str]] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a nit but the actual lef elements here (the dicts that contain load_name
slot
and wells
should probably be a dataclass IMO
self._nozzle_height_at_reference: Optional[float] = None | ||
|
||
self._load_tiprack(tip_rack_def) | ||
self._has_calibrated_tip_length: bool =\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this only happens if there is no stored tip length calibration for this pipette/tiprack combo, right?
I don't think that works with the labware-cal-initiated tip length _re_calibration. If you have a valid TLC that you want to redo, the only way for the system to accomplish that would be to DELETE it using the HTTP endpoint and then start this flow. But if you then decide to skip it, there's no more calibration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically we may want a flag as a create param that is like "force tip length recalibration"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with the code!
@@ -12,6 +12,14 @@ class SessionCreateParams(BaseModel): | |||
..., | |||
description='The mount on which the pipette is attached, left or right' | |||
) | |||
tipLengthLoad: bool = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this variable is a little confusing to me. Is it a boolean of "should Perform TLC prior to pipette offset cal"? If so, maybe something like shouldCalibrateTipLength
would be clearer?
Overview
Add functionality to the pipette offset calibration user flow to allow a user to set the tip length
for the pipette-tip combination that they intend to use for the pipette offset calibration. Add
branching and assertion logic to guide the state transitions in the user flow accordingly. Also add
the last of the tip length cal child components to the shared calibration panels and map to them
from the new pipette offset calibration states when appropriate.
Closes #6420
Changelog
Review requests
Risk assessment
low risk, code still behind feature flag, though pipette offset and tip length cal flows were both effected