Skip to content

Commit

Permalink
draft2
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed May 16, 2024
1 parent b846d07 commit cd1c2a1
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 3,594 deletions.
2 changes: 2 additions & 0 deletions api/src/opentrons/hardware_control/modules/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def to_module_fixture_id(cls, module_type: ModuleType) -> str:
return "heaterShakerModuleV1"
if module_type == ModuleType.MAGNETIC_BLOCK:
return "magneticBlockV1"
if module_type == ModuleType.ABSORBANCE_READER:
return "absorbanceReaderV1"
else:
raise ValueError(
f"Module Type {module_type} does not have a related fixture ID."
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/core/engine/module_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class MagneticBlockCore(NonConnectedModuleCore, AbstractMagneticBlockCore):
"""Magnetic Block control interface via a ProtocolEngine."""


class AbsorbanceReaderMCore(ModuleCore, AbstractAbsorbanceReaderCore):
class AbsorbanceReaderCore(ModuleCore, AbstractAbsorbanceReaderCore):
"""Absorbance Reader core logic implementation for Python protocols."""

_sync_module_hardware: SynchronousAdapter[hw_modules.AbsorbanceReader]
Expand Down
2 changes: 2 additions & 0 deletions api/src/opentrons/protocol_api/core/engine/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
HeaterShakerModuleCore,
NonConnectedModuleCore,
MagneticBlockCore,
AbsorbanceReaderCore,
)
from .exceptions import InvalidModuleLocationError
from . import load_labware_params
Expand Down Expand Up @@ -455,6 +456,7 @@ def _create_module_core(
ModuleType.MAGNETIC: MagneticModuleCore,
ModuleType.THERMOCYCLER: ThermocyclerModuleCore,
ModuleType.HEATER_SHAKER: HeaterShakerModuleCore,
ModuleType.ABSORBANCE_READER: AbsorbanceReaderCore,
}

module_type = load_module_result.model.as_type()
Expand Down
12 changes: 6 additions & 6 deletions api/src/opentrons/protocol_api/core/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ class AbstractAbsorbanceReaderCore(AbstractModuleCore):
def get_serial_number(self) -> str:
"""Get the module's unique hardware serial number."""

@abstractmethod
def close_lid(self) -> None:
"""Close the Absorbance Reader's lid."""
# @abstractmethod
# def close_lid(self) -> None:
# """Close the Absorbance Reader's lid."""

@abstractmethod
def open_lid(self) -> None:
"""Open the Absorbance Reader's lid."""
# @abstractmethod
# def open_lid(self) -> None:
# """Open the Absorbance Reader's lid."""

@abstractmethod
def initialize(self, wavelength: int) -> None:
Expand Down
2 changes: 2 additions & 0 deletions api/src/opentrons/protocol_api/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
ThermocyclerModuleModel,
HeaterShakerModuleModel,
MagneticBlockModel,
AbsorbanceReaderModel,
ThermocyclerStep,
)

Expand Down Expand Up @@ -272,6 +273,7 @@ def ensure_definition_is_labware(definition: LabwareDefinition) -> None:
"thermocyclerModuleV2": ThermocyclerModuleModel.THERMOCYCLER_V2,
"heaterShakerModuleV1": HeaterShakerModuleModel.HEATER_SHAKER_V1,
"magneticBlockV1": MagneticBlockModel.MAGNETIC_BLOCK_V1,
"absorbanceReaderV1": AbsorbanceReaderModel.ABSORBANCE_READER_V1,
}


