Skip to content

Commit

Permalink
change hemisphere to spherical segment
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Aug 14, 2024
1 parent d651fd4 commit 8fde331
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
8 changes: 4 additions & 4 deletions api/tests/opentrons/protocol_runner/test_json_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
BoundedSection,
RectangularCrossSection,
InnerLabwareGeometry,
Hemisphere,
SphericalSegment,
)
from opentrons_shared_data.protocol.models import (
protocol_schema_v6,
Expand Down Expand Up @@ -708,9 +708,9 @@ def _load_labware_definition_data() -> LabwareDefinition:
topHeight=20,
),
],
bottomShape=Hemisphere(
shape="hemispherical",
diameter=6,
bottomShape=SphericalSegment(
shape="spherical",
radius_of_curvature=6,
depth=10,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,21 +245,19 @@ class RectangularCrossSection(BaseModel):
)


class Hemisphere(BaseModel):
shape: Literal["hemispherical"] = Field(
..., description="Denote shape as hemispherical"
)
diameter: _NonNegativeNumber = Field(
class SphericalSegment(BaseModel):
shape: Literal["spherical"] = Field(..., description="Denote shape as spherical")
radius_of_curvature: _NonNegativeNumber = Field(
...,
description="diameter of bottom subsection of wells",
description="radius of curvature of bottom subsection of wells",
)
depth: _NonNegativeNumber = Field(
..., description="The depth of a hemispherical bottom of a well"
..., description="The depth of a spherical bottom of a well"
)


TopCrossSection = Union[CircularCrossSection, RectangularCrossSection]
BottomShape = Union[CircularCrossSection, RectangularCrossSection, Hemisphere]
BottomShape = Union[CircularCrossSection, RectangularCrossSection, SphericalSegment]


class BoundedSection(BaseModel):
Expand Down Expand Up @@ -310,7 +308,7 @@ class InnerLabwareGeometry(BaseModel):
)
bottomShape: BottomShape = Field(
...,
description="The shape at the bottom of the well: either a hemisphere or a cross-section",
description="The shape at the bottom of the well: either a spherical segment or a cross-section",
discriminator="shape",
)

Expand Down
11 changes: 6 additions & 5 deletions shared-data/python/opentrons_shared_data/labware/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

Circular = Literal["circular"]
Rectangular = Literal["rectangular"]
Hemispherical = Literal["hemispherical"]
Spherical = Literal["spherical"]
WellShape = Union[Circular, Rectangular]


Expand Down Expand Up @@ -129,13 +129,14 @@ class RectangularCrossSection(TypedDict):
yDimension: float


class Hemisphere(TypedDict):
shape: Hemispherical
diameter: float
class SphericalSegment(TypedDict):
shape: Spherical
radius_of_curvature: float
depth: float


TopCrossSection = Union[CircularCrossSection, RectangularCrossSection]
BottomShape = Union[CircularCrossSection, RectangularCrossSection, Hemispherical]
BottomShape = Union[CircularCrossSection, RectangularCrossSection, Spherical]


class BoundedSection(TypedDict):
Expand Down

0 comments on commit 8fde331

Please sign in to comment.