opentrons 8.4.0a2__py2.py3-none-any.whl → 8.4.0a4__py2.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 (45) hide show
  1. opentrons/legacy_commands/commands.py +83 -2
  2. opentrons/legacy_commands/helpers.py +59 -1
  3. opentrons/legacy_commands/types.py +30 -0
  4. opentrons/protocol_api/core/engine/instrument.py +158 -87
  5. opentrons/protocol_api/core/engine/pipette_movement_conflict.py +6 -14
  6. opentrons/protocol_api/core/engine/transfer_components_executor.py +12 -23
  7. opentrons/protocol_api/core/instrument.py +7 -4
  8. opentrons/protocol_api/core/legacy/legacy_instrument_core.py +7 -30
  9. opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +7 -4
  10. opentrons/protocol_api/core/well.py +1 -1
  11. opentrons/protocol_api/instrument_context.py +189 -75
  12. opentrons/protocol_api/labware.py +7 -6
  13. opentrons/protocol_api/protocol_context.py +18 -16
  14. opentrons/protocol_engine/commands/__init__.py +38 -38
  15. opentrons/protocol_engine/commands/aspirate_while_tracking.py +0 -6
  16. opentrons/protocol_engine/commands/command_unions.py +33 -33
  17. opentrons/protocol_engine/commands/dispense_while_tracking.py +1 -6
  18. opentrons/protocol_engine/commands/flex_stacker/empty.py +6 -6
  19. opentrons/protocol_engine/commands/flex_stacker/fill.py +6 -6
  20. opentrons/protocol_engine/commands/flex_stacker/retrieve.py +6 -6
  21. opentrons/protocol_engine/commands/flex_stacker/set_stored_labware.py +9 -9
  22. opentrons/protocol_engine/commands/flex_stacker/store.py +16 -13
  23. opentrons/protocol_engine/commands/labware_handling_common.py +6 -1
  24. opentrons/protocol_engine/commands/liquid_probe.py +1 -2
  25. opentrons/protocol_engine/commands/move_to_well.py +5 -11
  26. opentrons/protocol_engine/commands/{evotip_dispense.py → pressure_dispense.py} +27 -27
  27. opentrons/protocol_engine/commands/{evotip_seal_pipette.py → seal_pipette_to_tip.py} +32 -27
  28. opentrons/protocol_engine/commands/{evotip_unseal_pipette.py → unseal_pipette_from_tip.py} +22 -22
  29. opentrons/protocol_engine/labware_offset_standardization.py +22 -1
  30. opentrons/protocol_engine/resources/deck_configuration_provider.py +8 -4
  31. opentrons/protocol_engine/state/frustum_helpers.py +12 -4
  32. opentrons/protocol_engine/state/geometry.py +122 -73
  33. opentrons/protocol_engine/state/update_types.py +1 -1
  34. opentrons/protocol_engine/state/wells.py +1 -1
  35. opentrons/protocol_engine/types/__init__.py +6 -0
  36. opentrons/protocol_engine/types/location.py +2 -1
  37. opentrons/protocol_engine/types/well_position.py +18 -1
  38. opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +1 -1
  39. opentrons/protocols/labware.py +23 -18
  40. {opentrons-8.4.0a2.dist-info → opentrons-8.4.0a4.dist-info}/METADATA +4 -4
  41. {opentrons-8.4.0a2.dist-info → opentrons-8.4.0a4.dist-info}/RECORD +45 -45
  42. {opentrons-8.4.0a2.dist-info → opentrons-8.4.0a4.dist-info}/LICENSE +0 -0
  43. {opentrons-8.4.0a2.dist-info → opentrons-8.4.0a4.dist-info}/WHEEL +0 -0
  44. {opentrons-8.4.0a2.dist-info → opentrons-8.4.0a4.dist-info}/entry_points.txt +0 -0
  45. {opentrons-8.4.0a2.dist-info → opentrons-8.4.0a4.dist-info}/top_level.txt +0 -0
@@ -451,14 +451,14 @@ class ProtocolContext(CommandPublisher):
451
451
  choose the adapter's version automatically.
452
452
 
453
453
  .. versionadded:: 2.15
