opentrons 8.7.0a2__py3-none-any.whl → 8.7.0a3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of opentrons might be problematic. Click here for more details.

Files changed (119) hide show
  1. opentrons/_version.py +2 -2
  2. opentrons/drivers/thermocycler/abstract.py +0 -1
  3. opentrons/drivers/thermocycler/driver.py +4 -33
  4. opentrons/drivers/thermocycler/simulator.py +0 -2
  5. opentrons/hardware_control/api.py +5 -24
  6. opentrons/hardware_control/backends/controller.py +2 -8
  7. opentrons/hardware_control/backends/ot3controller.py +0 -3
  8. opentrons/hardware_control/backends/ot3simulator.py +1 -2
  9. opentrons/hardware_control/backends/simulator.py +1 -2
  10. opentrons/hardware_control/backends/subsystem_manager.py +2 -5
  11. opentrons/hardware_control/module_control.py +8 -82
  12. opentrons/hardware_control/modules/__init__.py +0 -3
  13. opentrons/hardware_control/modules/absorbance_reader.py +4 -11
  14. opentrons/hardware_control/modules/flex_stacker.py +9 -38
  15. opentrons/hardware_control/modules/heater_shaker.py +5 -30
  16. opentrons/hardware_control/modules/magdeck.py +4 -8
  17. opentrons/hardware_control/modules/mod_abc.py +5 -13
  18. opentrons/hardware_control/modules/tempdeck.py +5 -25
  19. opentrons/hardware_control/modules/thermocycler.py +10 -56
  20. opentrons/hardware_control/modules/types.py +1 -20
  21. opentrons/hardware_control/modules/utils.py +4 -11
  22. opentrons/hardware_control/nozzle_manager.py +0 -3
  23. opentrons/hardware_control/ot3api.py +5 -26
  24. opentrons/hardware_control/scripts/update_module_fw.py +0 -5
  25. opentrons/hardware_control/types.py +2 -31
  26. opentrons/legacy_commands/protocol_commands.py +0 -20
  27. opentrons/legacy_commands/types.py +0 -42
  28. opentrons/motion_planning/waypoints.py +29 -15
  29. opentrons/protocol_api/__init__.py +0 -5
  30. opentrons/protocol_api/_types.py +1 -6
  31. opentrons/protocol_api/core/common.py +1 -3
  32. opentrons/protocol_api/core/engine/_default_labware_versions.py +11 -32
  33. opentrons/protocol_api/core/engine/labware.py +1 -8
  34. opentrons/protocol_api/core/engine/module_core.py +0 -4
  35. opentrons/protocol_api/core/engine/protocol.py +43 -23
  36. opentrons/protocol_api/core/legacy/legacy_module_core.py +0 -2
  37. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +1 -11
  38. opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +2 -14
  39. opentrons/protocol_api/core/module.py +0 -1
  40. opentrons/protocol_api/core/protocol.py +2 -11
  41. opentrons/protocol_api/module_contexts.py +0 -1
  42. opentrons/protocol_api/protocol_context.py +4 -26
  43. opentrons/protocol_api/robot_context.py +21 -38
  44. opentrons/protocol_api/validation.py +1 -6
  45. opentrons/protocol_engine/actions/__init__.py +2 -4
  46. opentrons/protocol_engine/actions/actions.py +9 -22
  47. opentrons/protocol_engine/clients/sync_client.py +7 -6
  48. opentrons/protocol_engine/commands/__init__.py +0 -42
  49. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +15 -2
  50. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +15 -2
  51. opentrons/protocol_engine/commands/aspirate.py +0 -1
  52. opentrons/protocol_engine/commands/command.py +0 -1
  53. opentrons/protocol_engine/commands/command_unions.py +0 -39
  54. opentrons/protocol_engine/commands/dispense.py +0 -1
  55. opentrons/protocol_engine/commands/drop_tip.py +8 -32
  56. opentrons/protocol_engine/commands/movement_common.py +0 -2
  57. opentrons/protocol_engine/commands/pick_up_tip.py +11 -21
  58. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +0 -6
  59. opentrons/protocol_engine/commands/thermocycler/run_profile.py +0 -8
  60. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +1 -17
  61. opentrons/protocol_engine/commands/touch_tip.py +1 -1
  62. opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +22 -6
  63. opentrons/protocol_engine/errors/__init__.py +0 -4
  64. opentrons/protocol_engine/errors/exceptions.py +0 -55
  65. opentrons/protocol_engine/execution/__init__.py +0 -2
  66. opentrons/protocol_engine/execution/command_executor.py +0 -8
  67. opentrons/protocol_engine/execution/create_queue_worker.py +1 -5
  68. opentrons/protocol_engine/execution/labware_movement.py +12 -9
  69. opentrons/protocol_engine/execution/movement.py +0 -2
  70. opentrons/protocol_engine/execution/queue_worker.py +0 -4
  71. opentrons/protocol_engine/execution/run_control.py +0 -8
  72. opentrons/protocol_engine/protocol_engine.py +33 -67
  73. opentrons/protocol_engine/resources/__init__.py +0 -2
  74. opentrons/protocol_engine/resources/deck_configuration_provider.py +0 -7
  75. opentrons/protocol_engine/resources/labware_validation.py +6 -10
  76. opentrons/protocol_engine/state/_labware_origin_math.py +636 -0
  77. opentrons/protocol_engine/state/_well_math.py +18 -60
  78. opentrons/protocol_engine/state/addressable_areas.py +0 -2
  79. opentrons/protocol_engine/state/commands.py +7 -7
  80. opentrons/protocol_engine/state/geometry.py +374 -204
  81. opentrons/protocol_engine/state/labware.py +102 -52
  82. opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +0 -37
  83. opentrons/protocol_engine/state/modules.py +8 -21
  84. opentrons/protocol_engine/state/motion.py +0 -44
  85. opentrons/protocol_engine/state/state.py +0 -14
  86. opentrons/protocol_engine/state/state_summary.py +0 -2
  87. opentrons/protocol_engine/state/tips.py +258 -177
  88. opentrons/protocol_engine/state/update_types.py +9 -16
  89. opentrons/protocol_engine/types/__init__.py +3 -9
  90. opentrons/protocol_engine/types/deck_configuration.py +1 -5
  91. opentrons/protocol_engine/types/instrument.py +1 -8
  92. opentrons/protocol_engine/types/labware.py +13 -1
  93. opentrons/protocol_engine/types/module.py +0 -10
  94. opentrons/protocol_engine/types/tip.py +0 -9
  95. opentrons/protocol_runner/create_simulating_orchestrator.py +2 -29
  96. opentrons/protocol_runner/run_orchestrator.py +2 -18
  97. opentrons/protocols/api_support/definitions.py +1 -1
  98. opentrons/protocols/api_support/types.py +1 -2
  99. opentrons/simulate.py +15 -48
  100. opentrons/system/camera.py +1 -1
  101. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/METADATA +4 -4
  102. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/RECORD +105 -118
  103. opentrons/protocol_api/core/engine/tasks.py +0 -35
  104. opentrons/protocol_api/core/legacy/tasks.py +0 -19
  105. opentrons/protocol_api/core/legacy_simulator/tasks.py +0 -19
  106. opentrons/protocol_api/core/tasks.py +0 -31
  107. opentrons/protocol_api/tasks.py +0 -48
  108. opentrons/protocol_engine/commands/create_timer.py +0 -83
  109. opentrons/protocol_engine/commands/set_tip_state.py +0 -97
  110. opentrons/protocol_engine/commands/wait_for_tasks.py +0 -98
  111. opentrons/protocol_engine/execution/task_handler.py +0 -157
  112. opentrons/protocol_engine/resources/concurrency_provider.py +0 -27
  113. opentrons/protocol_engine/state/labware_origin_math/errors.py +0 -94
  114. opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +0 -1331
  115. opentrons/protocol_engine/state/tasks.py +0 -139
  116. opentrons/protocol_engine/types/tasks.py +0 -38
  117. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/WHEEL +0 -0
  118. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/entry_points.txt +0 -0
  119. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/licenses/LICENSE +0 -0
