Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(step-generation, protocol-designer): atomic command args to … #17324

Open
wants to merge 9 commits into
base: edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { LabwareMovementStrategy } from '@opentrons/shared-data'
import type { HydratedMoveLabwareFormData } from '../../../form-types'
import type { MoveLabwareArgs } from '@opentrons/step-generation'

Expand All @@ -16,8 +17,10 @@ export const moveLabwareFormToArgs = (
commandCreatorFnName: 'moveLabware',
name: stepName,
description: stepDetails,
labware: labware.id,
useGripper,
labwareId: labware.id,
newLocation,
strategy: useGripper
? 'usingGripper'
: ('manualMoveWithPause' as LabwareMovementStrategy),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const generateRobotStateTimeline = (
curryCommandCreator(moveToAddressableArea, {
pipetteId,
addressableAreaName,
offset: { x: 0, y: 0, z: 0 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

}),
curryCommandCreator(dropTipInPlace, {
pipetteId,
Expand Down
2 changes: 1 addition & 1 deletion shared-data/command/types/annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface CommentRunTimeCommand
result?: any
}

interface CommentParams {
export interface CommentParams {
message: string
}

Expand Down
1 change: 1 addition & 0 deletions shared-data/command/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export * from './pipetting'
export * from './setup'
export * from './timing'
export * from './unsafe'
export * from './support'

// NOTE: these key/value pairs will only be present on commands at analysis/run time
// they pertain only to the actual execution status of a command on hardware, as opposed to
Expand Down
2 changes: 1 addition & 1 deletion shared-data/command/types/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ interface NozzleConfigurationParams {
style: NozzleConfigurationStyle
}

interface ConfigureNozzleLayoutParams {
export interface ConfigureNozzleLayoutParams {
pipetteId: string
configurationParams: NozzleConfigurationParams
}
4 changes: 2 additions & 2 deletions shared-data/command/types/timing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface WaitForResumeRunTimeCommand
result?: any
}

interface WaitForResumeParams {
export interface WaitForResumeParams {
message?: string
}

Expand All @@ -37,7 +37,7 @@ export interface WaitForDurationRunTimeCommand
result?: any
}

interface WaitForDurationParams {
export interface WaitForDurationParams {
seconds: number
message?: string
}
Expand Down
139 changes: 56 additions & 83 deletions step-generation/src/__tests__/aspirate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ import {
SOURCE_LABWARE,
getInitialRobotStateWithOffDeckLabwareStandard,
} from '../fixtures'
import type { LabwareDefinition2 } from '@opentrons/shared-data'
import type { AspDispAirgapParams } from '@opentrons/shared-data/protocol/types/schemaV3'
import type {
LabwareDefinition2,
AspDispAirgapParams,
} from '@opentrons/shared-data'
import type { InvariantContext, RobotState } from '../'

const fixtureTiprack10ul = tip10 as LabwareDefinition2
Expand All @@ -52,7 +54,10 @@ describe('aspirate', () => {
robotStateWithTip = getRobotStateWithTipStandard(invariantContext)
flowRateAndOffsets = {
flowRate: 6,
offsetFromBottomMm: 5,
wellLocation: {
origin: 'bottom',
offset: { z: 5, y: 0, x: 0 },
},
}
})
afterEach(() => {
Expand All @@ -62,14 +67,12 @@ describe('aspirate', () => {
const params = {
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tiprack1Id',
xOffset: 0,
yOffset: 0,
nozzles: null,
}
const result = aspirate(params, invariantContext, robotStateWithTip)
Expand Down Expand Up @@ -106,14 +109,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 201,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tiprack1Id',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -136,14 +137,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 301,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -159,14 +158,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: 'badPipette',
pipetteId: 'badPipette',
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -179,14 +176,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -202,14 +197,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: 'problemaaticLabwareId',
well: 'A1',
labwareId: 'problemaaticLabwareId',
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -229,14 +222,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand Down Expand Up @@ -264,14 +255,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand Down Expand Up @@ -299,14 +288,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand Down Expand Up @@ -340,14 +327,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand Down Expand Up @@ -375,14 +360,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand Down Expand Up @@ -416,14 +399,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -447,14 +428,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -477,14 +456,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -508,14 +485,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand All @@ -540,14 +515,12 @@ describe('aspirate', () => {
{
...({
...flowRateAndOffsets,
pipette: DEFAULT_PIPETTE,
pipetteId: DEFAULT_PIPETTE,
volume: 50,
labware: SOURCE_LABWARE,
well: 'A1',
labwareId: SOURCE_LABWARE,
wellName: 'A1',
} as AspDispAirgapParams),
tipRack: 'tipRack',
xOffset: 0,
yOffset: 0,
nozzles: null,
},
invariantContext,
Expand Down
1 change: 1 addition & 0 deletions step-generation/src/__tests__/blowout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('blowout', () => {
wellName: 'A1',
flowRate: 21.1,
wellLocation: {
origin: 'top',
offset: {
z: -1.3,
},
Expand Down
Loading
Loading