454
+ :param lid: A lid to load on the top of the main labware. Accepts the same
455
+ values as the ``load_name`` parameter of :py:meth:`.load_lid_stack`. The
456
+ lid will use the same namespace as the labware, and the API will
457
+ choose the adapter's version automatically.
458
+
459
+ .. versionadded:: 2.23
454
460
  """
455
- # TODO: re-include in docstring when 2.23 is ready
456
- # :param lid: A lid to load the on top of the main labware. Accepts the same
457
- # values as the ``load_name`` parameter of :py:meth:`.load_lid_stack`. The
458
- # lid will use the same namespace as the labware, and the API will
459
- # choose the lid's version automatically.
460
- #
461
- # .. versionadded:: 2.23
461
+
462
462
  if isinstance(location, OffDeckType) and self._api_version < APIVersion(2, 15):
463
463
  raise APIVersionError(
464
464
  api_element="Loading a labware off-deck",
@@ -1391,13 +1391,13 @@ class ProtocolContext(CommandPublisher):
1391
1391
  version: Optional[int] = None,
1392
1392
  ) -> Labware:
1393
1393
  """
1394
- Load a stack of Lids onto a valid Deck Location or Adapter.
1394
+ Load a stack of Opentrons Tough Auto-Sealing Lids onto a valid deck location or adapter.
1395
1395
 
1396
1396
  :param str load_name: A string to use for looking up a lid definition.
1397
- You can find the ``load_name`` for any standard lid on the Opentrons
1397
+ You can find the ``load_name`` for any compatible lid on the Opentrons
1398
1398
  `Labware Library <https://labware.opentrons.com>`_.
1399
1399
  :param location: Either a :ref:`deck slot <deck-slots>`,
1400
- like ``1``, ``"1"``, or ``"D1"``, or the a valid Opentrons Adapter.
1400
+ like ``1``, ``"1"``, or ``"D1"``, or a valid Opentrons Adapter.
1401
1401
  :param int quantity: The quantity of lids to be loaded in the stack.
1402
1402
  :param adapter: An adapter to load the lid stack on top of. Accepts the same
1403
1403
  values as the ``load_name`` parameter of :py:meth:`.load_adapter`. The
@@ -1418,9 +1418,10 @@ class ProtocolContext(CommandPublisher):
1418
1418
  leave this unspecified to let ``load_lid_stack()`` choose a version
1419
1419
  automatically.
1420
1420
 
1421
- :return: The initialized and loaded labware object representing the Lid Stack.
1421
+ :return: The initialized and loaded labware object representing the lid stack.
1422
+
1423
+ .. versionadded:: 2.23
1422
1424
 
1423
- :meta private:
1424
1425
  """
1425
1426
  if self._api_version < validation.LID_STACK_VERSION_GATE:
1426
1427
  raise APIVersionError(
@@ -1479,9 +1480,9 @@ class ProtocolContext(CommandPublisher):
1479
1480
  pick_up_offset: Optional[Mapping[str, float]] = None,
1480
1481
  drop_offset: Optional[Mapping[str, float]] = None,
1481
1482
  ) -> Labware | None:
1482
- """Move a lid from a valid source to a new location. Can return a Lid Stack if one is created.
1483
+ """Move a compatible lid from a valid source to a new location. Can return a lid stack if one is created.
1483
1484
 
1484
- :param source_location: Where to take the lid from. This is either:
1485
+ :param source_location: The lid's starting location. This is either:
1485
1486
 
1486
1487
  * A deck slot like ``1``, ``"1"``, or ``"D1"``. See :ref:`deck-slots`.
1487
1488
  * A labware or adapter that's already been loaded on the deck
@@ -1498,7 +1499,7 @@ class ProtocolContext(CommandPublisher):
1498
1499
  with :py:meth:`load_labware` or :py:meth:`load_adapter`.
1499
1500
  * The special constant :py:obj:`OFF_DECK`.
1500
1501
 
1501
- :param use_gripper: Whether to use the Flex Gripper for this movement.
1502
+ :param use_gripper: Whether to use the Flex Gripper to move the lid.
1502
1503
 
1503
1504
  * If ``True``, use the gripper to perform an automatic
1504
1505
  movement. This will raise an error in an OT-2 protocol.
@@ -1515,7 +1516,8 @@ class ProtocolContext(CommandPublisher):
1515
1516
  labware's current and new locations are accessible, i.e., open the Thermocycler lid
1516
1517
  or open the Heater-Shaker's labware latch.
1517
1518
 
1518
- :meta private:
1519
+ .. versionadded:: 2.23
1520
+
1519
1521
  """
