Skip to content

Commit 9eb8ca0

Browse files
committed
Give all misc.ts helper functions consistent names.
1 parent d72ee2c commit 9eb8ca0

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

step-generation/src/__tests__/blowoutUtil.test.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { beforeEach, describe, it, expect, vi } from 'vitest'
22
import {
3-
blowoutUtil,
3+
blowoutLocationHelper,
44
SOURCE_WELL_BLOWOUT_DESTINATION,
55
DEST_WELL_BLOWOUT_DESTINATION,
66
} from '../utils'
@@ -55,7 +55,7 @@ describe('blowoutUtil', () => {
5555
vi.mocked(curryCommandCreator).mockClear()
5656
})
5757
it('blowoutUtil curries blowout with source well params', () => {
58-
blowoutUtil({
58+
blowoutLocationHelper({
5959
...blowoutArgs,
6060
blowoutLocation: SOURCE_WELL_BLOWOUT_DESTINATION,
6161
})
@@ -84,7 +84,7 @@ describe('blowoutUtil', () => {
8484
},
8585
},
8686
}
87-
blowoutUtil({
87+
blowoutLocationHelper({
8888
...blowoutArgs,
8989
destLabwareId: wasteChuteId,
9090
invariantContext: invariantContext,
@@ -98,7 +98,7 @@ describe('blowoutUtil', () => {
9898
})
9999
})
100100
it('blowoutUtil curries blowout with dest plate params', () => {
101-
blowoutUtil({
101+
blowoutLocationHelper({
102102
...blowoutArgs,
103103
blowoutLocation: DEST_WELL_BLOWOUT_DESTINATION,
104104
})
@@ -116,7 +116,7 @@ describe('blowoutUtil', () => {
116116
})
117117
})
118118
it('blowoutUtil curries blowout with an arbitrary labware Id', () => {
119-
blowoutUtil({
119+
blowoutLocationHelper({
120120
...blowoutArgs,
121121
blowoutLocation: TROUGH_LABWARE,
122122
})
@@ -134,7 +134,7 @@ describe('blowoutUtil', () => {
134134
})
135135
})
136136
it('blowoutUtil returns an empty array if not given a blowoutLocation', () => {
137-
const result = blowoutUtil({
137+
const result = blowoutLocationHelper({
138138
...blowoutArgs,
139139
blowoutLocation: null,
140140
})

step-generation/src/commandCreators/compound/consolidate.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import * as errorCreators from '../../errorCreators'
99
import { getPipetteWithTipMaxVol } from '../../robotStateSelectors'
1010
import { dropTipInTrash } from './dropTipInTrash'
1111
import {
12-
blowoutUtil,
12+
blowoutLocationHelper,
1313
curryCommandCreator,
1414
reduceCommandCreators,
15-
airGapHelper,
15+
airGapLocationHelper,
1616
dispenseLocationHelper,
1717
moveHelper,
1818
getIsSafePipetteMovement,
@@ -383,7 +383,7 @@ export const consolidate: CommandCreator<ConsolidateArgs> = (
383383
]
384384
: []
385385

386-
const blowoutCommand = blowoutUtil({
386+
const blowoutCommand = blowoutLocationHelper({
387387
pipette: args.pipette,
388388
sourceLabwareId: args.sourceLabware,
389389
sourceWell: sourceWellChunk[0],
@@ -399,7 +399,7 @@ export const consolidate: CommandCreator<ConsolidateArgs> = (
399399
const airGapAfterDispenseCommands =
400400
dispenseAirGapVolume && !willReuseTip
401401
? [
402-
curryCommandCreator(airGapHelper, {
402+
curryCommandCreator(airGapLocationHelper, {
403403
pipetteId: args.pipette,
404404
volume: dispenseAirGapVolume,
405405
destinationId: args.destLabware,

step-generation/src/commandCreators/compound/distribute.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { dropTipInTrash } from './dropTipInTrash'
1313
import {
1414
curryCommandCreator,
1515
reduceCommandCreators,
16-
blowoutUtil,
16+
blowoutLocationHelper,
1717
getDispenseAirGapLocation,
1818
getIsSafePipetteMovement,
1919
getHasWasteChute,
@@ -369,7 +369,7 @@ export const distribute: CommandCreator<DistributeArgs> = (
369369
const dropTipAfterDispenseAirGap =
370370
airGapAfterDispenseCommands.length > 0 ? dropTipCommand : []
371371
const blowoutCommands = disposalVolume
372-
? blowoutUtil({
372+
? blowoutLocationHelper({
373373
pipette: pipette,
374374
sourceLabwareId: args.sourceLabware,
375375
sourceWell: args.sourceWell,

step-generation/src/commandCreators/compound/mix.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from '@opentrons/shared-data'
77
import {
88
repeatArray,
9-
blowoutUtil,
9+
blowoutLocationHelper,
1010
curryCommandCreator,
1111
reduceCommandCreators,
1212
getIsSafePipetteMovement,
@@ -260,7 +260,7 @@ export const mix: CommandCreator<MixArgs> = (
260260
}),
261261
]
262262
: []
263-
const blowoutCommand = blowoutUtil({
263+
const blowoutCommand = blowoutLocationHelper({
264264
pipette: data.pipette,
265265
sourceLabwareId: data.labware,
266266
sourceWell: well,

step-generation/src/commandCreators/compound/transfer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import * as errorCreators from '../../errorCreators'
88
import { getPipetteWithTipMaxVol } from '../../robotStateSelectors'
99
import { dropTipInTrash } from './dropTipInTrash'
1010
import {
11-
blowoutUtil,
11+
blowoutLocationHelper,
1212
curryCommandCreator,
13-
airGapHelper,
13+
airGapLocationHelper,
1414
reduceCommandCreators,
1515
getTrashOrLabware,
1616
dispenseLocationHelper,
@@ -475,7 +475,7 @@ export const transfer: CommandCreator<TransferArgs> = (
475475
]
476476
: []
477477

478-
const blowoutCommand = blowoutUtil({
478+
const blowoutCommand = blowoutLocationHelper({
479479
pipette: args.pipette,
480480
sourceLabwareId: args.sourceLabware,
481481
sourceWell: sourceWell,
@@ -490,7 +490,7 @@ export const transfer: CommandCreator<TransferArgs> = (
490490
const airGapAfterDispenseCommands =
491491
dispenseAirGapVolume && !willReuseTip
492492
? [
493-
curryCommandCreator(airGapHelper, {
493+
curryCommandCreator(airGapLocationHelper, {
494494
sourceWell,
495495
blowOutLocation: args.blowoutLocation,
496496
sourceId: args.sourceLabware,

step-generation/src/utils/misc.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export function getWellsForTips(
317317
// Set blowout location depending on the 'blowoutLocation' arg: set it to
318318
// the SOURCE_WELL_BLOWOUT_DESTINATION / DEST_WELL_BLOWOUT_DESTINATION
319319
// special strings, or to a labware ID.
320-
export const blowoutUtil = (args: {
320+
export const blowoutLocationHelper = (args: {
321321
pipette: BlowoutParams['pipetteId']
322322
sourceLabwareId: string
323323
sourceWell: BlowoutParams['wellName']
@@ -702,7 +702,7 @@ export const moveHelper: CommandCreator<MoveHelperArgs> = (
702702
return reduceCommandCreators(commands, invariantContext, prevRobotState)
703703
}
704704

705-
interface AirGapArgs {
705+
interface AirGapLocationArgs {
706706
// destinationId is either labware or addressableAreaName for waste chute
707707
destinationId: string
708708
destWell: string | null
@@ -713,7 +713,7 @@ interface AirGapArgs {
713713
sourceId?: string
714714
sourceWell?: string
715715
}
716-
export const airGapHelper: CommandCreator<AirGapArgs> = (
716+
export const airGapLocationHelper: CommandCreator<AirGapLocationArgs> = (
717717
args,
718718
invariantContext,
719719
prevRobotState

0 commit comments

Comments
 (0)