Skip to content

Commit

Permalink
Renamed LiquidClassTouchTipParams
Browse files Browse the repository at this point in the history
  • Loading branch information
ddcc4 committed Nov 15, 2024
1 parent 1f97012 commit d0c98c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 5 additions & 5 deletions shared-data/command/schemas/11.json
Original file line number Diff line number Diff line change
Expand Up @@ -1833,8 +1833,8 @@
},
"required": ["positionReference", "offset", "speed", "delay"]
},
"opentrons_shared_data__liquid_classes__liquid_class_definition__TouchTipParams": {
"title": "TouchTipParams",
"LiquidClassTouchTipParams": {
"title": "LiquidClassTouchTipParams",
"description": "Parameters for touch-tip.",
"type": "object",
"properties": {
Expand Down Expand Up @@ -1894,7 +1894,7 @@
"description": "Parameters for the touch-tip function.",
"allOf": [
{
"$ref": "#/definitions/opentrons_shared_data__liquid_classes__liquid_class_definition__TouchTipParams"
"$ref": "#/definitions/LiquidClassTouchTipParams"
}
]
}
Expand Down Expand Up @@ -3619,7 +3619,7 @@
},
"required": ["params"]
},
"opentrons__protocol_engine__commands__touch_tip__TouchTipParams": {
"TouchTipParams": {
"title": "TouchTipParams",
"description": "Payload needed to touch a pipette tip the sides of a specific well.",
"type": "object",
Expand Down Expand Up @@ -3674,7 +3674,7 @@
"type": "string"
},
"params": {
"$ref": "#/definitions/opentrons__protocol_engine__commands__touch_tip__TouchTipParams"
"$ref": "#/definitions/TouchTipParams"
},
"intent": {
"description": "The reason the command was added. If not specified or `protocol`, the command will be treated as part of the protocol run itself, and added to the end of the existing command queue.\n\nIf `setup`, the command will be treated as part of run setup. A setup command may only be enqueued if the run has not started.\n\nUse setup commands for activities like pre-run calibration checks and module setup, like pre-heating.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ def _validate_params(
return v


class TouchTipParams(BaseModel):
class LiquidClassTouchTipParams(BaseModel):
"""Parameters for touch-tip."""

# Note: Do not call this `TouchTipParams`, because that class name is used by the
# unrelated touchTip command in PE. Both classes are exported to things like the
# command schema JSON files, so the classes can't have the same name.

zOffset: _Number = Field(
...,
description="Offset from the top of the well for touch-tip, in millimeters.",
Expand All @@ -101,14 +105,14 @@ class TouchTipProperties(BaseModel):
"""Shared properties for the touch-tip function."""

enable: bool = Field(..., description="Whether touch-tip is enabled.")
params: Optional[TouchTipParams] = Field(
params: Optional[LiquidClassTouchTipParams] = Field(
None, description="Parameters for the touch-tip function."
)

@validator("params")
def _validate_params(
cls, v: Optional[TouchTipParams], values: Dict[str, Any]
) -> Optional[TouchTipParams]:
cls, v: Optional[LiquidClassTouchTipParams], values: Dict[str, Any]
) -> Optional[LiquidClassTouchTipParams]:
if v is None and values["enable"]:
raise ValueError(
"If enable is true parameters for touch tip must be defined."
Expand Down

0 comments on commit d0c98c8

Please sign in to comment.