Skip to content

Commit 1d4e524

Browse files
committed
refactor(api, shared-data): remove extents from addressable areas
1 parent 3b41638 commit 1d4e524

File tree

12 files changed

+4
-1482
lines changed

12 files changed

+4
-1482
lines changed

api/src/opentrons/protocol_engine/resources/deck_configuration_provider.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ def get_addressable_area_from_name(
136136
"compatibleModuleTypes", []
137137
),
138138
features=features,
139-
extents={
140-
"total": {
141-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
142-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
143-
},
144-
},
145139
)
146140
raise AddressableAreaDoesNotExistError(
147141
f"Could not find addressable area with name {addressable_area_name}"

api/src/opentrons/protocol_engine/state/addressable_areas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,6 @@ def get_slot_definition(self, slot_id: str) -> SlotDefV3:
614614
"displayName": addressable_area.display_name,
615615
"compatibleModuleTypes": addressable_area.compatible_module_types,
616616
"features": addressable_area.features,
617-
"extents": addressable_area.extents,
618617
}
619618

620619
def get_deck_slot_definitions(self) -> Dict[str, SlotDefV3]:

api/src/opentrons/protocol_engine/types/deck_configuration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from opentrons_shared_data.module.types import ModuleType as SharedDataModuleType
1010
from opentrons_shared_data.deck.types import SlotDefV3
11-
from opentrons_shared_data.labware.types import LocatingFeatures, Extents
11+
from opentrons_shared_data.labware.types import LocatingFeatures
1212

1313

1414
from .util import Vec3f, Dimensions
@@ -56,7 +56,6 @@ class AddressableArea:
5656
position: AddressableOffsetVector
5757
compatible_module_types: List[SharedDataModuleType]
5858
features: LocatingFeatures
59-
extents: Extents
6059

6160

6261
# TODO make the below some sort of better type

api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from opentrons_shared_data.deck import load as load_deck
99
from opentrons_shared_data.deck.types import DeckDefinitionV5
10-
from opentrons_shared_data.labware.types import LocatingFeatures, Extents
10+
from opentrons_shared_data.labware.types import LocatingFeatures
1111

1212
from opentrons.types import DeckSlotName
1313

@@ -298,12 +298,6 @@ def test_get_potential_cutout_fixtures_raises(
298298
bounding_box=Dimensions(x=128.0, y=86.0, z=0),
299299
position=AddressableOffsetVector(x=1, y=2, z=3),
300300
features=LocatingFeatures(),
301-
extents=Extents(
302-
total={
303-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
304-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
305-
}
306-
),
307301
compatible_module_types=[
308302
"magneticModuleType",
309303
"temperatureModuleType",
@@ -327,12 +321,6 @@ def test_get_potential_cutout_fixtures_raises(
327321
"heaterShakerModuleType",
328322
],
329323
features=LocatingFeatures(),
330-
extents=Extents(
331-
total={
332-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
333-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
334-
}
335-
),
336324
),
337325
lazy_fixture("ot2_short_trash_deck_def"),
338326
),
@@ -347,12 +335,6 @@ def test_get_potential_cutout_fixtures_raises(
347335
position=AddressableOffsetVector(x=1, y=2, z=3),
348336
compatible_module_types=[],
349337
features=LocatingFeatures(),
350-
extents=Extents(
351-
total={
352-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
353-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
354-
}
355-
),
356338
),
357339
lazy_fixture("ot3_standard_deck_def"),
358340
),
@@ -367,12 +349,6 @@ def test_get_potential_cutout_fixtures_raises(
367349
position=AddressableOffsetVector(x=-5.25, y=6, z=3),
368350
compatible_module_types=[],
369351
features=LocatingFeatures(),
370-
extents=Extents(
371-
total={
372-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
373-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
374-
}
375-
),
376352
),
377353
lazy_fixture("ot3_standard_deck_def"),
378354
),
@@ -387,12 +363,6 @@ def test_get_potential_cutout_fixtures_raises(
387363
position=AddressableOffsetVector(x=65, y=31, z=139.5),
388364
compatible_module_types=[],
389365
features=LocatingFeatures(),
390-
extents=Extents(
391-
total={
392-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
393-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
394-
}
395-
),
396366
),
397367
lazy_fixture("ot3_standard_deck_def"),
398368
),

