diff --git a/api/Makefile b/api/Makefile index 90e3282b01f..be6ab685663 100755 --- a/api/Makefile +++ b/api/Makefile @@ -124,12 +124,12 @@ test-ot2: .PHONY: lint lint: $(python) -m mypy src tests - $(python) -m black --check src tests setup.py + $(python) -m black --check src tests docs/v2/example_protocols setup.py $(python) -m flake8 src tests setup.py .PHONY: format format: - $(python) -m black src tests setup.py + $(python) -m black src tests docs/v2/example_protocols setup.py docs/build/html/v%: docs/v% $(sphinx_build) -b html -d docs/build/doctrees -n $< $@ diff --git a/api/docs/v2/example_protocols/dilution_tutorial.py b/api/docs/v2/example_protocols/dilution_tutorial.py index a7d38c53eb4..0f5878f41f5 100644 --- a/api/docs/v2/example_protocols/dilution_tutorial.py +++ b/api/docs/v2/example_protocols/dilution_tutorial.py @@ -8,26 +8,29 @@ https://docs.opentrons.com/v2/tutorial.html. It takes a solution and progressively dilutes it by transferring it stepwise across a plate.""", - "author": "New API User" - } + "author": "New API User", +} + def run(protocol: protocol_api.ProtocolContext): - tips = protocol.load_labware("opentrons_96_tiprack_300ul", 1) - reservoir = protocol.load_labware("nest_12_reservoir_15ml", 2) - plate = protocol.load_labware("nest_96_wellplate_200ul_flat", 3) - left_pipette = protocol.load_instrument("p300_single_gen2", "left", tip_racks=[tips]) + tips = protocol.load_labware("opentrons_96_tiprack_300ul", 1) + reservoir = protocol.load_labware("nest_12_reservoir_15ml", 2) + plate = protocol.load_labware("nest_96_wellplate_200ul_flat", 3) + left_pipette = protocol.load_instrument( + "p300_single_gen2", "left", tip_racks=[tips] + ) - # distribute diluent - left_pipette.transfer(100, reservoir["A1"], plate.wells()) + # distribute diluent + left_pipette.transfer(100, reservoir["A1"], plate.wells()) - # loop through each row - for i in range(8): + # loop through each row + for i in range(8): - # save the destination row to a variable - row = plate.rows()[i] + # save the destination row to a variable + row = plate.rows()[i] - # transfer solution to first well in column - left_pipette.transfer(100, reservoir["A2"], row[0], mix_after=(3, 50)) + # transfer solution to first well in column + left_pipette.transfer(100, reservoir["A2"], row[0], mix_after=(3, 50)) - # dilute the sample down the row - left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) \ No newline at end of file + # dilute the sample down the row + left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) diff --git a/api/docs/v2/example_protocols/dilution_tutorial_flex.py b/api/docs/v2/example_protocols/dilution_tutorial_flex.py index bc3cad10dd7..37fd5738932 100644 --- a/api/docs/v2/example_protocols/dilution_tutorial_flex.py +++ b/api/docs/v2/example_protocols/dilution_tutorial_flex.py @@ -7,20 +7,20 @@ https://docs.opentrons.com/v2/tutorial.html. It takes a solution and progressively dilutes it by transferring it stepwise across a plate.""", - "author": "New API User" - } - -requirements = { - "robotType": "Flex", - "apiLevel": "2.16" - } + "author": "New API User", +} + +requirements = {"robotType": "Flex", "apiLevel": "2.16"} + def run(protocol: protocol_api.ProtocolContext): tips = protocol.load_labware("opentrons_flex_96_tiprack_200ul", "D1") reservoir = protocol.load_labware("nest_12_reservoir_15ml", "D2") plate = protocol.load_labware("nest_96_wellplate_200ul_flat", "D3") trash = protocol.load_trash_bin("A3") - left_pipette = protocol.load_instrument("flex_1channel_1000", "left", tip_racks=[tips]) + left_pipette = protocol.load_instrument( + "flex_1channel_1000", "left", tip_racks=[tips] + ) # distribute diluent left_pipette.transfer(100, reservoir["A1"], plate.wells()) @@ -35,4 +35,4 @@ def run(protocol: protocol_api.ProtocolContext): left_pipette.transfer(100, reservoir["A2"], row[0], mix_after=(3, 50)) # dilute the sample down the row - left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) \ No newline at end of file + left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) diff --git a/api/docs/v2/example_protocols/dilution_tutorial_multi.py b/api/docs/v2/example_protocols/dilution_tutorial_multi.py index a121d345a58..1d4e75dea43 100644 --- a/api/docs/v2/example_protocols/dilution_tutorial_multi.py +++ b/api/docs/v2/example_protocols/dilution_tutorial_multi.py @@ -8,25 +8,28 @@ https://docs.opentrons.com/v2/tutorial.html. It takes a solution and progressively dilutes it by transferring it stepwise across a plate.""", - "author": "New API User" - } - + "author": "New API User", +} + + def run(protocol: protocol_api.ProtocolContext): - tips = protocol.load_labware("opentrons_96_tiprack_300ul", 1) - reservoir = protocol.load_labware("nest_12_reservoir_15ml", 2) - plate = protocol.load_labware("nest_96_wellplate_200ul_flat", 3) - left_pipette = protocol.load_instrument("p300_multi_gen2", "right", tip_racks=[tips]) + tips = protocol.load_labware("opentrons_96_tiprack_300ul", 1) + reservoir = protocol.load_labware("nest_12_reservoir_15ml", 2) + plate = protocol.load_labware("nest_96_wellplate_200ul_flat", 3) + left_pipette = protocol.load_instrument( + "p300_multi_gen2", "right", tip_racks=[tips] + ) - # distribute diluent - left_pipette.transfer(100, reservoir["A1"], plate.rows()[0]) + # distribute diluent + left_pipette.transfer(100, reservoir["A1"], plate.rows()[0]) - # no loop, 8-channel pipette + # no loop, 8-channel pipette - # save the destination row to a variable - row = plate.rows()[0] + # save the destination row to a variable + row = plate.rows()[0] - # transfer solution to first well in column - left_pipette.transfer(100, reservoir["A2"], row[0], mix_after=(3, 50)) + # transfer solution to first well in column + left_pipette.transfer(100, reservoir["A2"], row[0], mix_after=(3, 50)) - # dilute the sample down the row - left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) \ No newline at end of file + # dilute the sample down the row + left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) diff --git a/api/docs/v2/example_protocols/dilution_tutorial_multi_flex.py b/api/docs/v2/example_protocols/dilution_tutorial_multi_flex.py index 21f659db62c..739ed266a34 100644 --- a/api/docs/v2/example_protocols/dilution_tutorial_multi_flex.py +++ b/api/docs/v2/example_protocols/dilution_tutorial_multi_flex.py @@ -7,23 +7,23 @@ https://docs.opentrons.com/v2/tutorial.html. It takes a solution and progressively dilutes it by transferring it stepwise across a plate.""", - "author": "New API User" - } - -requirements = { - "robotType": "Flex", - "apiLevel": "2.16" - } - + "author": "New API User", +} + +requirements = {"robotType": "Flex", "apiLevel": "2.16"} + + def run(protocol: protocol_api.ProtocolContext): tips = protocol.load_labware("opentrons_96_tiprack_300ul", "D1") reservoir = protocol.load_labware("nest_12_reservoir_15ml", "D2") plate = protocol.load_labware("nest_96_wellplate_200ul_flat", "D3") trash = protocol.load_trash_bin("A3") - left_pipette = protocol.load_instrument("flex_8channel_1000", "right", tip_racks=[tips]) + left_pipette = protocol.load_instrument( + "flex_8channel_1000", "right", tip_racks=[tips] + ) # distribute diluent - left_pipette.transfer(100, reservoir["A1"], plate.rows()[0]) + left_pipette.transfer(100, reservoir["A1"], plate.rows()[0]) # no loop, 8-channel pipette @@ -34,4 +34,4 @@ def run(protocol: protocol_api.ProtocolContext): left_pipette.transfer(100, reservoir["A2"], row[0], mix_after=(3, 50)) # dilute the sample down the row - left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50)) \ No newline at end of file + left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50))