Skip to content

Commit

Permalink
fixup: add LabwareOffset back to create request model
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous committed Nov 9, 2021
1 parent 6a2fce1 commit bec64ca
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions robot-server/robot_server/runs/run_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ class LabwareOffset(BaseModel):
pipette movements that use that labware as a reference point.
"""

id: str = Field(..., description="Unique labware offset record identifier.")
definitionUri: str = Field(..., description="The URI for the labware's definition.")
location: LabwareLocation = Field(
..., description="Where the labware is located on the robot."
...,
description="Where the labware is located on the robot.",
)
offset: LabwareOffsetVector = Field(
..., description="The offset applied to matching labware."
...,
description="The offset applied to matching labware.",
)


Expand Down Expand Up @@ -90,13 +93,31 @@ class Run(ResourceModel):
)


class LabwareOffsetCreate(BaseModel):
"""Create request data for a labware offset."""

definitionUri: str = Field(..., description="The URI for the labware's definition.")
location: LabwareLocation = Field(
...,
description="Where the labware is located on the robot.",
)
offset: LabwareOffsetVector = Field(
...,
description="The offset applied to matching labware.",
)


class RunCreate(BaseModel):
"""Create request data for a new run."""

protocolId: Optional[str] = Field(
None,
description="Protocol resource ID that this run will be using, if applicable.",
)
labwareOffsets: List[LabwareOffsetCreate] = Field(
default_factory=list,
description="Labware offsets to apply as labware are loaded.",
)


class RunUpdate(BaseModel):
Expand Down

0 comments on commit bec64ca

Please sign in to comment.