Skip to content

Commit bcec2ec

Browse files
2 parents ce6dc63 + 36a7501 commit bcec2ec

File tree

188 files changed

+4801
-1045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+4801
-1045
lines changed
Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,17 @@
1-
// import { GET, request } from '../request'
1+
import { GET, request } from '../request'
22

3-
// import type { ResponsePromise } from '../request'
3+
import type { ResponsePromise } from '../request'
44
import type { HostConfig } from '../types'
55
import type { UploadedCsvFilesResponse } from '../dataFiles/types'
66

7-
/**
87
export function getCsvFiles(
98
config: HostConfig,
109
protocolId: string
11-
): ResponsePromise<UploadCsvFilesResponse> {
12-
return request<UploadCsvFilesResponse>(
10+
): ResponsePromise<UploadedCsvFilesResponse> {
11+
return request<UploadedCsvFilesResponse>(
1312
GET,
1413
`/protocols/${protocolId}/dataFiles`,
1514
null,
1615
config
1716
)
18-
}
19-
*/
20-
21-
// ToDo (kk:06/14/2024) remove when activate the above code
22-
export function getCsvFiles(
23-
config: HostConfig,
24-
protocolId: string
25-
): Promise<{ data: UploadedCsvFilesResponse }> {
26-
const stub = {
27-
data: {
28-
files: [
29-
{
30-
id: '1',
31-
createdAt: '2024-06-07T19:19:56.268029+00:00',
32-
name: 'rtp_mock_file1.csv',
33-
},
34-
{
35-
id: '2',
36-
createdAt: '2024-06-17T19:19:56.268029+00:00',
37-
name: 'rtp_mock_file2.csv',
38-
},
39-
],
40-
},
41-
}
42-
return Promise.resolve({ data: stub })
4317
}

