Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Expand Up @@ -294,21 +294,21 @@ mock_pipette.move_to(mock_source_plate["A1"].top(z=2))
mock_pipette.prepare_to_aspirate()
mock_pipette.move_to(mock_source_plate["A1"].bottom())
mock_pipette.move_to(mock_source_plate["A1"].bottom())
mock_pipette.aspirate(...)
mock_pipette.aspirate(volume=5, flow_rate=3.78)
mock_pipette.move_to(mock_source_plate["A1"].bottom())
mock_pipette.move_to(mock_dest_plate["A12"].bottom())
mock_pipette.move_to(mock_dest_plate["A12"].bottom())
mock_pipette.dispense(...)
mock_pipette.dispense(volume=5, flow_rate=3.78)
mock_pipette.move_to(mock_dest_plate["A12"].bottom())
mock_pipette.move_to(mock_source_plate["A2"].top(z=2))
mock_pipette.prepare_to_aspirate()
mock_pipette.move_to(mock_source_plate["A2"].bottom())
mock_pipette.move_to(mock_source_plate["A2"].bottom())
mock_pipette.aspirate(...)
mock_pipette.aspirate(volume=5, flow_rate=3.78)
mock_pipette.move_to(mock_source_plate["A2"].bottom())
mock_pipette.move_to(mock_dest_plate["A12"].bottom())
mock_pipette.move_to(mock_dest_plate["A12"].bottom())
mock_pipette.dispense(...)
mock_pipette.dispense(volume=5, flow_rate=3.78)
mock_pipette.move_to(mock_dest_plate["A12"].bottom())
mock_pipette.drop_tip()
`.trim(),
Expand All @@ -319,11 +319,11 @@ mock_pipette_p300_multi.move_to(mock_source_plate["A1"].top(z=2))
mock_pipette_p300_multi.prepare_to_aspirate()
mock_pipette_p300_multi.move_to(mock_source_plate["A1"].bottom())
mock_pipette_p300_multi.move_to(mock_source_plate["A1"].bottom())
mock_pipette_p300_multi.aspirate(...)
mock_pipette_p300_multi.aspirate(volume=5, flow_rate=3.78)
mock_pipette_p300_multi.move_to(mock_source_plate["A1"].bottom())
mock_pipette_p300_multi.move_to(mock_dest_plate["A12"].bottom())
mock_pipette_p300_multi.move_to(mock_dest_plate["A12"].bottom())
mock_pipette_p300_multi.dispense(...)
mock_pipette_p300_multi.dispense(volume=5, flow_rate=3.78)
mock_pipette_p300_multi.move_to(mock_dest_plate["A12"].bottom())
mock_pipette_p300_multi.drop_tip()
`.trim(),
Expand Down
2 changes: 1 addition & 1 deletion step-generation/src/__tests__/aspirate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('aspirate', () => {
mock_pipette.aspirate(
volume=50,
location=mock_source_plate["A1"].bottom(z=5),
rate=6 / mock_pipette.flow_rate.aspirate,
flow_rate=6,
)`.trimStart()
)
})
Expand Down
6 changes: 1 addition & 5 deletions step-generation/src/__tests__/aspirateInPlace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ describe('aspirateInPlace', () => {
},
])
expect(getSuccessResult(result).python).toBe(
`
mock_pipette.aspirate(
volume=10,
rate=20 / mock_pipette.flow_rate.aspirate,
)`.trimStart()
`mock_pipette.aspirate(volume=10, flow_rate=20)`
)
})
})
2 changes: 1 addition & 1 deletion step-generation/src/__tests__/dispense.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('dispense', () => {
mock_pipette.dispense(
volume=50,
location=mock_source_plate["A1"].bottom(z=5),
rate=6 / mock_pipette.flow_rate.dispense,
flow_rate=6,
)`.trimStart()
)
})
Expand Down
8 changes: 1 addition & 7 deletions step-generation/src/__tests__/dispenseInPlace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ describe('dispenseInPlace', () => {
},
},
])
expect(res.python).toBe(
`
mock_pipette.dispense(
volume=10,
rate=10 / mock_pipette.flow_rate.dispense,
)`.trimStart()
)
expect(res.python).toBe(`mock_pipette.dispense(volume=10, flow_rate=10)`)
})
})
4 changes: 1 addition & 3 deletions step-generation/src/commandCreators/atomic/aspirate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ export const aspirate: CommandCreator<ExtendedAspirateParams> = (
`location=${labwarePythonName}[${formatPyStr(
wellName
)}]${formatPyWellLocation(wellLocation)}`,
// rate= is a ratio in the PAPI, and we have no good way to figure out what
// flowrate the PAPI has set the pipette to, so we just have to do a division:
`rate=${flowRate} / ${pipettePythonName}.flow_rate.aspirate`,
`flow_rate=${flowRate}`,
]
const python = `${pipettePythonName}.aspirate(\n${indentPyLines(
pythonArgs.join(',\n')
Expand Down
10 changes: 3 additions & 7 deletions step-generation/src/commandCreators/atomic/aspirateInPlace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as errorCreators from '../../errorCreators'
import { indentPyLines, uuid } from '../../utils'
import { uuid } from '../../utils'

import type { AspirateInPlaceParams } from '@opentrons/shared-data'
import type { CommandCreator, CommandCreatorError } from '../../types'
Expand Down Expand Up @@ -37,14 +37,10 @@ export const aspirateInPlace: CommandCreator<AspirateInPlaceParams> = (
invariantContext.pipetteEntities[pipetteId].pythonName
const pythonArgs = [
`volume=${volume}`,
// rate= is a ratio in the PAPI, and we have no good way to figure out what
// flowrate the PAPI has set the pipette to, so we just have to do a division:
`rate=${flowRate} / ${pipettePythonName}.flow_rate.aspirate`,
`flow_rate=${flowRate}`,
// Note that correction volume is not supported in our public atomic liquid handling APIs
]
const python = `${pipettePythonName}.aspirate(\n${indentPyLines(
pythonArgs.join(',\n')
)},\n)`
const python = `${pipettePythonName}.aspirate(${pythonArgs.join(', ')})`

if (errors.length > 0) {
return {
Expand Down
4 changes: 1 addition & 3 deletions step-generation/src/commandCreators/atomic/dispense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ export const dispense: CommandCreator<DispenseAtomicCommandParams> = (
`location=${labwarePythonName}[${formatPyStr(
wellName
)}]${formatPyWellLocation(wellLocation)}`,
// rate= is a ratio in the PAPI, and we have no good way to figure out what
// flowrate the PAPI has set the pipette to, so we just have to emit a division:
`rate=${flowRate} / ${pipettePythonName}.flow_rate.dispense`,
`flow_rate=${flowRate}`,
// only pass push_out if it is not null
...(pushOut != null ? [`push_out=${pushOut}`] : []),
// PAPI has no way to indicate that we're dispensing air, so we don't do anything
Expand Down
10 changes: 3 additions & 7 deletions step-generation/src/commandCreators/atomic/dispenseInPlace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as errorCreators from '../../errorCreators'
import { indentPyLines, uuid } from '../../utils'
import { uuid } from '../../utils'

import type { DispenseInPlaceParams } from '@opentrons/shared-data'
import type { CommandCreator, CommandCreatorError } from '../../types'
Expand Down Expand Up @@ -38,15 +38,11 @@ export const dispenseInPlace: CommandCreator<DispenseInPlaceParams> = (
invariantContext.pipetteEntities[pipetteId].pythonName
const pythonArgs = [
`volume=${volume}`,
// rate= is a ratio in the PAPI, and we have no good way to figure out what
// flowrate the PAPI has set the pipette to, so we just have to do a division:
`rate=${flowRate} / ${pipettePythonName}.flow_rate.dispense`,
`flow_rate=${flowRate}`,
...(pushOut != null ? [`push_out=${pushOut}`] : []),
// Note that correction volume is not supported in our public atomic liquid handling APIs
]
const python = `${pipettePythonName}.dispense(\n${indentPyLines(
pythonArgs.join(',\n')
)},\n)`
const python = `${pipettePythonName}.dispense(${pythonArgs.join(', ')})`

if (errors.length > 0) {
return {
Expand Down
Loading