Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit lissack committed Oct 27, 2021
1 parent c05f500 commit c7553cb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions g-code-testing/g_code_test_data/g_code_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions g-code-testing/g_code_test_data/http/modules/magdeck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand Down
8 changes: 4 additions & 4 deletions g-code-testing/g_code_test_data/http/modules/tempdeck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand Down
17 changes: 8 additions & 9 deletions g-code-testing/g_code_test_data/http/modules/thermocycler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +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.thermocycler import SERIAL as SERIAL_NUM


THERMOCYCLER_CLOSE = HTTPGCodeConfirmConfig(
name='thermocycler_close',
executable=partial(
post_serial_command,
command=SerialCommand(command_type='close'),
serial=SERIAL_NUM,
serial=HTTP_SETTINGS.thermocycler.serial_number,
),
settings=HTTP_SETTINGS,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -66,7 +65,7 @@
, 1
]
),
serial=SERIAL_NUM,
serial=HTTP_SETTINGS.thermocycler.serial_number,
),
settings=HTTP_SETTINGS,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand Down

0 comments on commit c7553cb

Please sign in to comment.