Skip to content

Commit

Permalink
j make innerwellgeometry a list of boundedsections
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Aug 12, 2024
1 parent be381d6 commit d1a65d2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
19 changes: 19 additions & 0 deletions api/tests/opentrons/protocol_runner/test_json_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
Group,
Metadata1,
WellDefinition,
BoundedSection,
InnerGeometrySection,
)
from opentrons_shared_data.protocol.models import (
protocol_schema_v6,
Expand Down Expand Up @@ -685,6 +687,23 @@ def _load_labware_definition_data() -> LabwareDefinition:
},
dimensions=Dimensions(yDimension=85.5, zDimension=100, xDimension=127.75),
cornerOffsetFromSlot=CornerOffsetFromSlot(x=0, y=0, z=0),
innerWellGeometry=[
BoundedSection(
geometry=InnerGeometrySection(
shape="hemisphere",
diameter=25,
),
top_height=10,
),
BoundedSection(
geometry=InnerGeometrySection(
shape="rectangular",
xDimension=5.6,
yDimension=6.5,
),
top_height=45,
),
],
brand=BrandData(brand="foo"),
metadata=Metadata(
displayName="Foo 8 Well Plate 33uL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,16 @@ class InnerGeometrySection(BaseModel):


class BoundedSection(BaseModel):
shape: InnerGeometrySection = Field(
geometry: InnerGeometrySection = Field(
...,
description="Geometrical layout of the geometry of a section of the inside of a well",
description="Geometrical information needed to calculate the volume of a subsection of a well",
)
top_height: _NonNegativeNumber = Field(
...,
description="The height at the top of a bounded subsection of a well"
)


class InnerLabwareGeometry(BaseModel):
boundedSections: List[BoundedSection]


class Metadata1(BaseModel):
"""
Metadata specific to a grid of wells in a labware
Expand Down Expand Up @@ -361,9 +357,9 @@ class LabwareDefinition(BaseModel):
default_factory=None,
description="Force, in Newtons, with which the gripper should grip the labware.",
)
innerWellGeometry: Optional[InnerLabwareGeometry] = Field(
...,
description="A layout describing the geometry of the inside of the wells.",
innerWellGeometry: Optional[List[BoundedSection]] = Field(
None,
description="A list of bounded sections describing the geometry of the inside of the wells.",
)


Expand Down
7 changes: 2 additions & 5 deletions shared-data/python/opentrons_shared_data/labware/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,10 @@ class HemisphereDimensions(TypedDict):
diameter: float


# This will either be a 2-Dimensional cross-section or a hemisphere
InnerGeometrySection = Union[CircularArea, RectangularArea, HemisphereDimensions]


class BoundedSection(TypedDict):
shape: InnerGeometrySection
geometry: InnerGeometrySection
top_height: float


class InnerLabwareGeometry(TypedDict):
bounded_sections: List[BoundedSection]

0 comments on commit d1a65d2

Please sign in to comment.