@@ -17,47 +17,13 @@ def wells_covered_by_pipette_configuration(
17
17
  """Compute the wells covered by a pipette nozzle configuration."""
18
18
  if len(labware_wells_by_column) >= 12 and len(labware_wells_by_column[0]) >= 8:
19
19
  yield from wells_covered_dense(
20
- nozzle_map.columns,
21
- nozzle_map.rows,
22
- nozzle_map.starting_nozzle,
20
+ nozzle_map,
23
21
  target_well,
24
22
  labware_wells_by_column,
25
23
  )
26
24
  elif len(labware_wells_by_column) < 12 and len(labware_wells_by_column[0]) < 8:
27
25
  yield from wells_covered_sparse(
28
- nozzle_map.columns,
29
- nozzle_map.rows,
30
- nozzle_map.starting_nozzle,
31
- target_well,
32
- labware_wells_by_column,
33
- )
34
- else:
35
- raise InvalidStoredData(
36
- "Labware of non-SBS and non-reservoir format cannot be handled"
37
- )
38
-
39
-
40
- def wells_covered_by_physical_pipette(
41
- nozzle_map: NozzleMap,
42
- target_well: str,
43
- labware_wells_by_column: list[list[str]],
44
- ) -> Iterator[str]:
45
- """Compute the wells covered by a pipette nozzle configuration."""
46
- if len(labware_wells_by_column) >= 12 and len(labware_wells_by_column[0]) >= 8:
47
- yield from wells_covered_dense(
48
- nozzle_map.full_instrument_columns,
49
- nozzle_map.full_instrument_rows,
50
- nozzle_map.starting_nozzle,
51
- target_well,
52
- labware_wells_by_column,
53
- )
54
- elif len(labware_wells_by_column) < 12 and len(labware_wells_by_column[0]) < 8:
55
- yield from wells_covered_sparse(
56
- nozzle_map.full_instrument_columns,
57
- nozzle_map.full_instrument_rows,
58
- nozzle_map.starting_nozzle,
59
- target_well,
60
- labware_wells_by_column,
26
+ nozzle_map, target_well, labware_wells_by_column
61
27
  )
62
28
  else:
63
29
  raise InvalidStoredData(
@@ -76,11 +42,7 @@ def row_col_ordinals_from_column_major_map(
76
42
 
77
43
 
78
44
  def wells_covered_dense( # noqa: C901
79
- columns: dict[str, list[str]],
80
- rows: dict[str, list[str]],
81
- starting_nozzle: str,
82
- target_well: str,
83
- target_wells_by_column: list[list[str]],
45
+ nozzle_map: NozzleMap, target_well: str, target_wells_by_column: list[list[str]]
84
46
  ) -> Iterator[str]:
85
47
  """Get the list of wells covered by a nozzle map on an SBS format labware with a specified multiplier of 96 into the number of wells.
86
48
 
@@ -104,11 +66,11 @@ def wells_covered_dense( # noqa: C901
104
66
  "This labware cannot be used with wells_covered_dense() because it is less dense than an SBS 96 standard"
105
67
  )
106
68
 
107
- for nozzle_column in range(len(columns)):
69
+ for nozzle_column in range(len(nozzle_map.columns)):
108
70
  target_column_offset = nozzle_column * column_downsample
109
- for nozzle_row in range(len(rows)):
71
+ for nozzle_row in range(len(nozzle_map.rows)):
110
72
  target_row_offset = nozzle_row * row_downsample
111
- if starting_nozzle == "A1":
73
+ if nozzle_map.starting_nozzle == "A1":
112
74
  if (
113
75
  target_column_index + target_column_offset
114
76
  < len(target_wells_by_column)
@@ -119,7 +81,7 @@ def wells_covered_dense( # noqa: C901
119
81
  yield target_wells_by_column[
120
82
  target_column_index + target_column_offset
121
83
  ][target_row_index + target_row_offset]
122
- elif starting_nozzle == "A12":
84
+ elif nozzle_map.starting_nozzle == "A12":
123
85
  if (target_column_index - target_column_offset >= 0) and (
124
86
  target_row_index + target_row_offset
125
87
  < len(target_wells_by_column[target_column_index])
@@ -127,7 +89,7 @@ def wells_covered_dense( # noqa: C901
127
89
  yield target_wells_by_column[
128
90
  target_column_index - target_column_offset
129
91
  ][target_row_index + target_row_offset]
130
- elif starting_nozzle == "H1":
92
+ elif nozzle_map.starting_nozzle == "H1":
131
93
  if (
132
94
  target_column_index + target_column_offset
133
95
  < len(target_wells_by_column)
@@ -135,7 +97,7 @@ def wells_covered_dense( # noqa: C901
135
97
  yield target_wells_by_column[
136
98
  target_column_index + target_column_offset
137
99
  ][target_row_index - target_row_offset]
138
- elif starting_nozzle == "H12":
100
+ elif nozzle_map.starting_nozzle == "H12":
139
101
  if (target_column_index - target_column_offset >= 0) and (
140
102
  target_row_index - target_row_offset >= 0
141
103
  ):
@@ -144,16 +106,12 @@ def wells_covered_dense( # noqa: C901
144
106
  ][target_row_index - target_row_offset]
145
107
  else:
146
108
  raise InvalidProtocolData(
147
- f"A pipette nozzle configuration may not having a starting nozzle of {starting_nozzle}"
109
+ f"A pipette nozzle configuration may not having a starting nozzle of {nozzle_map.starting_nozzle}"
148
110
  )
149
111
 
150
112
 
151
113
  def wells_covered_sparse( # noqa: C901
152
- columns: dict[str, list[str]],
153
- rows: dict[str, list[str]],
154
- starting_nozzle: str,
155
- target_well: str,
156
- target_wells_by_column: list[list[str]],
114
+ nozzle_map: NozzleMap, target_well: str, target_wells_by_column: list[list[str]]
157
115
  ) -> Iterator[str]:
158
116
  """Get the list of wells covered by a nozzle map on a column-oriented reservoir.
159
117
 
@@ -170,9 +128,9 @@ def wells_covered_sparse( # noqa: C901
170
128
  raise InvalidStoredData(
171
129
  "This labware cannot be used with wells_covered_sparse() because it is more dense than an SBS 96 standard."
172
130
  )
173
- for nozzle_column in range(max(1, len(columns) // column_upsample)):
174
- for nozzle_row in range(max(1, len(rows) // row_upsample)):
175
- if starting_nozzle == "A1":
131
+ for nozzle_column in range(max(1, len(nozzle_map.columns) // column_upsample)):
132
+ for nozzle_row in range(max(1, len(nozzle_map.rows) // row_upsample)):
133
+ if nozzle_map.starting_nozzle == "A1":
176
134
  if (
177
135
  target_column_index + nozzle_column < len(target_wells_by_column)
178
136
  ) and (
@@ -182,7 +140,7 @@ def wells_covered_sparse( # noqa: C901
182
140
  yield target_wells_by_column[target_column_index + nozzle_column][
183
141
  target_row_index + nozzle_row
184
142
  ]
185
- elif starting_nozzle == "A12":
143
+ elif nozzle_map.starting_nozzle == "A12":
186
144
  if (target_column_index - nozzle_column >= 0) and (
187
145
  target_row_index + nozzle_row
188
146
  < len(target_wells_by_column[target_column_index])
@@ -190,7 +148,7 @@ def wells_covered_sparse( # noqa: C901
190
148
  yield target_wells_by_column[target_column_index - nozzle_column][
191
149
  target_row_index + nozzle_row
192
150
  ]
193
- elif starting_nozzle == "H1":
151
+ elif nozzle_map.starting_nozzle == "H1":
194
152
  if (
195
153
  target_column_index + nozzle_column
196
154
  < len(target_wells_by_column[target_column_index])
@@ -198,7 +156,7 @@ def wells_covered_sparse( # noqa: C901
198
156
  yield target_wells_by_column[target_column_index + nozzle_column][
199
157
  target_row_index - nozzle_row
200
158
  ]
201
- elif starting_nozzle == "H12":
159
+ elif nozzle_map.starting_nozzle == "H12":
202
160
  if (target_column_index - nozzle_column >= 0) and (
203
161
  target_row_index - nozzle_row >= 0
204
162
  ):
@@ -207,7 +165,7 @@ def wells_covered_sparse( # noqa: C901
207
165
  ]
208
166
  else:
209
167
  raise InvalidProtocolData(
210
- f"A pipette nozzle configuration may not having a starting nozzle of {starting_nozzle}"
168
+ f"A pipette nozzle configuration may not having a starting nozzle of {nozzle_map.starting_nozzle}"
211
169
  )
212
170
 
213
171
 
@@ -5,7 +5,6 @@ from functools import cached_property
5
5
  from typing import Dict, List, Optional, Set
6
6
 
7
7
  from opentrons_shared_data.robot.types import RobotType, RobotDefinition
8
- from opentrons_shared_data.module.types import ModuleOrientation
9
8
  from opentrons_shared_data.deck.types import (
10
9
  DeckDefinitionV5,
11
10
  SlotDefV3,
@@ -615,7 +614,6 @@ class AddressableAreaView:
615
614
  "displayName": addressable_area.display_name,
616
615
  "compatibleModuleTypes": addressable_area.compatible_module_types,
617
616
  "features": addressable_area.features,
618
- "orientation": ModuleOrientation.NOT_APPLICABLE,
619
617
  }
620
618
 
621
619
  def get_deck_slot_definitions(self) -> Dict[str, SlotDefV3]:
@@ -238,7 +238,7 @@ class CommandState:
238
238
  has_entered_error_recovery: bool
239
239
  """Whether the run has entered error recovery."""
240
240
 
241
- stopped_by_async_error: bool
241
+ stopped_by_estop: bool
242
242
  """If this is set to True, the engine was stopped by an estop event."""
243
243
 
244
244
  error_recovery_policy: ErrorRecoveryPolicy
@@ -272,7 +272,7 @@ class CommandStore(HasState[CommandState], HandlesActions):
272
272
  run_completed_at=None,
273
273
  run_started_at=None,
274
274
  latest_protocol_command_hash=None,
275
- stopped_by_async_error=False,
275
+ stopped_by_estop=False,
276
276
  error_recovery_policy=error_recovery_policy,
277
277
  has_entered_error_recovery=False,
278
278
  )
@@ -472,8 +472,8 @@ class CommandStore(HasState[CommandState], HandlesActions):
472
472
  self._state.recovery_target = None
473
473
  self._state.queue_status = QueueStatus.PAUSED
474
474
 
475
- if action.from_asynchronous_error:
476
- self._state.stopped_by_async_error = True
475
+ if action.from_estop:
476
+ self._state.stopped_by_estop = True
477
477
  self._state.run_result = RunResult.FAILED
478
478
  else:
479
479
  self._state.run_result = RunResult.STOPPED
@@ -501,7 +501,7 @@ class CommandStore(HasState[CommandState], HandlesActions):
501
501
  else:
502
502
  # HACK(sf): There needs to be a better way to set
503
503
  # an estop error than this else clause
504
- if self._state.stopped_by_async_error and action.error_details:
504
+ if self._state.stopped_by_estop and action.error_details:
505
505
  self._state.run_error = self._map_run_exception_to_error_occurrence(
506
506
  action.error_details.error_id,
507
507
  action.error_details.created_at,
@@ -952,9 +952,9 @@ class CommandView:
952
952
  """Get whether an engine stop has completed."""
953
953
  return self._state.run_completed_at is not None
954
954
 
955
- def get_is_stopped_by_async_error(self) -> bool:
955
+ def get_is_stopped_by_estop(self) -> bool:
956
956
  """Return whether the engine was stopped specifically by an E-stop."""
957
- return self._state.stopped_by_async_error
957
+ return self._state.stopped_by_estop
958
958
 
959
959
  def has_been_played(self) -> bool:
960
960
  """Get whether engine has started."""