1520
1522
  source: Union[LabwareCore, DeckSlotName, StagingSlotName]
1521
1523
  if isinstance(source_location, Labware):
@@ -397,26 +397,26 @@ from .liquid_probe import (
397
397
  TryLiquidProbeCommandType,
398
398
  )
399
399
 
400
- from .evotip_seal_pipette import (
401
- EvotipSealPipette,
402
- EvotipSealPipetteParams,
403
- EvotipSealPipetteCreate,
404
- EvotipSealPipetteResult,
405
- EvotipSealPipetteCommandType,
406
- )
407
- from .evotip_unseal_pipette import (
408
- EvotipUnsealPipette,
409
- EvotipUnsealPipetteParams,
410
- EvotipUnsealPipetteCreate,
411
- EvotipUnsealPipetteResult,
412
- EvotipUnsealPipetteCommandType,
413
- )
414
- from .evotip_dispense import (
415
- EvotipDispense,
416
- EvotipDispenseParams,
417
- EvotipDispenseCreate,
418
- EvotipDispenseResult,
419
- EvotipDispenseCommandType,
400
+ from .seal_pipette_to_tip import (
401
+ SealPipetteToTip,
402
+ SealPipetteToTipParams,
403
+ SealPipetteToTipCreate,
404
+ SealPipetteToTipResult,
405
+ SealPipetteToTipCommandType,
406
+ )
407
+ from .unseal_pipette_from_tip import (
408
+ UnsealPipetteFromTip,
409
+ UnsealPipetteFromTipParams,
410
+ UnsealPipetteFromTipCreate,
411
+ UnsealPipetteFromTipResult,
412
+ UnsealPipetteFromTipCommandType,
413
+ )
414
+ from .pressure_dispense import (
415
+ PressureDispense,
416
+ PressureDispenseParams,
417
+ PressureDispenseCreate,
418
+ PressureDispenseResult,
419
+ PressureDispenseCommandType,
420
420
  )
421
421
 
422
422
  __all__ = [
@@ -722,22 +722,22 @@ __all__ = [
722
722
  "TryLiquidProbeCreate",
723
723
  "TryLiquidProbeResult",
724
724
  "TryLiquidProbeCommandType",
725
- # evotip seal command bundle
726
- "EvotipSealPipette",
727
- "EvotipSealPipetteParams",
728
- "EvotipSealPipetteCreate",
729
- "EvotipSealPipetteResult",
730
- "EvotipSealPipetteCommandType",
731
- # evotip unseal command bundle
732
- "EvotipUnsealPipette",
733
- "EvotipUnsealPipetteParams",
734
- "EvotipUnsealPipetteCreate",
735
- "EvotipUnsealPipetteResult",
736
- "EvotipUnsealPipetteCommandType",
737
- # evotip dispense command bundle
738
- "EvotipDispense",
739
- "EvotipDispenseParams",
740
- "EvotipDispenseCreate",
741
- "EvotipDispenseResult",
742
- "EvotipDispenseCommandType",
725
+ # seal command bundle
726
+ "SealPipetteToTip",
727
+ "SealPipetteToTipParams",
728
+ "SealPipetteToTipCreate",
729
+ "SealPipetteToTipResult",
730
+ "SealPipetteToTipCommandType",
731
+ # unseal command bundle
732
+ "UnsealPipetteFromTip",
733
+ "UnsealPipetteFromTipParams",
734
+ "UnsealPipetteFromTipCreate",
735
+ "UnsealPipetteFromTipResult",
736
+ "UnsealPipetteFromTipCommandType",
737
+ # pressure dispense command bundle
738
+ "PressureDispense",
739
+ "PressureDispenseParams",
740
+ "PressureDispenseCreate",
741
+ "PressureDispenseResult",
742
+ "PressureDispenseCommandType",
743
743
  ]
@@ -109,11 +109,6 @@ class AspirateWhileTrackingImplementation(
109
109
  current_location = self._state_view.pipettes.get_current_location()
110
110
 
111
111
  state_update = StateUpdate()
112
- current_well = CurrentWell(
113
- pipette_id=params.pipetteId,
114
- labware_id=params.labwareId,
115
- well_name=params.wellName,
116
- )
117
112
  move_result = await move_to_well(
118
113
  movement=self._movement,
119
114
  model_utils=self._model_utils,
@@ -121,7 +116,6 @@ class AspirateWhileTrackingImplementation(
121
116
  labware_id=params.labwareId,
122
117
  well_name=params.wellName,
123
118
  well_location=params.wellLocation,
124
- current_well=current_well,
125
119
  operation_volume=-params.volume,
126
120
  )
127
121
  state_update.append(move_result.state_update)
@@ -378,28 +378,28 @@ from .liquid_probe import (
378
378
  TryLiquidProbeCommandType,
379
379
  )
380
380
 
381
- from .evotip_seal_pipette import (
382
- EvotipSealPipette,
383
- EvotipSealPipetteParams,
384
- EvotipSealPipetteCreate,
385
- EvotipSealPipetteResult,
386
- EvotipSealPipetteCommandType,
381
+ from .seal_pipette_to_tip import (
382
+ SealPipetteToTip,
383
+ SealPipetteToTipParams,
384
+ SealPipetteToTipCreate,
385
+ SealPipetteToTipResult,
386
+ SealPipetteToTipCommandType,
387
387
  )
388
388
 
389
- from .evotip_dispense import (
390
- EvotipDispense,
391
- EvotipDispenseParams,
392
- EvotipDispenseCreate,
393
- EvotipDispenseResult,
394
- EvotipDispenseCommandType,
389
+ from .pressure_dispense import (
390
+ PressureDispense,
391
+ PressureDispenseParams,
392
+ PressureDispenseCreate,
393
+ PressureDispenseResult,
394
+ PressureDispenseCommandType,
395
395
  )
396
396
 
397
- from .evotip_unseal_pipette import (
398
- EvotipUnsealPipette,
399
- EvotipUnsealPipetteParams,
400
- EvotipUnsealPipetteCreate,
401
- EvotipUnsealPipetteResult,
402
- EvotipUnsealPipetteCommandType,
397
+ from .unseal_pipette_from_tip import (
398
+ UnsealPipetteFromTip,
399
+ UnsealPipetteFromTipParams,
400
+ UnsealPipetteFromTipCreate,
401
+ UnsealPipetteFromTipResult,
402
+ UnsealPipetteFromTipCommandType,
403
403
  )
404
404
 
405
405
  Command = Annotated[
@@ -448,9 +448,9 @@ Command = Annotated[
448
448
  GetNextTip,
449
449
  LiquidProbe,
450
450
  TryLiquidProbe,
451
- EvotipSealPipette,
452
- EvotipDispense,
453
- EvotipUnsealPipette,
451
+ SealPipetteToTip,
452
+ PressureDispense,
453
+ UnsealPipetteFromTip,
454
454
  heater_shaker.WaitForTemperature,
455
455
  heater_shaker.SetTargetTemperature,
456
456
  heater_shaker.DeactivateHeater,
@@ -549,9 +549,9 @@ CommandParams = Union[
549
549
  GetNextTipParams,
550
550
  LiquidProbeParams,
551
551
  TryLiquidProbeParams,
552
- EvotipSealPipetteParams,
553
- EvotipDispenseParams,
554
- EvotipUnsealPipetteParams,
552
+ SealPipetteToTipParams,
553
+ PressureDispenseParams,
554
+ UnsealPipetteFromTipParams,
555
555
  heater_shaker.WaitForTemperatureParams,
556
556
  heater_shaker.SetTargetTemperatureParams,
557
557
  heater_shaker.DeactivateHeaterParams,
@@ -648,9 +648,9 @@ CommandType = Union[
648
648
  GetNextTipCommandType,
649
649
  LiquidProbeCommandType,
650
650
  TryLiquidProbeCommandType,
651
- EvotipSealPipetteCommandType,
652
- EvotipDispenseCommandType,
653
- EvotipUnsealPipetteCommandType,
651
+ SealPipetteToTipCommandType,
652
+ PressureDispenseCommandType,
653
+ UnsealPipetteFromTipCommandType,
654
654
  heater_shaker.WaitForTemperatureCommandType,
655
655
  heater_shaker.SetTargetTemperatureCommandType,
656
656
  heater_shaker.DeactivateHeaterCommandType,
@@ -748,9 +748,9 @@ CommandCreate = Annotated[
748
748
  GetNextTipCreate,
749
749
  LiquidProbeCreate,
750
750
  TryLiquidProbeCreate,
751
- EvotipSealPipetteCreate,
752
- EvotipDispenseCreate,
753
- EvotipUnsealPipetteCreate,
751
+ SealPipetteToTipCreate,
752
+ PressureDispenseCreate,
753
+ UnsealPipetteFromTipCreate,
754
754
  heater_shaker.WaitForTemperatureCreate,
755
755
  heater_shaker.SetTargetTemperatureCreate,
756
756
  heater_shaker.DeactivateHeaterCreate,
@@ -856,9 +856,9 @@ CommandResult = Union[
856
856
  GetNextTipResult,
857
857
  LiquidProbeResult,
858
858
  TryLiquidProbeResult,
859
- EvotipSealPipetteResult,
860
- EvotipDispenseResult,
861
- EvotipUnsealPipetteResult,
859
+ SealPipetteToTipResult,
860
+ PressureDispenseResult,
861
+ UnsealPipetteFromTipResult,
862
862
  heater_shaker.WaitForTemperatureResult,
863
863
  heater_shaker.SetTargetTemperatureResult,
864
864
  heater_shaker.DeactivateHeaterResult,
@@ -101,11 +101,7 @@ class DispenseWhileTrackingImplementation(
101
101
 
102
102
  current_location = self._state_view.pipettes.get_current_location()
103
103
  current_position = await self._gantry_mover.get_position(params.pipetteId)
104
- current_well = CurrentWell(
105
- pipette_id=params.pipetteId,
106
- labware_id=params.labwareId,
107
- well_name=params.wellName,
108
- )
104
+
109
105
  state_update = StateUpdate()
110
106
  move_result = await move_to_well(
111
107
  movement=self._movement,
@@ -114,7 +110,6 @@ class DispenseWhileTrackingImplementation(
114
110
  labware_id=params.labwareId,
115
111
  well_name=params.wellName,
116
112
  well_location=params.wellLocation,
117
- current_well=current_well,
118
113
  operation_volume=-params.volume,
119
114
  )
120
115
  state_update.append(move_result.state_update)
@@ -3,10 +3,11 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from __future__ import annotations
6
- from typing import Optional, Literal, TYPE_CHECKING
6
+ from typing import Optional, Literal, TYPE_CHECKING, Annotated
7
7
  from typing_extensions import Type
8
8
 
9
9
  from pydantic import BaseModel, Field
10
+ from pydantic.json_schema import SkipJsonSchema
10
11
 
11
12
  from ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData
12
13
  from ...errors import (
@@ -39,12 +40,12 @@ class EmptyParams(BaseModel):
39
40
  ),
40
41
  )
41
42
 
42
- message: str | None = Field(
43
+ message: str | SkipJsonSchema[None] = Field(
43
44
  None,
44
45
  description="The message to display on connected clients during a manualWithPause strategy empty.",
45
46
  )
46
47
 
47
- count: int | None = Field(
48
+ count: Optional[Annotated[int, Field(ge=0)]] = Field(
48
49
  None,
49
50
  description=(
50
51
  "The new count of labware in the pool. If None, default to an empty pool. If this number is "
@@ -52,7 +53,6 @@ class EmptyParams(BaseModel):
52
53
  "Do not use the value in the parameters as an outside observer; instead, use the count value "
53
54
  "from the results."
54
55
  ),
55
- ge=0,
56
56
  )
57
57
 
58
58
 
@@ -66,11 +66,11 @@ class EmptyResult(BaseModel):
66
66
  ...,
67
67
  description="The labware definition URI of the primary labware.",
68
68
  )
69
- adapterLabwareURI: str | None = Field(
69
+ adapterLabwareURI: str | SkipJsonSchema[None] = Field(
70
70
  None,
71
71
  description="The labware definition URI of the adapter labware.",
72
72
  )
73
- lidLabwareURI: str | None = Field(
73
+ lidLabwareURI: str | SkipJsonSchema[None] = Field(
74
74
  None,
75
75
  description="The labware definition URI of the lid labware.",
76
76
  )
@@ -1,10 +1,11 @@
1
1
  """Command models to engage a user to empty a Flex Stacker."""
2
2
 
3
3
  from __future__ import annotations
4
- from typing import Optional, Literal, TYPE_CHECKING
4
+ from typing import Optional, Literal, TYPE_CHECKING, Annotated
5
5
  from typing_extensions import Type
6
6
 
7
7
  from pydantic import BaseModel, Field
8
+ from pydantic.json_schema import SkipJsonSchema
8
9
 
9
10
  from ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData
10
11
  from ...errors import (
@@ -37,12 +38,12 @@ class FillParams(BaseModel):
37
38
  ),
38
39
  )
39
40
 
40
- message: str | None = Field(
41
+ message: str | SkipJsonSchema[None] = Field(
41
42
  None,
42
43
  description="The message to display on connected clients during a manualWithPause strategy fill.",
43
44
  )
44
45
 
45
- count: int | None = Field(
46
+ count: Optional[Annotated[int, Field(ge=1)]] = Field(
46
47
  None,
47
48
  description=(
48
49
  "How full the labware pool should now be. If None, default to the maximum amount "
@@ -52,7 +53,6 @@ class FillParams(BaseModel):
52
53
  "holds, it will be clamped to that minimum. Do not use the value in the parameters as "
53
54
  "an outside observer; instead, use the count value from the results."
54
55
  ),
55
- ge=1,
56
56
  )
57
57
 
58
58
 
@@ -66,11 +66,11 @@ class FillResult(BaseModel):
66
66
  ...,
67
67
  description="The labware definition URI of the primary labware.",
68
68
  )
69
- adapterLabwareURI: str | None = Field(
69
+ adapterLabwareURI: str | SkipJsonSchema[None] = Field(
70
70
  None,
71
71
  description="The labware definition URI of the adapter labware.",
72
72
  )
73
- lidLabwareURI: str | None = Field(
73
+ lidLabwareURI: str | SkipJsonSchema[None] = Field(
74
74
  None,
75
75
  description="The labware definition URI of the lid labware.",
76
76
  )
@@ -86,33 +86,33 @@ class RetrieveResult(BaseModel):
86
86
  ...,
87
87
  description="The labware ID of the primary retrieved labware.",
88
88
  )
89
- adapterId: str | None = Field(
89
+ adapterId: str | SkipJsonSchema[None] = Field(
90
90
  None,
91
91
  description="The optional Adapter Labware ID of the adapter under a primary labware.",
92
92
  )
93
- lidId: str | None = Field(
93
+ lidId: str | SkipJsonSchema[None] = Field(
94
94
  None,
95
95
  description="The optional Lid Labware ID of the lid on a primary labware.",
96
96
  )
97
97
  primaryLocationSequence: LabwareLocationSequence = Field(
98
98
  ..., description="The origin location of the primary labware."
99
99
  )
100
- lidLocationSequence: LabwareLocationSequence | None = Field(
100
+ lidLocationSequence: LabwareLocationSequence | SkipJsonSchema[None] = Field(
101
101
  None,
102
102
  description="The origin location of the adapter labware under a primary labware.",
103
103
  )
104
- adapterLocationSequence: LabwareLocationSequence | None = Field(
104
+ adapterLocationSequence: LabwareLocationSequence | SkipJsonSchema[None] = Field(
105
105
  None, description="The origin location of the lid labware on a primary labware."
106
106
  )
107
107
  primaryLabwareURI: str = Field(
108
108
  ...,
109
109
  description="The labware definition URI of the primary labware.",
110
110
  )
111
- adapterLabwareURI: str | None = Field(
111
+ adapterLabwareURI: str | SkipJsonSchema[None] = Field(
112
112
  None,
113
113
  description="The labware definition URI of the adapter labware.",
114
114
  )
115
- lidLabwareURI: str | None = Field(
115
+ lidLabwareURI: str | SkipJsonSchema[None] = Field(
116
116
  None,
117
117
  description="The labware definition URI of the lid labware.",
118
118
  )
@@ -1,10 +1,11 @@
1
1
  """Command models to configure the stored labware pool of a Flex Stacker.."""
2
2
 
3
3
  from __future__ import annotations
4
- from typing import Optional, Literal, TYPE_CHECKING
4
+ from typing import Optional, Literal, TYPE_CHECKING, Annotated
5
5
  from typing_extensions import Type
6
6
 
7
7
  from pydantic import BaseModel, Field
8
+ from pydantic.json_schema import SkipJsonSchema
8
9
 
9
10
  from opentrons_shared_data.labware.labware_definition import LabwareDefinition
10
11
 
@@ -45,21 +46,20 @@ class SetStoredLabwareParams(BaseModel):
45
46
  ...,
46
47
  description="The details of the primary labware (i.e. not the lid or adapter, if any) stored in the stacker.",
47
48
  )
48
- lidLabware: StackerStoredLabwareDetails | None = Field(
49
+ lidLabware: StackerStoredLabwareDetails | SkipJsonSchema[None] = Field(
49
50
  default=None,
50
51
  description="The details of the lid on the primary labware, if any.",
51
52
  )
52
- adapterLabware: StackerStoredLabwareDetails | None = Field(
53
+ adapterLabware: StackerStoredLabwareDetails | SkipJsonSchema[None] = Field(
53
54
  default=None,
54
55
  description="The details of the adapter under the primary labware, if any.",
55
56
  )
56
- initialCount: int | None = Field(
57
+ initialCount: Optional[Annotated[int, Field(ge=0)]] = Field(
57
58
  None,
58
59
  description=(
59
60
  "The number of labware that should be initially stored in the stacker. This number will be silently clamped to "
60
61
  "the maximum number of labware that will fit; do not rely on the parameter to know how many labware are in the stacker."
61
62
  ),
62
- ge=0,
63
63
  )
64
64
 
65
65
 
@@ -69,11 +69,11 @@ class SetStoredLabwareResult(BaseModel):
69
69
  primaryLabwareDefinition: LabwareDefinition = Field(
70
70
  ..., description="The definition of the primary labware."
71
71
  )
72
- lidLabwareDefinition: LabwareDefinition | None = Field(
73
- ..., description="The definition of the lid on the primary labware, if any."
72
+ lidLabwareDefinition: LabwareDefinition | SkipJsonSchema[None] = Field(
73
+ None, description="The definition of the lid on the primary labware, if any."
74
74
  )
75
- adapterLabwareDefinition: LabwareDefinition | None = Field(
76
- ...,
75
+ adapterLabwareDefinition: LabwareDefinition | SkipJsonSchema[None] = Field(
76
+ None,
77
77
  description="The definition of the adapter under the primary labware, if any.",
78
78
  )
79
79
  count: int = Field(
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
  from typing import Optional, Literal, TYPE_CHECKING, Type, Union
5
5
 
6
6
  from pydantic import BaseModel, Field
7
+ from pydantic.json_schema import SkipJsonSchema
7
8
 
8
9
  from ..command import (
9
10
  AbstractCommandImpl,
@@ -51,39 +52,41 @@ class StoreParams(BaseModel):
51
52
  class StoreResult(BaseModel):
52
53
  """Result data from a labware storage command."""
53
54
 
54
- eventualDestinationLocationSequence: LabwareLocationSequence | None = Field(
55
+ eventualDestinationLocationSequence: LabwareLocationSequence | SkipJsonSchema[
56
+ None
57
+ ] = Field(
55
58
  None,
56
59
  description=(
57
60
  "The full location in which all labware moved by this command will eventually reside."
58
61
  ),
59
62
  )
60
- primaryOriginLocationSequence: LabwareLocationSequence | None = Field(
61
- None, description=("The origin location of the primary labware.")
62
- )
63
- primaryLabwareId: str | None = Field(
63
+ primaryOriginLocationSequence: LabwareLocationSequence | SkipJsonSchema[
64
+ None
65
+ ] = Field(None, description=("The origin location of the primary labware."))
66
+ primaryLabwareId: str | SkipJsonSchema[None] = Field(
64
67
  None, description="The primary labware in the stack that was stored."
65
68
  )
66
- adapterOriginLocationSequence: LabwareLocationSequence | None = Field(
67
- None, description=("The origin location of the adapter labware, if any.")
68
- )
69
- adapterLabwareId: str | None = Field(
69
+ adapterOriginLocationSequence: LabwareLocationSequence | SkipJsonSchema[
70
+ None
71
+ ] = Field(None, description=("The origin location of the adapter labware, if any."))
72
+ adapterLabwareId: str | SkipJsonSchema[None] = Field(
70
73
  None, description="The adapter in the stack that was stored, if any."
71
74
  )
72
- lidOriginLocationSequence: LabwareLocationSequence | None = Field(
75
+ lidOriginLocationSequence: LabwareLocationSequence | SkipJsonSchema[None] = Field(
73
76
  None, description=("The origin location of the lid labware, if any.")
74
77
  )
75
- lidLabwareId: str | None = Field(
78
+ lidLabwareId: str | SkipJsonSchema[None] = Field(
76
79
  None, description="The lid in the stack that was stored, if any."
77
80
  )
78
81
  primaryLabwareURI: str = Field(
79
82
  ...,
80
83
  description="The labware definition URI of the primary labware.",
81
84
  )
82
- adapterLabwareURI: str | None = Field(
85
+ adapterLabwareURI: str | SkipJsonSchema[None] = Field(
83
86
  None,
84
87
  description="The labware definition URI of the adapter labware.",
85
88
  )
86
- lidLabwareURI: str | None = Field(
89
+ lidLabwareURI: str | SkipJsonSchema[None] = Field(
87
90
  None,
88
91
  description="The labware definition URI of the lid labware.",
89
92
  )
@@ -11,7 +11,12 @@ class LabwareHandlingResultMixin(BaseModel):
11
11
  labwareId: str = Field(..., description="The id of the labware.")
12
12
  locationSequence: LabwareLocationSequence | None = Field(
13
13
  None,
14
- description="The full location down to the deck on which this labware exists.",
14
+ description=(
15
+ "The full location down to the deck on which this labware exists."
16
+ " The reason this can be `null` or omitted is just backwards compatibility,"
17
+ " for older runs and analyses. This should always be present"
18
+ " for new runs and analyses, even for labware whose location is off-deck."
19
+ ),
15
20
  )
16
21
 
17
22
 
@@ -22,8 +22,7 @@ from opentrons_shared_data.errors.exceptions import (
22
22
  PipetteOverpressureError,
23
23
  )
24
24
 
25
- from ..types import DeckPoint
26
- from ..types.liquid_level_detection import LiquidTrackingType
25
+ from ..types import DeckPoint, LiquidTrackingType
27
26
  from .pipetting_common import (
28
27
  LiquidNotFoundError,
29
28
  PipetteIdMixin,
@@ -8,7 +8,7 @@ from .pipetting_common import (
8
8
  PipetteIdMixin,
9
9
  )
10
10
  from .movement_common import (
11
- WellLocationMixin,
11
+ LiquidHandlingWellLocationMixin,
12
12
  MovementMixin,
13
13
  DestinationPositionResult,
14
14
  StallOrCollisionError,
@@ -21,7 +21,6 @@ from .command import (
21
21
  SuccessData,
22
22
  DefinedErrorData,
23
23
  )
24
- from ..errors import LabwareIsTipRackError
25
24
 
26
25
  if TYPE_CHECKING:
27
26
  from ..execution import MovementHandler
@@ -31,7 +30,7 @@ if TYPE_CHECKING:
31
30
  MoveToWellCommandType = Literal["moveToWell"]
32
31
 
33
32
 
34
- class MoveToWellParams(PipetteIdMixin, WellLocationMixin, MovementMixin):
33
+ class MoveToWellParams(PipetteIdMixin, LiquidHandlingWellLocationMixin, MovementMixin):
35
34
  """Payload required to move a pipette to a specific well."""
36
35
 
37
36
  pass
@@ -70,14 +69,9 @@ class MoveToWellImplementation(
70
69
  labware_id = params.labwareId
71
70
  well_name = params.wellName
72
71
  well_location = params.wellLocation
73
-
74
- if (
75
- self._state_view.labware.is_tiprack(labware_id)
76
- and well_location.volumeOffset
77
- ):
78
- raise LabwareIsTipRackError(
79
- "Cannot specify a WellLocation with a volumeOffset with movement to a tip rack"
80
- )
72
+ # TODO(cm): implement move_to_well with meniscus + volume offset
73
+ if well_location.volumeOffset and well_location.volumeOffset != 0:
74
+ raise ValueError("volume offset not supported with MoveToWell")
81
75
 
82
76
  move_result = await move_to_well(
83
77
  model_utils=self._model_utils,