Skip to content

Commit

Permalink
Merge branch 'edge' into pd-build-and-test-speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
y3rsh committed Jan 29, 2025
2 parents e51bc9f + 2451026 commit 9d177c7
Show file tree
Hide file tree
Showing 109 changed files with 2,911 additions and 899 deletions.
4 changes: 2 additions & 2 deletions api-client/src/maintenance_runs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
} from '@opentrons/shared-data'
import type {
RunCommandSummary,
LabwareOffsetCreateData,
LegacyLabwareOffsetCreateData,
RunStatus,
RunAction,
} from '../runs'
Expand Down Expand Up @@ -42,7 +42,7 @@ export interface MaintenanceRunError {
}

export interface CreateMaintenanceRunData {
labwareOffsets?: LabwareOffsetCreateData[]
labwareOffsets?: LegacyLabwareOffsetCreateData[]
}

export interface LabwareDefinitionSummary {
Expand Down
1 change: 1 addition & 0 deletions api-client/src/modules/api-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface PhysicalPort {
port: number
hub: boolean
portGroup: PortGroup
hubPort?: number
}

type ModuleOffsetSource =
Expand Down
6 changes: 3 additions & 3 deletions api-client/src/runs/createLabwareOffset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { POST, request } from '../request'

import type { ResponsePromise } from '../request'
import type { HostConfig } from '../types'
import type { LabwareOffsetCreateData, Run } from './types'
import type { LegacyLabwareOffsetCreateData, Run } from './types'

export function createLabwareOffset(
config: HostConfig,
runId: string,
data: LabwareOffsetCreateData
data: LegacyLabwareOffsetCreateData
): ResponsePromise<Run> {
return request<Run, { data: LabwareOffsetCreateData }>(
return request<Run, { data: LegacyLabwareOffsetCreateData }>(
POST,
`/runs/${runId}/labware_offsets`,
{ data },
Expand Down
4 changes: 2 additions & 2 deletions api-client/src/runs/createRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import type { ResponsePromise } from '../request'
import type { HostConfig } from '../types'
import type {
Run,
LabwareOffsetCreateData,
LegacyLabwareOffsetCreateData,
RunTimeParameterValuesCreateData,
RunTimeParameterFilesCreateData,
} from './types'

export interface CreateRunData {
protocolId?: string
labwareOffsets?: LabwareOffsetCreateData[]
labwareOffsets?: LegacyLabwareOffsetCreateData[]
runTimeParameterValues?: RunTimeParameterValuesCreateData
runTimeParameterFiles?: RunTimeParameterFilesCreateData
}
Expand Down
30 changes: 26 additions & 4 deletions api-client/src/runs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export interface LabwareOffset {
id: string
createdAt: string
definitionUri: string
location: LabwareOffsetLocation
location: LegacyLabwareOffsetLocation
locationSequence?: LabwareOffsetLocationSequence
vector: VectorOffset
}

Expand Down Expand Up @@ -156,14 +157,35 @@ export interface CreateRunActionData {
actionType: RunActionType
}

export interface LabwareOffsetLocation {
export interface OnAddressableAreaLabwareOffsetLocationSequenceComponent {
kind: 'onAddressableArea'
labware: string
}

export interface OnModuleOffsetLocationSequenceComponent {
kind: 'onModule'
moduleModel: ModuleModel
}

export interface OnLabwareOffsetLocationSequenceComponent {
kind: 'onLabware'
labwareUri: string
}

export type LabwareOffsetLocationSequenceComponent =
| OnAddressableAreaLabwareOffsetLocationSequenceComponent
| OnModuleOffsetLocationSequenceComponent
| OnLabwareOffsetLocationSequenceComponent
export type LabwareOffsetLocationSequence = LabwareOffsetLocationSequenceComponent[]

export interface LegacyLabwareOffsetLocation {
slotName: string
moduleModel?: ModuleModel
definitionUri?: string
}
export interface LabwareOffsetCreateData {
export interface LegacyLabwareOffsetCreateData {
definitionUri: string
location: LabwareOffsetLocation
location: LegacyLabwareOffsetLocation
vector: VectorOffset
}

Expand Down
49 changes: 26 additions & 23 deletions api/docs/v2/pipettes/characteristics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,32 @@ These flow rates will remain in effect until you change the ``flow_rate`` attrib
Flex Pipette Flow Rates
-----------------------

Flex pipette flow rates depend on pipette volume and tip capacity. Each pipette–tip combination has a default flow rate for aspirating, dispensing, and blowing out liquid. When using a 50 µL pipette, you should only use 50 µL tips.

.. list-table::
:header-rows: 1

* - Pipette Model
- Tip Capacity (µL)
- Flow Rate (µL/s)
* - 50 µL (1- and 8-channel)
- 50
- 57
* - 1000 µL (1-, 8-, and 96-channel)
- 50
- 478
* - 1000 µL (1-, 8-, and 96-channel)
- 200
- 716
* - 1000 µL (1-, 8-, and 96-channel)
- 1000
- 716


Additionally, all Flex pipettes have a well bottom clearance of 1 mm for aspirate and dispense actions.
The following table provides data on the default aspirate, dispense, and blowout flow rates (in µL/s) for Flex pipettes. Default flow rates for each pipette-tip combination are the same across all three actions.

.. Excludes low-vol 96 channel. Not yet released.
+-----------------------------+-------------------+------------------------+
| Pipette Model | Tip Capacity (µL) | Default Flow Rate (µL) |
+=============================+===================+========================+
| 1- and 8-channel (50 µL) | 50 | 35 |
+-----------------------------+-------------------+------------------------+
| 1- and 8-channel (1000 µL) | 50 | 478 |
+ +-------------------+------------------------+
| | 200 | 716 |
+ +-------------------+------------------------+
| | 1000 | 716 |
+-----------------------------+-------------------+------------------------+
| 96-channel (5-1000 µL) | 50 | 6 |
+ +-------------------+------------------------+
| | 200 | 80 |
+ +-------------------+------------------------+
| | 1000 | 160 |
+-----------------------------+-------------------+------------------------+

Additionally:

- When using a 50 µL pipette, you should only use 50 µL tips.
- All Flex pipettes have a well bottom clearance of 1 mm for aspirate and dispense actions.

.. _ot2-flow-rates:

Expand Down
9 changes: 9 additions & 0 deletions api/release-notes-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ For more details about this release, please see the full [technical change log][

[technical change log]: https://github.com/Opentrons/opentrons/releases

## Internal Release 2.4.0-alpha.1

This internal release, pulled from the `edge` branch, contains features being developed for 8.4.0. It's for internal testing only.

### New Stuff In This Release (list in progress):

- Python API version bumped to 2.23
- Added liquid classes and new transfer functions

## Internal Release 2.3.0-alpha.2

This internal release, pulled from the `edge` branch, contains features being developed for 8.3.0. It's for internal testing only.
Expand Down
20 changes: 9 additions & 11 deletions api/src/opentrons/config/advanced_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,6 @@ class Setting(NamedTuple):
robot_type=[RobotTypeEnum.OT2, RobotTypeEnum.FLEX],
internal_only=True,
),
SettingDefinition(
_id="allowLiquidClasses",
title="Allow the use of liquid classes",
description=(
"Do not enable."
" This is an Opentrons internal setting to allow using in-development"
" liquid classes."
),
robot_type=[RobotTypeEnum.OT2, RobotTypeEnum.FLEX],
internal_only=True,
),
]


Expand Down Expand Up @@ -736,6 +725,14 @@ def _migrate35to36(previous: SettingsMap) -> SettingsMap:
return newmap


def _migrate36to37(previous: SettingsMap) -> SettingsMap:
"""Migrate to version 37 of the feature flags file.
- Removes the allowLiquidClasses flag.
"""
return {k: v for k, v in previous.items() if "allowLiquidClasses" != k}


_MIGRATIONS = [
_migrate0to1,
_migrate1to2,
Expand Down Expand Up @@ -773,6 +770,7 @@ def _migrate35to36(previous: SettingsMap) -> SettingsMap:
_migrate33to34,
_migrate34to35,
_migrate35to36,
_migrate36to37,
]
"""
List of all migrations to apply, indexed by (version - 1). See _migrate below
Expand Down
4 changes: 0 additions & 4 deletions api/src/opentrons/config/feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,3 @@ def enable_performance_metrics(robot_type: RobotTypeEnum) -> bool:

def oem_mode_enabled() -> bool:
return advs.get_setting_with_env_overload("enableOEMMode", RobotTypeEnum.FLEX)


def allow_liquid_classes(robot_type: RobotTypeEnum) -> bool:
return advs.get_setting_with_env_overload("allowLiquidClasses", robot_type)
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/core/engine/labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def set_calibration(self, delta: Point) -> None:

request = LabwareOffsetCreate.model_construct(
definitionUri=self.get_uri(),
location=offset_location,
locationSequence=offset_location,
vector=LabwareOffsetVector(x=delta.x, y=delta.y, z=delta.z),
)
self._engine_client.add_labware_offset(request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
from typing import Optional

from opentrons.hardware_control.modules import ModuleModel as HardwareModuleModel
from opentrons.protocol_engine import ProtocolEngine, LabwareOffsetLocation, ModuleModel
from opentrons.protocol_engine import (
ProtocolEngine,
LegacyLabwareOffsetLocation,
ModuleModel,
)
from opentrons.types import DeckSlotName, Point

from ..labware import LabwareLoadParams
Expand Down Expand Up @@ -81,9 +85,9 @@ def find(
See the parent class for param details.
"""
offset = self._labware_view.find_applicable_labware_offset(
offset = self._labware_view.find_applicable_labware_offset_by_legacy_location(
definition_uri=load_params.as_uri(),
location=LabwareOffsetLocation(
location=LegacyLabwareOffsetLocation(
slotName=deck_slot,
moduleModel=(
None
Expand Down
25 changes: 3 additions & 22 deletions api/src/opentrons/protocol_api/instrument_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
UnexpectedTipRemovalError,
UnsupportedHardwareCommand,
)
from opentrons_shared_data.robot.types import RobotTypeEnum

from opentrons.legacy_broker import LegacyBroker
from opentrons.hardware_control.dev_types import PipetteDict
Expand Down Expand Up @@ -38,7 +37,6 @@
from ._nozzle_layout import NozzleLayout
from ._liquid import LiquidClass
from . import labware, validation
from ..config import feature_flags
from ..protocols.advanced_control.transfers.common import (
TransferTipPolicyV2,
TransferTipPolicyV2Type,
Expand Down Expand Up @@ -1509,6 +1507,7 @@ def _execute_transfer(self, plan: v1_transfer.TransferPlan) -> None:
for cmd in plan:
getattr(self, cmd["method"])(*cmd["args"], **cmd["kwargs"])

@requires_version(2, 23)
def transfer_liquid(
self,
liquid_class: LiquidClass,
Expand All @@ -1528,13 +1527,6 @@ def transfer_liquid(
TODO: Add args description.
"""
if not feature_flags.allow_liquid_classes(
robot_type=RobotTypeEnum.robot_literal_to_enum(
self._protocol_core.robot_type
)
):
raise NotImplementedError("This method is not implemented.")

flat_sources_list = validation.ensure_valid_flat_wells_list_for_transfer_v2(
source
)
Expand Down Expand Up @@ -1604,6 +1596,7 @@ def transfer_liquid(
)
return self

@requires_version(2, 23)
def distribute_liquid(
self,
liquid_class: LiquidClass,
Expand All @@ -1623,13 +1616,6 @@ def distribute_liquid(
TODO: Add args description.
"""
if not feature_flags.allow_liquid_classes(
robot_type=RobotTypeEnum.robot_literal_to_enum(
self._protocol_core.robot_type
)
):
raise NotImplementedError("This method is not implemented.")

if not isinstance(source, labware.Well):
raise ValueError(f"Source should be a single Well but received {source}.")
flat_dests_list = validation.ensure_valid_flat_wells_list_for_transfer_v2(dest)
Expand Down Expand Up @@ -1689,6 +1675,7 @@ def distribute_liquid(
)
return self

@requires_version(2, 23)
def consolidate_liquid(
self,
liquid_class: LiquidClass,
Expand All @@ -1708,12 +1695,6 @@ def consolidate_liquid(
TODO: Add args description.
"""
if not feature_flags.allow_liquid_classes(
robot_type=RobotTypeEnum.robot_literal_to_enum(
self._protocol_core.robot_type
)
):
raise NotImplementedError("This method is not implemented.")
if not isinstance(dest, labware.Well):
raise ValueError(
f"Destination should be a single Well but received {dest}."
Expand Down
10 changes: 2 additions & 8 deletions api/src/opentrons/protocol_api/protocol_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@

from opentrons_shared_data.labware.types import LabwareDefinition
from opentrons_shared_data.pipette.types import PipetteNameType
from opentrons_shared_data.robot.types import RobotTypeEnum

from opentrons.types import Mount, Location, DeckLocation, DeckSlotName, StagingSlotName
from opentrons.config import feature_flags
from opentrons.legacy_broker import LegacyBroker
from opentrons.hardware_control.modules.types import (
MagneticBlockModel,
Expand Down Expand Up @@ -1354,17 +1352,13 @@ def define_liquid(
display_color=display_color,
)

@requires_version(2, 23)
def define_liquid_class(
self,
name: str,
) -> LiquidClass:
"""Define a liquid class for use in the protocol."""
if feature_flags.allow_liquid_classes(
robot_type=RobotTypeEnum.robot_literal_to_enum(self._core.robot_type)
):
return self._core.define_liquid_class(name=name)
else:
raise NotImplementedError("This method is not implemented.")
return self._core.define_liquid_class(name=name)

@property
@requires_version(2, 5)
Expand Down
6 changes: 4 additions & 2 deletions api/src/opentrons/protocol_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@

from .types import (
LabwareOffset,
LegacyLabwareOffsetCreate,
LabwareOffsetCreate,
LabwareOffsetVector,
LabwareOffsetLocation,
LegacyLabwareOffsetLocation,
LabwareMovementStrategy,
AddressableOffsetVector,
DeckPoint,
Expand Down Expand Up @@ -96,7 +97,8 @@
"LabwareOffset",
"LabwareOffsetCreate",
"LabwareOffsetVector",
"LabwareOffsetLocation",
"LegacyLabwareOffsetCreate",
"LegacyLabwareOffsetLocation",
"LabwareMovementStrategy",
"AddressableOffsetVector",
"DeckSlotLocation",
Expand Down
Loading

0 comments on commit 9d177c7

Please sign in to comment.