diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py b/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py index 43f89ecbf87..5f49e182079 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py @@ -19,7 +19,7 @@ class RunProfileStepParams(BaseModel): """Input parameters for an individual Thermocycler profile step.""" celsius: float = Field(..., description="Target temperature in °C.") - holdSeconds: int = Field( + holdSeconds: float = Field( ..., description="Time to hold target temperature at in seconds." ) diff --git a/api/tests/opentrons/protocol_runner/test_json_command_translator.py b/api/tests/opentrons/protocol_runner/test_json_command_translator.py index 36955de5f09..b48d5328a33 100644 --- a/api/tests/opentrons/protocol_runner/test_json_command_translator.py +++ b/api/tests/opentrons/protocol_runner/test_json_command_translator.py @@ -292,6 +292,39 @@ ) ), ), + ( + protocol_schema_v6.Command( + commandType="thermocycler/runProfile", + params=protocol_schema_v6.Params( + moduleId="module-id-abc123", + blockMaxVolumeUl=1.11, + profile=[ + protocol_schema_v6.ProfileStep( + celsius=2.22, + holdSeconds=3.33, + ), + protocol_schema_v6.ProfileStep( + celsius=4.44, + holdSeconds=5.55, + ), + ], + ), + ), + pe_commands.thermocycler.RunProfileCreate( + params=pe_commands.thermocycler.RunProfileParams( + moduleId="module-id-abc123", + blockMaxVolumeUl=1.11, + profile=[ + pe_commands.thermocycler.RunProfileStepParams( + celsius=2.22, holdSeconds=3.33 + ), + pe_commands.thermocycler.RunProfileStepParams( + celsius=4.44, holdSeconds=5.55 + ), + ], + ), + ), + ), ] diff --git a/shared-data/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py b/shared-data/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py index 2268ba7d69e..7282f5e95f5 100644 --- a/shared-data/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py +++ b/shared-data/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py @@ -21,12 +21,17 @@ class Location(BaseModel): moduleId: Optional[str] -# TODO (tamar 3/15/22): split apart all the command payloads when we tackle #9583 +class ProfileStep(BaseModel): + celsius: float + holdSeconds: float + + class WellLocation(BaseModel): origin: Optional[str] offset: Optional[OffsetVector] +# TODO (tamar 3/15/22): split apart all the command payloads when we tackle #9583 class Params(BaseModel): slotName: Optional[str] axes: Optional[List[str]] @@ -57,6 +62,7 @@ class Params(BaseModel): rpm: Optional[float] height: Optional[float] offset: Optional[OffsetVector] + profile: Optional[List[ProfileStep]] class Command(BaseModel):