From c7553cb0fbe99d1ff6746f6b74fb763758a4917c Mon Sep 17 00:00:00 2001 From: amit lissack Date: Wed, 27 Oct 2021 16:12:18 -0400 Subject: [PATCH] fix bug. --- .../g_code_test_data/g_code_configuration.py | 4 ++-- .../g_code_test_data/http/modules/magdeck.py | 8 ++++---- .../g_code_test_data/http/modules/tempdeck.py | 8 ++++---- .../http/modules/thermocycler.py | 17 ++++++++--------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/g-code-testing/g_code_test_data/g_code_configuration.py b/g-code-testing/g_code_test_data/g_code_configuration.py index a26f8a78a54..b80edcf092b 100644 --- a/g-code-testing/g_code_test_data/g_code_configuration.py +++ b/g-code-testing/g_code_test_data/g_code_configuration.py @@ -84,7 +84,7 @@ class ProtocolGCodeConfirmConfig(BaseModel, SharedFunctionsMixin): name: constr(regex=r'^[a-z0-9_]*$') path: str settings: Settings - driver = 'protocol' + driver: str = 'protocol' marks: List[Mark] = [pytest.mark.g_code_confirm] class Config: @@ -99,7 +99,7 @@ class HTTPGCodeConfirmConfig(BaseModel, SharedFunctionsMixin): name: constr(regex=r'^[a-z0-9_]*$') executable: Callable settings: Settings - driver = 'http' + driver: str = 'http' marks: List[Mark] = [pytest.mark.g_code_confirm] class Config: diff --git a/g-code-testing/g_code_test_data/http/modules/magdeck.py b/g-code-testing/g_code_test_data/http/modules/magdeck.py index 79054e5faf9..e1dc2b573de 100644 --- a/g-code-testing/g_code_test_data/http/modules/magdeck.py +++ b/g-code-testing/g_code_test_data/http/modules/magdeck.py @@ -3,14 +3,14 @@ from g_code_test_data.g_code_configuration import HTTPGCodeConfirmConfig from robot_server.service.legacy.routers.modules import post_serial_command from robot_server.service.legacy.models.modules import SerialCommand -from opentrons.hardware_control.emulation.magdeck import SERIAL as SERIAL_NUM + MAGDECK_CALIBRATE = HTTPGCodeConfirmConfig( name='magdeck_calibrate', executable=partial( post_serial_command, command=SerialCommand(command_type='calibrate'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.magdeck.serial_number, ), settings=HTTP_SETTINGS, ) @@ -20,7 +20,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='deactivate'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.magdeck.serial_number, ), settings=HTTP_SETTINGS, ) @@ -30,7 +30,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='engage', args=[5.1]), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.magdeck.serial_number, ), settings=HTTP_SETTINGS, ) diff --git a/g-code-testing/g_code_test_data/http/modules/tempdeck.py b/g-code-testing/g_code_test_data/http/modules/tempdeck.py index 6b13fce9e43..6ff1a640838 100644 --- a/g-code-testing/g_code_test_data/http/modules/tempdeck.py +++ b/g-code-testing/g_code_test_data/http/modules/tempdeck.py @@ -3,14 +3,14 @@ from g_code_test_data.g_code_configuration import HTTPGCodeConfirmConfig from robot_server.service.legacy.routers.modules import post_serial_command from robot_server.service.legacy.models.modules import SerialCommand -from opentrons.hardware_control.emulation.tempdeck import SERIAL as SERIAL_NUM + TEMPDECK_DEACTIVATE = HTTPGCodeConfirmConfig( name='tempdeck_deactivate', executable=partial( post_serial_command, command=SerialCommand(command_type='deactivate'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.tempdeck.serial_number, ), settings=HTTP_SETTINGS, ) @@ -22,7 +22,7 @@ # Keep the args at a low value because the temp starts and 0.0 and only # changes 0.25 degrees every second command=SerialCommand(command_type='set_temperature', args=[2.0]), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.tempdeck.serial_number, ), settings=HTTP_SETTINGS, ) @@ -34,7 +34,7 @@ # This function does not wait on the tempdeck to finish coming to temp # so no need to set to a low value command=SerialCommand(command_type='start_set_temperature', args=[40.0]), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.tempdeck.serial_number, ), settings=HTTP_SETTINGS, ) diff --git a/g-code-testing/g_code_test_data/http/modules/thermocycler.py b/g-code-testing/g_code_test_data/http/modules/thermocycler.py index 37ec7ba13bb..1485f8719c5 100644 --- a/g-code-testing/g_code_test_data/http/modules/thermocycler.py +++ b/g-code-testing/g_code_test_data/http/modules/thermocycler.py @@ -3,7 +3,6 @@ from g_code_test_data.g_code_configuration import HTTPGCodeConfirmConfig from robot_server.service.legacy.routers.modules import post_serial_command from robot_server.service.legacy.models.modules import SerialCommand -from opentrons.hardware_control.emulation.thermocycler import SERIAL as SERIAL_NUM THERMOCYCLER_CLOSE = HTTPGCodeConfirmConfig( @@ -11,7 +10,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='close'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -21,7 +20,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='open'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -31,7 +30,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='deactivate'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -41,7 +40,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='deactivate_block'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -51,7 +50,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='deactivate_lid'), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -66,7 +65,7 @@ , 1 ] ), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -76,7 +75,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='set_lid_temperature', args=[37.0]), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, ) @@ -86,7 +85,7 @@ executable=partial( post_serial_command, command=SerialCommand(command_type='set_temperature', args=[1.0]), - serial=SERIAL_NUM, + serial=HTTP_SETTINGS.thermocycler.serial_number, ), settings=HTTP_SETTINGS, )