api/tests/opentrons/protocol_engine/state/test_addressable_area_view_old.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ def test_get_loaded_addressable_area() -> None:
126126
position=AddressableOffsetVector(x=7, y=8, z=9),
127127
features=LocatingFeatures(),
128128
compatible_module_types=["magneticModuleType"],
129-
extents={
130-
"total": {
131-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
132-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
133-
},
134-
},
135129
)
136130
subject = get_addressable_area_view(
137131
loaded_addressable_areas_by_name={"abc": addressable_area}
@@ -159,12 +153,6 @@ def test_get_addressable_area_for_simulation_already_loaded() -> None:
159153
position=AddressableOffsetVector(x=7, y=8, z=9),
160154
compatible_module_types=["magneticModuleType"],
161155
features=LocatingFeatures(),
162-
extents={
163-
"total": {
164-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
165-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
166-
},
167-
},
168156
)
169157
subject = get_addressable_area_view(
170158
loaded_addressable_areas_by_name={"abc": addressable_area},
@@ -199,12 +187,6 @@ def test_get_addressable_area_for_simulation_not_loaded(decoy: Decoy) -> None:
199187
position=AddressableOffsetVector(x=7, y=8, z=9),
200188
compatible_module_types=["magneticModuleType"],
201189
features=LocatingFeatures(),
202-
extents={
203-
"total": {
204-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
205-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
206-
},
207-
},
208190
)
209191

210192
decoy.when(
@@ -299,12 +281,6 @@ def test_get_addressable_area_position() -> None:
299281
position=AddressableOffsetVector(x=1, y=2, z=3),
300282
compatible_module_types=[],
301283
features=LocatingFeatures(),
302-
extents={
303-
"total": {
304-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
305-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
306-
},
307-
},
308284
)
309285
}
310286
)
@@ -326,12 +302,6 @@ def test_get_addressable_area_move_to_location() -> None:
326302
position=AddressableOffsetVector(x=1, y=2, z=3),
327303
compatible_module_types=[],
328304
features=LocatingFeatures(),
329-
extents={
330-
"total": {
331-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
332-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
333-
},
334-
},
335305
)
336306
}
337307
)
@@ -353,12 +323,6 @@ def test_get_addressable_area_center() -> None:
353323
position=AddressableOffsetVector(x=1, y=2, z=3),
354324
compatible_module_types=[],
355325
features=LocatingFeatures(),
356-
extents={
357-
"total": {
358-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
359-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
360-
},
361-
},
362326
)
363327
}
364328
)
@@ -421,12 +385,6 @@ def test_get_slot_definition() -> None:
421385
position=AddressableOffsetVector(x=7, y=8, z=9),
422386
compatible_module_types=["magneticModuleType"],
423387
features=LocatingFeatures(),
424-
extents={
425-
"total": {
426-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
427-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
428-
},
429-
},
430388
)
431389
}
432390
)
@@ -444,12 +402,6 @@ def test_get_slot_definition() -> None:
444402
"displayName": "fancy name",
445403
"compatibleModuleTypes": ["magneticModuleType"],
446404
"features": {},
447-
"extents": {
448-
"total": {
449-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
450-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
451-
}
452-
},
453405
}
454406

455407

api/tests/opentrons/protocol_engine/state/test_geometry_view.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@
197197
position=AddressableOffsetVector(x=0, y=0, z=0),
198198
compatible_module_types=[],
199199
features=LocatingFeatures(),
200-
extents={
201-
"total": {
202-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
203-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
204-
},
205-
},
206200
)
207201

208202

@@ -2982,12 +2976,6 @@ def test_get_slot_item(
29822976
position=AddressableOffsetVector(x=0, y=0, z=0),
29832977
compatible_module_types=[],
29842978
features=LocatingFeatures(),
2985-
extents={
2986-
"total": {
2987-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
2988-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
2989-
},
2990-
},
29912979
)
29922980
subject._addressable_areas = AddressableAreaView(
29932981
state=AddressableAreaState(

api/tests/opentrons/protocol_engine/state/test_labware_origin_math.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,6 @@
148148
position=AddressableOffsetVector(x=0, y=0, z=0),
149149
compatible_module_types=[],
150150
features=LocatingFeatures(),
151-
extents={
152-
"total": {
153-
"backLeftBottom": {"x": 1, "y": 2, "z": 3},
154-
"frontRightTop": {"x": 4, "y": 5, "z": 6},
155-
},
156-
},
157151
)
158152

159153

0 commit comments

Comments
 (0)