-
Notifications
You must be signed in to change notification settings - Fork 186
refactor(api, shared-data): liquid class tiprack schema change #18958
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
base: edge
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,11 @@ | |
from pydantic import Field | ||
|
||
from opentrons_shared_data.liquid_classes.liquid_class_definition import ( | ||
ByTipTypeSetting, | ||
TransferProperties, | ||
) | ||
|
||
|
||
class LiquidClassRecord(ByTipTypeSetting, frozen=True): | ||
class LiquidClassRecord(TransferProperties, frozen=True): | ||
"""LiquidClassRecord is our internal representation of an (immutable) liquid class. | ||
|
||
Conceptually, a liquid class record is the tuple (name, pipette, tip, transfer properties). | ||
|
@@ -17,6 +17,11 @@ class LiquidClassRecord(ByTipTypeSetting, frozen=True): | |
This class defines the tuple via inheritance so that we can reuse the definitions from shared_data. | ||
""" | ||
|
||
tiprack: str = Field( | ||
..., | ||
description="The name of tiprack whose tip will be used" | ||
" when handling this specific liquid class with this pipette", | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Move this down so that the entries here are ordered as |
||
liquidClassName: str = Field( | ||
..., | ||
description="Identifier for the liquid of this liquid class, e.g. glycerol50.", | ||
|
@@ -25,7 +30,7 @@ class LiquidClassRecord(ByTipTypeSetting, frozen=True): | |
..., | ||
description="Identifier for the pipette of this liquid class.", | ||
) | ||
# The other fields like tiprack ID, aspirate properties, etc. are pulled in from ByTipTypeSetting. | ||
# The other liquid class properties are pulled in from TransferProperties. | ||
|
||
def __hash__(self) -> int: | ||
"""Hash function for LiquidClassRecord.""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -825,7 +825,7 @@ def minimal_liquid_class_def2() -> LiquidClassSchemaV1: | |
pipetteModel="flex_1channel_50", | ||
byTipType=[ | ||
ByTipTypeSetting( | ||
tiprack="opentrons_flex_96_tiprack_50ul", | ||
tiprack=["opentrons_flex_96_tiprack_50ul"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder how much more would break if you changed the name to |
||
aspirate=AspirateProperties( | ||
submerge=Submerge( | ||
startPosition=TipPosition( | ||
|
@@ -912,7 +912,7 @@ def maximal_liquid_class_def() -> LiquidClassSchemaV1: | |
pipetteModel="flex_1channel_50", | ||
byTipType=[ | ||
ByTipTypeSetting( | ||
tiprack="opentrons_flex_96_tiprack_50ul", | ||
tiprack=["opentrons_flex_96_tiprack_50ul"], | ||
aspirate=AspirateProperties( | ||
submerge=Submerge( | ||
startPosition=TipPosition( | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
Ya I think we should copy the transfer props instead of using the same, because otherwise multiple tipracks will have reference to the same transfer props object. This will cause problems like this-