Skip to content
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

feat(shared-data): Convert GEN1/GEN2 pipettes to the new shared-data schema #12148

Merged
merged 13 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
# These files are binary and line endings should be left untouched
*.hex binary
*.bat binary
*.gltf binary
api/pypi-readme.rst text eol=lf
10 changes: 7 additions & 3 deletions api/tests/opentrons/config/test_ot3_pipette_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ def test_multiple_tip_configurations() -> None:
model_version = pc.PipetteModelVersionType(
PipetteModelType.p1000,
PipetteChannelType.EIGHT_CHANNEL,
PipetteVersionType(1, 0),
PipetteVersionType(3, 3),
)
loaded_configuration = pc.load_ot3_pipette(model_version)
assert list(loaded_configuration.supported_tips.keys()) == list(PipetteTipType)
assert list(loaded_configuration.supported_tips.keys()) == [
PipetteTipType.t50,
PipetteTipType.t200,
PipetteTipType.t1000,
]
assert isinstance(
loaded_configuration.supported_tips[PipetteTipType.t50],
SupportedTipsDefinition,
Expand All @@ -33,7 +37,7 @@ def test_multiple_tip_configurations() -> None:

@pytest.mark.parametrize(
argnames=["model", "channels", "version"],
argvalues=[["p50", 8, (1, 0)], ["p1000", 96, (1, 0)], ["p50", 1, (1, 0)]],
argvalues=[["p50", 8, (3, 3)], ["p1000", 96, (3, 3)], ["p50", 1, (1, 0)]],
)
def test_load_full_pipette_configurations(
model: str, channels: int, version: Tuple[int, int]
Expand Down
6 changes: 3 additions & 3 deletions api/tests/opentrons/hardware_control/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def dummy_instruments():
def dummy_instruments_attached_ot3():
return {
types.Mount.LEFT: {
"model": "p1000_single_v3.0",
"model": "p1000_single_v3.3",
"id": "testy",
"name": "p1000_single_gen3",
},
Expand Down Expand Up @@ -673,12 +673,12 @@ async def test_blowout_flow_rate(sim_and_instr):
async def test_reset_instruments(monkeypatch, sim_and_instr):
instruments = {
types.Mount.LEFT: {
"model": "p1000_single_v3.0",
"model": "p1000_single_v3.3",
"id": "testy",
"name": "p1000_single_gen3",
},
types.Mount.RIGHT: {
"model": "p1000_single_v3.0",
"model": "p1000_single_v3.3",
"id": "testy",
"name": "p1000_single_gen3",
},
Expand Down
16 changes: 8 additions & 8 deletions api/tests/opentrons/hardware_control/test_ot3_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ async def mock_instrument_handlers(
(
(
{
OT3Mount.RIGHT: {"channels": 8, "version": (1, 0), "model": "p50"},
OT3Mount.LEFT: {"channels": 1, "version": (1, 0), "model": "p1000"},
OT3Mount.RIGHT: {"channels": 8, "version": (3, 3), "model": "p50"},
OT3Mount.LEFT: {"channels": 1, "version": (3, 3), "model": "p1000"},
},
GantryLoad.TWO_LOW_THROUGHPUT,
),
Expand All @@ -173,34 +173,34 @@ async def mock_instrument_handlers(
GantryLoad.GRIPPER,
),
(
{OT3Mount.LEFT: {"channels": 8, "version": (1, 0), "model": "p1000"}},
{OT3Mount.LEFT: {"channels": 8, "version": (3, 3), "model": "p1000"}},
GantryLoad.LOW_THROUGHPUT,
),
(
{OT3Mount.RIGHT: {"channels": 8, "version": (1, 0), "model": "p1000"}},
{OT3Mount.RIGHT: {"channels": 8, "version": (3, 3), "model": "p1000"}},
GantryLoad.LOW_THROUGHPUT,
),
(
{OT3Mount.LEFT: {"channels": 96, "model": "p1000", "version": (1, 0)}},
{OT3Mount.LEFT: {"channels": 96, "model": "p1000", "version": (3, 3)}},
GantryLoad.HIGH_THROUGHPUT,
),
(
{
OT3Mount.LEFT: {"channels": 1, "version": (1, 0), "model": "p1000"},
OT3Mount.LEFT: {"channels": 1, "version": (3, 3), "model": "p1000"},
OT3Mount.GRIPPER: {"model": GripperModel.v1, "id": "g12345"},
},
GantryLoad.LOW_THROUGHPUT,
),
(
{
OT3Mount.RIGHT: {"channels": 8, "version": (1, 0), "model": "p1000"},
OT3Mount.RIGHT: {"channels": 8, "version": (3, 3), "model": "p1000"},
OT3Mount.GRIPPER: {"model": GripperModel.v1, "id": "g12345"},
},
GantryLoad.LOW_THROUGHPUT,
),
(
{
OT3Mount.LEFT: {"channels": 96, "model": "p1000", "version": (1, 0)},
OT3Mount.LEFT: {"channels": 96, "model": "p1000", "version": (3, 3)},
OT3Mount.GRIPPER: {"model": GripperModel.v1, "id": "g12345"},
},
GantryLoad.HIGH_THROUGHPUT,
Expand Down
4 changes: 2 additions & 2 deletions api/tests/opentrons/hardware_control/test_ot3_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@pytest.mark.parametrize(
"pipette_model", ["p1000_single_v3.0", "p1000_single_v3.1", "p50_multi_v3.1"]
"pipette_model", ["p1000_single_v3.3", "p1000_single_v3.3", "p50_multi_v3.3"]
)
async def test_transforms_roundtrip(pipette_model):
attached = {
Expand All @@ -30,7 +30,7 @@ async def test_transforms_roundtrip(pipette_model):


@pytest.mark.parametrize(
"pipette_model", ["p1000_single_v3.0", "p50_single_v3.1", "p1000_multi_v3.1"]
"pipette_model", ["p1000_single_v3.3", "p50_single_v3.3", "p1000_multi_v3.3"]
)
async def test_transform_values(pipette_model):
attached = {
Expand Down
8 changes: 4 additions & 4 deletions api/tests/opentrons/hardware_control/test_pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_tip_tracking(
[lazy_fixture("hardware_pipette_ot2"), "p10_single_v1", Point(0, 0, 12.0)],
[
lazy_fixture("hardware_pipette_ot3"),
ot3_pipette_config.convert_pipette_model("p1000_single_v1.0"),
ot3_pipette_config.convert_pipette_model("p1000_single_v3.3"),
Point(-8.0, -22.0, -259.15),
],
],
Expand Down Expand Up @@ -277,19 +277,19 @@ def test_flow_rate_setting(
],
[
lazy_fixture("hardware_pipette_ot3"),
ot3_pipette_config.convert_pipette_model("p1000_single_v1.0"),
ot3_pipette_config.convert_pipette_model("p1000_single_v3.3"),
Point(-8.0, -22.0, -259.15),
Point(-8.0, -22.0, -259.15),
],
[
lazy_fixture("hardware_pipette_ot3"),
ot3_pipette_config.convert_pipette_model("p1000_multi_v1.0"),
ot3_pipette_config.convert_pipette_model("p1000_multi_v3.3"),
Point(-8.0, -47.5, -259.15),
Point(-8.0, -79.0, -259.15),
],
[
lazy_fixture("hardware_pipette_ot3"),
ot3_pipette_config.convert_pipette_model("p1000_96", "1.0"),
ot3_pipette_config.convert_pipette_model("p1000_96", "3.3"),
Point(13.5, -46.5, -259.15),
Point(-36.0, -88.5, -259.15),
],
Expand Down
6 changes: 3 additions & 3 deletions shared-data/js/__tests__/pipetteSchemaV2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('test schema against all liquid specs definitions', () => {
})

it(`parent dir matches pipette model: ${liquidPath}`, () => {
expect(['p50', 'p1000']).toContain(
expect(['p10', 'p20', 'p50', 'p300', 'p1000']).toContain(
path.basename(path.dirname(liquidPath))
)
})
Expand All @@ -73,7 +73,7 @@ describe('test schema against all geometry specs definitions', () => {
})

it(`parent dir matches pipette model: ${geometryPath}`, () => {
expect(['p50', 'p1000']).toContain(
expect(['p10', 'p20', 'p50', 'p300', 'p1000']).toContain(
path.basename(path.dirname(geometryPath))
)
})
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('test schema against all general specs definitions', () => {
})

it(`parent dir matches pipette model: ${generalPath}`, () => {
expect(['p50', 'p1000']).toContain(
expect(['p10', 'p20', 'p50', 'p300', 'p1000']).toContain(
path.basename(path.dirname(generalPath))
)
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$otSharedSchema": "#/pipette/schemas/2/pipettePropertiesSchema.json",
"displayName": "P10 8-Channel GEN1",
"model": "p10",
"displayCategory": "GEN1",
"pickUpTipConfigurations": {
"current": 0.4,
"speed": 30.0,
"presses": 3,
"increment": 1.0,
"distance": 10.0
},
"dropTipConfigurations": {
"current": 0.5,
"speed": 5.0,
"presses": 0,
"increment": 0.0,
"distance": 0.0
},
"plungerMotorConfigurations": { "idle": 0.5, "run": 0.5 },
"plungerPositionsConfigurations": {
"top": 19.5,
"bottom": 2.0,
"blowout": -1.0,
"drop": -4.0
},
"availableSensors": { "sensors": [] },
"partialTipConfigurations": {
"partialTipSupported": true,
"availableConfigurations": [1, 2, 3, 4, 5, 6, 7, 8]
},
"channels": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$otSharedSchema": "#/pipette/schemas/2/pipettePropertiesSchema.json",
"displayName": "P10 8-Channel GEN1",
"model": "p10",
"displayCategory": "GEN1",
"pickUpTipConfigurations": {
"current": 0.4,
"speed": 30.0,
"presses": 3,
"increment": 1.0,
"distance": 10.0
},
"dropTipConfigurations": {
"current": 0.5,
"speed": 5.0,
"presses": 0,
"increment": 0.0,
"distance": 0.0
},
"plungerMotorConfigurations": { "idle": 0.5, "run": 0.5 },
"plungerPositionsConfigurations": {
"top": 19.5,
"bottom": 0.5,
"blowout": -2.5,
"drop": -5.5
},
"availableSensors": { "sensors": [] },
"partialTipConfigurations": {
"partialTipSupported": true,
"availableConfigurations": [1, 2, 3, 4, 5, 6, 7, 8]
},
"channels": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$otSharedSchema": "#/pipette/schemas/2/pipettePropertiesSchema.json",
"displayName": "P10 8-Channel GEN1",
"model": "p10",
"displayCategory": "GEN1",
"pickUpTipConfigurations": {
"current": 0.4,
"speed": 30.0,
"presses": 3,
"increment": 1.0,
"distance": 10.0
},
"dropTipConfigurations": {
"current": 0.5,
"speed": 5.0,
"presses": 0,
"increment": 0.0,
"distance": 0.0
},
"plungerMotorConfigurations": { "idle": 0.5, "run": 0.5 },
"plungerPositionsConfigurations": {
"top": 19.5,
"bottom": 2.0,
"blowout": -1.0,
"drop": -4.5
},
"availableSensors": { "sensors": [] },
"partialTipConfigurations": {
"partialTipSupported": true,
"availableConfigurations": [1, 2, 3, 4, 5, 6, 7, 8]
},
"channels": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$otSharedSchema": "#/pipette/schemas/2/pipettePropertiesSchema.json",
"displayName": "P10 8-Channel GEN1",
"model": "p10",
"displayCategory": "GEN1",
"pickUpTipConfigurations": {
"current": 0.55,
"speed": 30.0,
"presses": 3,
"increment": 3.0,
"distance": 10.0
},
"dropTipConfigurations": {
"current": 0.5,
"speed": 5.0,
"presses": 0,
"increment": 0.0,
"distance": 0.0
},
"plungerMotorConfigurations": { "idle": 0.5, "run": 0.5 },
"plungerPositionsConfigurations": {
"top": 19.5,
"bottom": 2.0,
"blowout": -1.0,
"drop": -4.5
},
"availableSensors": { "sensors": [] },
"partialTipConfigurations": {
"partialTipSupported": true,
"availableConfigurations": [1, 2, 3, 4, 5, 6, 7, 8]
},
"channels": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$otSharedSchema": "#/pipette/schemas/2/pipettePropertiesSchema.json",
"displayName": "P10 8-Channel GEN1",
"model": "p10",
"displayCategory": "GEN1",
"pickUpTipConfigurations": {
"current": 0.55,
"speed": 30.0,
"presses": 3,
"increment": 3.0,
"distance": 10.0
},
"dropTipConfigurations": {
"current": 0.5,
"speed": 5.0,
"presses": 0,
"increment": 0.0,
"distance": 0.0
},
"plungerMotorConfigurations": { "idle": 0.5, "run": 0.5 },
"plungerPositionsConfigurations": {
"top": 19.5,
"bottom": 2.0,
"blowout": -1.0,
"drop": -4.5
},
"availableSensors": { "sensors": [] },
"partialTipConfigurations": {
"partialTipSupported": true,
"availableConfigurations": [1, 2, 3, 4, 5, 6, 7, 8]
},
"channels": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$otSharedSchema": "#/pipette/schemas/2/pipettePropertiesSchema.json",
"displayName": "P20 8-Channel GEN2",
"model": "p20",
"displayCategory": "GEN2",
"pickUpTipConfigurations": {
"current": 0.6,
"speed": 10.0,
"presses": 1,
"increment": 0.0,
"distance": 11.0
},
"dropTipConfigurations": {
"current": 1.25,
"speed": 15.0,
"presses": 0,
"increment": 0.0,
"distance": 0.0
},
"plungerMotorConfigurations": { "idle": 0.3, "run": 1.0 },
"plungerPositionsConfigurations": {
"top": 19.5,
"bottom": -8.5,
"blowout": -13.0,
"drop": -31.6
},
"availableSensors": { "sensors": [] },
"partialTipConfigurations": {
"partialTipSupported": true,
"availableConfigurations": [1, 2, 3, 4, 5, 6, 7, 8]
},
"channels": 8
}
Loading