api/release-notes-internal.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@ For more details about this release, please see the full [technical change log][
22

33
[technical change log]: https://github.com/Opentrons/opentrons/releases
44

5+
## Internal Release 2.0.0-alpha.3
6+
7+
This internal release, pulled from the `edge` branch, contains features being developed for 8.0.0. It's for internal testing only.
8+
9+
- [Opentrons changes since the latest stable release](https://github.com/Opentrons/opentrons/compare/[email protected])
10+
- [Opentrons changes since the last internal release](https://github.com/Opentrons/opentrons/compare/[email protected]@2.0.0-alpha.3)
11+
- [Flex changes](https://github.com/Opentrons/oe-core/compare/[email protected]@2.0.0-alpha.3)
12+
- [Flex firmware changes](https://github.com/Opentrons/ot3-firmware/compare/[email protected]@v10)
13+
- [OT2 changes](https://github.com/Opentrons/buildroot/compare/[email protected])
14+
15+
## Internal Release 2.0.0-alpha.2
16+
17+
This internal release, pulled from the `edge` branch, contains features being developed for 8.0.0. It's for internal testing only.
18+
19+
<https://github.com/Opentrons/opentrons/compare/[email protected]@2.0.0-alpha.2>
20+
521
## Internal Release 2.0.0-alpha.1
622

7-
This internal release, pulled from the `edge` branch, contains features being developed for 8.0.0. It's for internal testing only. Usage may require a robot factory reset to restore robot stability.
23+
This internal release, pulled from the `edge` branch, contains features being developed for 8.0.0. It's for internal testing only.
824

925
<https://github.com/Opentrons/opentrons/compare/[email protected]@2.0.0-alpha.1>
1026

1127
## Internal Release 2.0.0-alpha.0
1228

13-
This internal release, pulled from the `edge` branch, contains features being developed for 8.0.0. It's for internal testing only. Usage may require a robot factory reset to restore robot stability.
29+
This internal release, pulled from the `edge` branch, contains features being developed for 8.0.0. It's for internal testing only.
1430

1531
<https://github.com/Opentrons/opentrons/compare/[email protected]@2.0.0-alpha.0>
1632

api/release-notes.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@ log][]. For a list of currently known issues, please see the [Opentrons issue tr
66

77
---
88

9-
## Opentrons Robot Software Changes in 7.4.0
9+
## Opentrons Robot Software Changes in 7.5.0
1010

11-
Welcome to the v7.4.0 release of the Opentrons robot software!
11+
Welcome to the v7.5.0 release of the Opentrons robot software!
1212

13-
This release adds support for the [Opentrons Flex HEPA/UV Module](https://opentrons.com/products/opentrons-flex-hepa-uv-module).
13+
### Hardware Support
14+
15+
- [Opentrons Flex HEPA/UV Module](https://opentrons.com/products/opentrons-flex-hepa-uv-module)
16+
- Latest Flex Gripper model (serial numbers beginning `GRPV13`)
1417

1518
### Bug Fixes
1619

1720
- Fixed certain string runtime parameter values being misinterpreted as an incorrect type.
21+
22+
### Known Issue
23+
24+
- The HEPA/UV Module's buttons may not respond properly after its safety shutoff is activated. This happens when the module is removed from the top of Flex while its lights are on. Power cycle the module to restore normal behavior. The module is safe to use even if you do not power cycle it.
25+
1826
---
1927

2028
## Opentrons Robot Software Changes in 7.3.1

api/src/opentrons/cli/analyze.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ async def _do_analyze(protocol_source: ProtocolSource) -> RunResult:
248248
protocol_source=protocol_source,
249249
parse_mode=ParseMode.NORMAL,
250250
run_time_param_values=None,
251+
run_time_param_files=None,
251252
)
252253
except Exception as error:
253254
err_id = "analysis-setup-error"

api/src/opentrons/hardware_control/ot3api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ async def reset_tip_detectors(
761761

762762
@ExecutionManagerProvider.wait_for_running
763763
async def _update_position_estimation(
764-
self, axes: Optional[List[Axis]] = None
764+
self, axes: Optional[Sequence[Axis]] = None
765765
) -> None:
766766
"""
767767
Function to update motor estimation for a set of axes
@@ -1141,6 +1141,12 @@ async def gantry_position(
11411141
z=cur_pos[Axis.by_mount(realmount)],
11421142
)
11431143

1144+
async def update_axis_position_estimations(self, axes: Sequence[Axis]) -> None:
1145+
"""Update specified axes position estimators from their encoders."""
1146+
await self._update_position_estimation(axes)
1147+
await self._cache_current_position()
1148+
await self._cache_encoder_position()
1149+
11441150
async def move_to(
11451151
self,
11461152
mount: Union[top_types.Mount, OT3Mount],

api/src/opentrons/hardware_control/protocols/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"""Typing protocols describing a hardware controller."""
22
from typing_extensions import Protocol, Type
33

4-
from opentrons.hardware_control.types import Axis
5-
64
from .module_provider import ModuleProvider
75
from .hardware_manager import HardwareManager
86
from .chassis_accessory_manager import ChassisAccessoryManager
@@ -20,6 +18,7 @@
2018
from .gripper_controller import GripperController
2119
from .flex_calibratable import FlexCalibratable
2220
from .flex_instrument_configurer import FlexInstrumentConfigurer
21+
from .position_estimator import PositionEstimator
2322

2423
from .types import (
2524
CalibrationType,
@@ -64,6 +63,7 @@ def cache_tip(self, mount: MountArgType, tip_length: float) -> None:
6463

6564

6665
class FlexHardwareControlInterface(
66+
PositionEstimator,
6767
ModuleProvider,
6868
ExecutionControllable,
6969
LiquidHandler[CalibrationType, MountArgType, ConfigType],
@@ -87,12 +87,6 @@ class FlexHardwareControlInterface(
8787
def get_robot_type(self) -> Type[FlexRobotType]:
8888
return FlexRobotType
8989

90-
def motor_status_ok(self, axis: Axis) -> bool:
91-
...
92-
93-
def encoder_status_ok(self, axis: Axis) -> bool:
94-
...
95-
9690
def cache_tip(self, mount: MountArgType, tip_length: float) -> None:
9791
...
9892

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
from typing import Protocol, Sequence
2+
3+
from ..types import Axis
4+
5+
6+
class PositionEstimator(Protocol):
7+
"""Position-control extensions for harwdare with encoders."""
8+
9+
async def update_axis_position_estimations(self, axes: Sequence[Axis]) -> None:
10+
"""Update the specified axes' position estimators from their encoders.
11+
12+
This will allow these axes to make a non-home move even if they do not currently have
13+
a position estimation (unless there is no tracked poition from the encoders, as would be
14+
true immediately after boot).
15+
16+
Axis encoders have less precision than their position estimators. Calling this function will
17+
cause absolute position drift. After this function is called, the axis should be homed before
18+
it is relied upon for accurate motion.
19+
20+
This function updates only the requested axes. If other axes have bad position estimation,
21+
moves that require those axes or attempts to get the position of those axes will still fail.
22+
"""
23+
...
24+
25+
def motor_status_ok(self, axis: Axis) -> bool:
26+
"""Return whether an axis' position estimator is healthy.
27+
28+
The position estimator is healthy if the axis has
29+
1) been homed
30+
2) not suffered a loss-of-positioning (from a cancel or stall, for instance) since being homed
31+
32+
If this function returns false, getting the position of this axis or asking it to move will fail.
33+
"""
34+
...
35+
36+
def encoder_status_ok(self, axis: Axis) -> bool:
37+
"""Return whether an axis' position encoder tracking is healthy.
38+
39+
The encoder status is healthy if the axis has been homed since booting up.
40+
41+
If this function returns false, updating the estimator from the encoder will fail.
42+
"""
43+
...

api/src/opentrons/protocol_api/_parameter_context.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
ParameterChoice,
1313
UserFacingTypes,
1414
)
15-
from opentrons.protocols.parameters.exceptions import ParameterDefinitionError
15+
from opentrons.protocols.parameters.exceptions import (
16+
ParameterDefinitionError,
17+
ParameterValueError,
18+
)
1619
from opentrons.protocol_engine.types import (
1720
RunTimeParameter,
1821
PrimitiveRunTimeParamValuesType,
22+
CSVRunTimeParamFilesType,
23+
FileInfo,
1924
)
2025

2126
from ._parameters import Parameters
@@ -202,13 +207,45 @@ def set_parameters(
202207
f"Parameter {variable_name} is not defined as a parameter for this protocol."
203208
)
204209
if isinstance(parameter, csv_parameter_definition.CSVParameterDefinition):
205-
pass
210+
raise ParameterValueError(
211+
f"A primitive param value was provided for the parameter '{variable_name}',"
212+
f" but '{variable_name}' is a CSV parameter that can only accept file IDs."
213+
)
206214
else:
207215
validated_value = validation.ensure_value_type(
208216
override_value, parameter.parameter_type
209217
)
210218
parameter.value = validated_value
211219

220+
def initialize_csv_files(
221+
self, run_time_param_file_overrides: CSVRunTimeParamFilesType
222+
) -> None:
223+
"""Initializes the files for CSV parameters.
224+
225+
:meta private:
226+
227+
This is intended for Opentrons internal use only and is not a guaranteed API.
228+
"""
229+
for variable_name, file_id in run_time_param_file_overrides.items():
230+
try:
231+
parameter = self._parameters[variable_name]
232+
except KeyError:
233+
raise ParameterDefinitionError(
234+
f"Parameter {variable_name} is not defined as a parameter for this protocol."
235+
)
236+
if not isinstance(
237+
parameter, csv_parameter_definition.CSVParameterDefinition
238+
):
239+
raise ParameterValueError(
240+
f"File Id was provided for the parameter '{variable_name}',"
241+
f" but '{variable_name}' is not a CSV parameter."
242+
)
243+
244+
parameter.file_info = FileInfo(id=file_id, name="")
245+
# TODO (spp, 2024-07-16): set the file name and assign the file as parameter.value.
246+
# Most likely, we will be creating a temporary file copy of the original
247+
# to pass onto the protocol context
248+
212249
def export_parameters_for_analysis(self) -> List[RunTimeParameter]:
213250
"""Exports all parameters into a protocol engine models for reporting in analysis.
214251

api/src/opentrons/protocol_engine/actions/actions.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
CommandDefinedErrorData,
2121
CommandPrivateResult,
2222
)
23-
from ..error_recovery_policy import ErrorRecoveryType
23+
from ..error_recovery_policy import ErrorRecoveryPolicy, ErrorRecoveryType
2424
from ..notes.notes import CommandNote
2525
from ..types import (
2626
LabwareOffsetCreate,
@@ -266,6 +266,13 @@ class SetPipetteMovementSpeedAction:
266266
speed: Optional[float]
267267

268268

269+
@dataclass(frozen=True)
270+
class SetErrorRecoveryPolicyAction:
271+
"""See `ProtocolEngine.set_error_recovery_policy()`."""
272+
273+
error_recovery_policy: ErrorRecoveryPolicy
274+
275+
269276
Action = Union[
270277
PlayAction,
271278
PauseAction,
@@ -286,4 +293,5 @@ class SetPipetteMovementSpeedAction:
286293
AddLiquidAction,
287294
ResetTipsAction,
288295
SetPipetteMovementSpeedAction,
296+
SetErrorRecoveryPolicyAction,
289297
]

api/src/opentrons/protocol_engine/commands/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from . import temperature_module
2020
from . import thermocycler
2121
from . import calibration
22+
from . import unsafe
2223

2324
from .hash_command_params import hash_protocol_command_params
2425
from .generate_command_schema import generate_command_schema
@@ -548,6 +549,8 @@
548549
"thermocycler",
549550
# calibration command bundle
550551
"calibration",
552+
# unsafe command bundle
553+
"unsafe",
551554
# configure pipette volume command bundle
552555
"ConfigureForVolume",
553556
"ConfigureForVolumeCreate",

0 commit comments

Comments
 (0)