Expand Down
3 changes: 3 additions & 0 deletions api/src/opentrons/protocol_engine/state/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,9 @@ def ensure_and_convert_module_fixture_location(
]
elif model == ModuleModel.THERMOCYCLER_MODULE_V2:
return "thermocyclerModuleV2"
elif model == ModuleModel.ABSORBANCE_READER_V1:
valid_slots = "D3"
return "absorbanceReaderV1D3"
else:
raise ValueError(
f"Unknown module {model.name} has no addressable areas to provide."
Expand Down
24 changes: 24 additions & 0 deletions shared-data/deck/definitions/5/ot3_standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,17 @@
"zDimension": 0
},
"displayName": "Magnetic Block in A3"
},
{
"id": "absorbanceReaderV1D3",
"areaType": "absorbanceReader",
"offsetFromCutoutFixture": [0.0, 0.0, 10.65],
"boundingBox": {
"xDimension": 127.8,
"yDimension": 85.5,
"zDimension": 0
},
"displayName": "Absorbance Reader in D3"
}
],
"cutouts": [
Expand Down Expand Up @@ -1023,6 +1034,19 @@
},
"fixtureGroup": {},
"height": 38.0
},
{
"id": "absorbanceReaderV1",
"expectOpentronsModuleSerialNumber": false,
"mayMountTo": [
"cutoutD3"
],
"displayName": "Slot With an Absorbance Reader",
"providesAddressableAreas": {
"cutoutD3": ["absorbanceReaderV1D3"]
},
"fixtureGroup": {},
"height": 10.65
}
],
"gripperOffsets": {
Expand Down
2 changes: 2 additions & 0 deletions shared-data/deck/types/schemaV5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type FlexAddressableAreaName =
| 'magneticBlockV1B3'
| 'magneticBlockV1C3'
| 'magneticBlockV1D3'
| 'absorbanceReaderV1D3'

export type OT2AddressableAreaName =
| '1'
Expand Down Expand Up @@ -126,6 +127,7 @@ export type FlexModuleCutoutFixtureId =
| 'stagingAreaSlotWithMagneticBlockV1'
| 'thermocyclerModuleV2Rear'
| 'thermocyclerModuleV2Front'
| 'absorbanceReaderV1'

export type OT2SingleStandardSlot = 'singleStandardSlot'

Expand Down
12 changes: 12 additions & 0 deletions shared-data/js/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const THERMOCYCLER_MODULE_V2: 'thermocyclerModuleV2' =
'thermocyclerModuleV2'
export const HEATERSHAKER_MODULE_V1: 'heaterShakerModuleV1' =
'heaterShakerModuleV1'
export const ABSORBANCE_READER_V1: 'absorbanceReaderV1' =
'absorbanceReaderV1'

export const MAGNETIC_BLOCK_V1: 'magneticBlockV1' = 'magneticBlockV1'

Expand Down Expand Up @@ -75,6 +77,8 @@ export const THERMOCYCLER_MODULE_TYPE: 'thermocyclerModuleType' =
export const HEATERSHAKER_MODULE_TYPE: 'heaterShakerModuleType' =
'heaterShakerModuleType'
export const MAGNETIC_BLOCK_TYPE: 'magneticBlockType' = 'magneticBlockType'
export const ABSORBANCE_READER_TYPE: 'absorbanceReaderType' =
'absorbanceReaderType'

export const MAGNETIC_MODULE_MODELS = [MAGNETIC_MODULE_V1, MAGNETIC_MODULE_V2]

Expand All @@ -92,6 +96,8 @@ export const THERMOCYCLER_MODULE_MODELS = [

export const HEATERSHAKER_MODULE_MODELS = [HEATERSHAKER_MODULE_V1]

export const ABSORBANCE_READER_MODELS = [ABSORBANCE_READER_V1]

export const MAGNETIC_BLOCK_MODELS = [MAGNETIC_BLOCK_V1]

export const MODULE_MODELS = [
Expand All @@ -100,6 +106,7 @@ export const MODULE_MODELS = [
...THERMOCYCLER_MODULE_MODELS,
...HEATERSHAKER_MODULE_MODELS,
...MAGNETIC_BLOCK_MODELS,
...ABSORBANCE_READER_MODELS,
]

export const MODULE_MODELS_OT2_ONLY = [
Expand All @@ -114,6 +121,7 @@ export const MODULE_TYPES = [
THERMOCYCLER_MODULE_TYPE,
HEATERSHAKER_MODULE_TYPE,
MAGNETIC_BLOCK_TYPE,
ABSORBANCE_READER_TYPE,
]

export const GEN_ONE_MULTI_PIPETTES = ['p10_multi', 'p50_multi', 'p300_multi']
Expand Down Expand Up @@ -344,6 +352,9 @@ export const MAGNETIC_BLOCK_C3_ADDRESSABLE_AREA: 'magneticBlockV1C3' =
'magneticBlockV1C3'
export const MAGNETIC_BLOCK_D3_ADDRESSABLE_AREA: 'magneticBlockV1D3' =
'magneticBlockV1D3'
export const ABSORBANCE_READER_D3_ADDRESSABLE_AREA: 'absorbanceReaderV1D3' =
'absorbanceReaderV1D3'


export const MAGNETIC_BLOCK_ADDRESSABLE_AREAS: AddressableAreaName[] = [
MAGNETIC_BLOCK_A1_ADDRESSABLE_AREA,
Expand Down Expand Up @@ -384,6 +395,7 @@ export const HEATERSHAKER_ADDRESSABLE_AREAS: AddressableAreaName[] = [

export const FLEX_USB_MODULE_ADDRESSABLE_AREAS: AddressableAreaName[] = [
THERMOCYCLER_ADDRESSABLE_AREA,
ABSORBANCE_READER_D3_ADDRESSABLE_AREA,
...HEATERSHAKER_ADDRESSABLE_AREAS,
...TEMPERATURE_MODULE_ADDRESSABLE_AREAS,
]
Expand Down
5 changes: 5 additions & 0 deletions shared-data/js/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import thermocyclerModuleV1 from '../module/definitions/3/thermocyclerModuleV1.j
import thermocyclerModuleV2 from '../module/definitions/3/thermocyclerModuleV2.json'
import heaterShakerModuleV1 from '../module/definitions/3/heaterShakerModuleV1.json'
import magneticBlockV1 from '../module/definitions/3/magneticBlockV1.json'
import absorbanceReaderV1 from '../module/definitions/3/absorbanceReaderV1.json'

import {
MAGDECK,
Expand All @@ -19,6 +20,7 @@ import {
THERMOCYCLER_MODULE_V2,
HEATERSHAKER_MODULE_V1,
MAGNETIC_BLOCK_V1,
ABSORBANCE_READER_V1,
} from './constants'

import type {
Expand Down Expand Up @@ -56,6 +58,9 @@ export const getModuleDef2 = (moduleModel: ModuleModel): ModuleDefinition => {
case MAGNETIC_BLOCK_V1:
return (magneticBlockV1 as unknown) as ModuleDefinition

case ABSORBANCE_READER_V1:
return (absorbanceReaderV1 as unknown) as ModuleDefinition

default:
throw new Error(`Invalid module model ${moduleModel as string}`)
}
Expand Down
6 changes: 6 additions & 0 deletions shared-data/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import {
THERMOCYCLER_MODULE_V1,
THERMOCYCLER_MODULE_V2,
HEATERSHAKER_MODULE_V1,
ABSORBANCE_READER_V1,
MAGNETIC_MODULE_TYPE,
TEMPERATURE_MODULE_TYPE,
THERMOCYCLER_MODULE_TYPE,
HEATERSHAKER_MODULE_TYPE,
MAGNETIC_BLOCK_TYPE,
ABSORBANCE_READER_TYPE,
GEN1,
GEN2,
FLEX,
Expand Down Expand Up @@ -201,6 +203,7 @@ export type ModuleType =
| typeof THERMOCYCLER_MODULE_TYPE
| typeof HEATERSHAKER_MODULE_TYPE
| typeof MAGNETIC_BLOCK_TYPE
| typeof ABSORBANCE_READER_TYPE

// ModuleModel corresponds to top-level keys in shared-data/module/definitions/2
export type MagneticModuleModel =
Expand All @@ -219,12 +222,15 @@ export type HeaterShakerModuleModel = typeof HEATERSHAKER_MODULE_V1

export type MagneticBlockModel = typeof MAGNETIC_BLOCK_V1

export type AbsorbanceReaderModel = typeof ABSORBANCE_READER_V1

export type ModuleModel =
| MagneticModuleModel
| TemperatureModuleModel
| ThermocyclerModuleModel
| HeaterShakerModuleModel
| MagneticBlockModel
| AbsorbanceReaderModel

export type GripperModel =
| typeof GRIPPER_V1
Expand Down

0 comments on commit cd1c2a1

Please sign in to comment.