Skip to content

Commit

Permalink
chore(release): Merge v8.2.0-alpha.4 into edge
Browse files Browse the repository at this point in the history
Conflicts:

api/src/opentrons/protocol_engine/commands/absorbance_reader/read.py:
Conflict in error message wording between PR #16941 in release and PR #16920 in edge. I took the one in release because the one in edge was an outdated cherry pick.

app/src/organisms/Desktop/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts:
Just import statements.

app/src/organisms/DropTipWizardFlows/hooks/useTipAttachmentStatus/getPipettesWithTipAttached.ts:
Release removed `cursor: null` and `includeFixitCommands: null` from some network requests, leaving those fields unspecified instead (PR ##16893). Edge deleted this whole file in favor of a different one (PR #16904). I removed `cursor: null` from the new file; `includeFixitCommands: null` was already removed.
  • Loading branch information
SyntaxColoring committed Nov 26, 2024
2 parents 342902e + 453cd47 commit 1ca17a5
Show file tree
Hide file tree
Showing 90 changed files with 1,039 additions and 519 deletions.
4 changes: 2 additions & 2 deletions api-client/src/runs/commands/types.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { RunTimeCommand, RunCommandError } from '@opentrons/shared-data'

export interface GetCommandsParams {
cursor: number | null // the index of the command at the center of the window
pageLength: number // the number of items to include
cursor?: number
}

export interface GetRunCommandsParams extends GetCommandsParams {
includeFixitCommands?: boolean
}

export interface GetRunCommandsParamsRequest extends GetCommandsParams {
includeFixitCommands: boolean | null
includeFixitCommands?: boolean
}

export interface RunCommandErrors {
Expand Down
17 changes: 17 additions & 0 deletions api-client/src/runs/getErrorRecoveryPolicy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { GET, request } from '../request'

import type { HostConfig } from '../types'
import type { ResponsePromise } from '../request'
import type { ErrorRecoveryPolicyResponse } from './types'

export function getErrorRecoveryPolicy(
config: HostConfig,
runId: string
): ResponsePromise<ErrorRecoveryPolicyResponse> {
return request<ErrorRecoveryPolicyResponse>(
GET,
`/runs/${runId}/errorRecoveryPolicy`,
null,
config
)
}
1 change: 1 addition & 0 deletions api-client/src/runs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export * from './createLabwareOffset'
export * from './createLabwareDefinition'
export * from './constants'
export * from './updateErrorRecoveryPolicy'
export * from './getErrorRecoveryPolicy'

export * from './types'
export type { CreateRunData } from './createRun'
1 change: 1 addition & 0 deletions api-client/src/runs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export interface UpdateErrorRecoveryPolicyRequest {
}

export type UpdateErrorRecoveryPolicyResponse = Record<string, never>
export type ErrorRecoveryPolicyResponse = UpdateErrorRecoveryPolicyRequest

/**
* Current Run State Data
Expand Down
4 changes: 4 additions & 0 deletions api/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Welcome to the v8.2.0 release of the Opentrons robot software! This release adds

- Error recovery no longer causes an `AssertionError` when a Python protocol changes the pipette speed.

### Known Issues

- You can't downgrade the robot software with an Absorbance Plate Reader attached. Disconnect the module first if you need to downgrade.

---

## Opentrons Robot Software Changes in 8.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ async def update_device(self, firmware_file_path: str) -> Tuple[bool, str]:
log.debug(f"Updating {self.name}: {self.port} with {firmware_file_path}")
self._updating = True
success, res = await self._driver.update_firmware(firmware_file_path)
# it takes time for the plate reader to re-init after an update.
await asyncio.sleep(10)
self._device_info = await self._driver.get_device_info()
await self._poller.start()
self._updating = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def execute( # noqa: C901
)
if abs_reader_substate.is_lid_on is False:
raise CannotPerformModuleAction(
"Cannot perform Read action on Absorbance Reader with the lid open. Try calling `.close_lid()` first."
"Absorbance Plate Reader can't read a plate with the lid open. Call `close_lid()` first."
)

# TODO: we need to return a file ID and increase the file count even when a moduel is not attached
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Ungrip labware payload, result, and implementaiton."""

from __future__ import annotations

from opentrons.hardware_control.types import Axis
from opentrons.protocol_engine.errors.exceptions import GripperNotAttachedError
from pydantic import BaseModel
from typing import Optional, Type
Expand Down Expand Up @@ -46,7 +48,7 @@ async def execute(
ot3_hardware_api = ensure_ot3_hardware(self._hardware_api)
if not ot3_hardware_api.has_gripper():
raise GripperNotAttachedError("No gripper found to perform ungrip.")
await ot3_hardware_api.ungrip()
await ot3_hardware_api.home([Axis.G])
return SuccessData(
public=UnsafeUngripLabwareResult(),
)
Expand Down
5 changes: 4 additions & 1 deletion api/src/opentrons/protocol_engine/state/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,10 @@ def convert_absorbance_reader_data_points(
row = chr(ord("A") + i // 12) # Convert index to row (A-H)
col = (i % 12) + 1 # Convert index to column (1-12)
well_key = f"{row}{col}"
well_map[well_key] = value
truncated_value = float(
"{:.5}".format(str(value))
) # Truncate the returned value to the third decimal place
well_map[well_key] = truncated_value
return well_map
else:
raise ValueError(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test update-position-estimator commands."""
from decoy import Decoy

from opentrons.hardware_control.types import Axis
from opentrons.protocol_engine.commands.unsafe.unsafe_ungrip_labware import (
UnsafeUngripLabwareParams,
UnsafeUngripLabwareResult,
Expand All @@ -25,7 +26,7 @@ async def test_ungrip_labware_implementation(
assert result == SuccessData(public=UnsafeUngripLabwareResult())

decoy.verify(
await ot3_hardware_api.ungrip(),
await ot3_hardware_api.home([Axis.G]),
)


Expand Down
4 changes: 4 additions & 0 deletions app-shell/build/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Welcome to the v8.2.0 release of the Opentrons App! This release adds support fo

- Fixed an app crash when performing certain error recovery steps with Python API version 2.15 protocols.

### Known Issues

- If you attach an Absorbance Plate Reader to _any_ Flex on your local network, you must update all copies of the Opentrons App on the same network to at least v8.1.0.

---

## Opentrons App Changes in 8.1.0
Expand Down
Binary file added app/src/assets/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/assets/localization/en/app_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"enable_dev_tools_description": "Enabling this setting opens Developer Tools on app launch, enables additional logging and gives access to feature flags.",
"error_boundary_desktop_app_description": "You need to reload the app. Contact support with the following error message:",
"error_boundary_title": "An unknown error has occurred",
"error_recovery_mode": "Error Recovery Mode",
"error_recovery_mode": "Recovery mode",
"error_recovery_mode_description": "Pause on protocol errors instead of canceling the run.",
"feature_flags": "Feature Flags",
"general": "General",
Expand Down
4 changes: 2 additions & 2 deletions app/src/assets/localization/en/error_recovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ignore_similar_errors_later_in_run": "Ignore similar errors later in the run?",
"inspect_the_robot": "<block>First, inspect the robot to ensure it's prepared to continue the run from the next step.</block><block>Then, close the robot door before proceeding.</block>",
"labware_released_from_current_height": "The labware will be released from its current height.",
"launch_recovery_mode": "Launch Recovery Mode",
"launch_recovery_mode": "Launch recovery mode",
"manually_fill_liquid_in_well": "Manually fill liquid in well {{well}}",
"manually_fill_well_and_skip": "Manually fill well and skip to next step",
"manually_move_lw_and_skip": "Manually move labware and skip to next step",
Expand All @@ -60,7 +60,7 @@
"proceed_to_cancel": "Proceed to cancel",
"proceed_to_tip_selection": "Proceed to tip selection",
"recovery_action_failed": "{{action}} failed",
"recovery_mode": "Recovery Mode",
"recovery_mode": "Recovery mode",
"recovery_mode_explanation": "<block>Recovery Mode provides you with guided and manual controls for handling errors at runtime.</block><br/><block>You can make changes to ensure the step in progress when the error occurred can be completed or choose to cancel the protocol. When changes are made and no subsequent errors are detected, the method completes. Depending on the conditions that caused the error, you will only be provided with appropriate options.</block>",
"release": "Release",
"release_labware_from_gripper": "Release labware from gripper",
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/localization/en/quick_transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"advanced_setting_disabled": "Advanced setting disabled for this transfer",
"advanced_settings": "Advanced settings",
"air_gap": "Air gap",
"air_gap_before_aspirating": "Air gap before aspirating",
"air_gap_after_aspirating": "Air gap after aspirating",
"air_gap_before_dispensing": "Air gap before dispensing",
"air_gap_capacity_error": "The tip is too full to add an air gap.",
"air_gap_value": "{{volume}} µL",
Expand Down
1 change: 1 addition & 0 deletions app/src/assets/localization/en/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"change_robot": "Change robot",
"clear_data": "clear data",
"close": "close",
"closed": "closed",
"close_robot_door": "Close the robot door before starting the run.",
"confirm": "Confirm",
"confirm_placement": "Confirm placement",
Expand Down
1 change: 0 additions & 1 deletion app/src/assets/localization/zh/quick_transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"add_or_remove": "添加或移除",
"advanced_setting_disabled": "此移液的高级设置已禁用",
"advanced_settings": "高级设置",
"air_gap_before_aspirating": "在吸液前设置空气间隙",
"air_gap_before_dispensing": "在分液前设置空气间隙",
"air_gap_capacity_error": "移液器空间已满,无法添加空气间隙。",
"air_gap_value": "{{volume}} µL",
Expand Down
3 changes: 2 additions & 1 deletion app/src/local-resources/modules/utils/getModuleImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import thermoModuleGen1HighRes from '/app/assets/images/modules/thermocyclerModu
import heaterShakerModuleHighRes from '/app/assets/images/modules/[email protected]'
import thermoModuleGen2 from '/app/assets/images/thermocycler_gen_2_closed.png'
import magneticBlockGen1 from '/app/assets/images/magnetic_block_gen_1.png'
import magneticBlockGen1HighRes from '/app/assets/images/[email protected]'
import absorbanceReader from '/app/assets/images/opentrons_plate_reader.png'

import type { ModuleModel } from '@opentrons/shared-data'
Expand All @@ -30,7 +31,7 @@ export function getModuleImage(
case 'thermocyclerModuleV2':
return thermoModuleGen2
case 'magneticBlockV1':
return magneticBlockGen1
return highRes ? magneticBlockGen1HighRes : magneticBlockGen1
case 'absorbanceReaderV1':
return absorbanceReader
default:
Expand Down
20 changes: 13 additions & 7 deletions app/src/molecules/InterventionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {

import { getIsOnDevice } from '/app/redux/config'

import type { IconName } from '@opentrons/components'
import { ModalContentOneColSimpleButtons } from './ModalContentOneColSimpleButtons'
import { TwoColumn } from './TwoColumn'
import { OneColumn } from './OneColumn'
Expand All @@ -32,6 +31,10 @@ import { ModalContentMixed } from './ModalContentMixed'
import { DescriptionContent } from './DescriptionContent'
import { DeckMapContent } from './DeckMapContent'
import { CategorizedStepContent } from './CategorizedStepContent'

import type { FlattenSimpleInterpolation } from 'styled-components'
import type { IconName } from '@opentrons/components'

export {
ModalContentOneColSimpleButtons,
TwoColumn,
Expand Down Expand Up @@ -122,6 +125,8 @@ export interface InterventionModalProps {
type?: ModalType
/** optional icon name */
iconName?: IconName | null | undefined
/* Optional icon size override. */
iconSize?: string
/** modal contents */
children: React.ReactNode
}
Expand All @@ -133,6 +138,7 @@ export function InterventionModal({
iconName,
iconHeading,
children,
iconSize,
}: InterventionModalProps): JSX.Element {
const modalType = type ?? 'intervention-required'
const headerColor =
Expand Down Expand Up @@ -166,7 +172,7 @@ export function InterventionModal({
{titleHeading}
<Flex alignItems={ALIGN_CENTER} onClick={iconHeadingOnClick}>
{iconName != null ? (
<Icon name={iconName} css={ICON_STYLE} />
<Icon name={iconName} css={buildIconStyle(iconSize)} />
) : null}
{iconHeading != null ? iconHeading : null}
</Flex>
Expand All @@ -178,15 +184,15 @@ export function InterventionModal({
)
}

const ICON_STYLE = css`
width: ${SPACING.spacing16};
height: ${SPACING.spacing16};
const buildIconStyle = (
iconSize: string | undefined
): FlattenSimpleInterpolation => css`
width: ${iconSize ?? SPACING.spacing16};
height: ${iconSize ?? SPACING.spacing16};
margin: ${SPACING.spacing4};
cursor: ${CURSOR_POINTER};
@media (${RESPONSIVENESS.touchscreenMediaQuerySpecs}) {
width: ${SPACING.spacing32};
height: ${SPACING.spacing32};
margin: ${SPACING.spacing12};
}
`
2 changes: 1 addition & 1 deletion app/src/molecules/WizardRequiredEquipmentList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function RequiredEquipmentCard(props: RequiredEquipmentCardProps): JSX.Element {
</Flex>
) : null}
<Flex
flex="0 1 70%"
flex={imageSrc == null ? '0 1 100%' : '0 1 70%'}
flexDirection={DIRECTION_COLUMN}
justifyContent={JUSTIFY_SPACE_AROUND}
>
Expand Down
5 changes: 4 additions & 1 deletion app/src/organisms/Desktop/Devices/HistoricalProtocolRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ export function HistoricalProtocolRun(
const { t } = useTranslation('run_details')
const { run, protocolName, robotIsBusy, robotName, protocolKey } = props
const [drawerOpen, setDrawerOpen] = useState(false)
const countRunDataFiles =
let countRunDataFiles =
'runTimeParameters' in run
? run?.runTimeParameters.filter(
parameter => parameter.type === 'csv_file'
).length
: 0
if ('outputFileIds' in run) {
countRunDataFiles += run.outputFileIds.length
}
const runStatus = run.status
const runDisplayName = formatTimestamp(run.createdAt)
let duration = EMPTY_TIMESTAMP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function useActionButtonProperties({
handleButtonClick = () => {
isResetRunLoadingRef.current = true
reset()
runHeaderModalContainerUtils.dropTipUtils.resetTipStatus()
trackEvent({
name: ANALYTICS_PROTOCOL_PROCEED_TO_RUN,
properties: { sourceLocation: 'RunRecordDetail', robotSerialNumber },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import { useTipAttachmentStatus } from '/app/resources/instruments'
import type { RobotType } from '@opentrons/shared-data'
import type { Run, RunStatus } from '@opentrons/api-client'
import type { PipetteWithTip } from '/app/resources/instruments'
import type { DropTipWizardFlowsProps } from '/app/organisms/DropTipWizardFlows'
import type {
DropTipWizardFlowsProps,
TipAttachmentStatusResult,

Check failure on line 22 in app/src/organisms/Desktop/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts

View workflow job for this annotation

GitHub Actions / js checks

Module '"/app/organisms/DropTipWizardFlows"' has no exported member 'TipAttachmentStatusResult'.

Check failure on line 22 in app/src/organisms/Desktop/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts

View workflow job for this annotation

GitHub Actions / js checks

Module '"/app/organisms/DropTipWizardFlows"' has no exported member 'TipAttachmentStatusResult'.
} from '/app/organisms/DropTipWizardFlows'
import type { UseProtocolDropTipModalResult } from '../modals'
import type { PipetteDetails } from '/app/resources/maintenance_runs'

Expand All @@ -35,6 +38,7 @@ export interface UseRunHeaderDropTipParams {
export interface UseRunHeaderDropTipResult {
dropTipModalUtils: UseProtocolDropTipModalResult
dropTipWizardUtils: RunHeaderDropTipWizProps
resetTipStatus: TipAttachmentStatusResult['resetTipStatus']
}

// Handles all the tip related logic during a protocol run on the desktop app.
Expand Down Expand Up @@ -104,11 +108,9 @@ export function useRunHeaderDropTip({
{
includeFixitCommands: false,
pageLength: 1,
cursor: null,
},
{ enabled: isTerminalRunStatus(runStatus) }
)

// Manage tip checking
useEffect(() => {
// If a user begins a new run without navigating away from the run page, reset tip status.
Expand All @@ -120,7 +122,9 @@ export function useRunHeaderDropTip({
// have to do it here if done during Error Recovery.
else if (
runSummaryNoFixit != null &&
!lastRunCommandPromptedErrorRecovery(runSummaryNoFixit)
runSummaryNoFixit.length > 0 &&
!lastRunCommandPromptedErrorRecovery(runSummaryNoFixit) &&
isTerminalRunStatus(runStatus)
) {
void determineTipStatus()
}
Expand All @@ -143,7 +147,11 @@ export function useRunHeaderDropTip({
}
}, [runStatus, isRunCurrent, enteredER, initialPipettesWithTipsCount])

return { dropTipModalUtils, dropTipWizardUtils: buildDTWizUtils() }
return {
dropTipModalUtils,
dropTipWizardUtils: buildDTWizUtils(),
resetTipStatus,
}
}

// TODO(jh, 09-12-24): Consolidate this with the same utility that exists elsewhere.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('EnableErrorRecoveryMode', () => {

it('should render text and toggle button', () => {
render(props)
screen.getByText('Error Recovery Mode')
screen.getByText('Recovery mode')
screen.getByText('Pause on protocol errors instead of canceling the run.')
expect(
screen.getByLabelText('enable_error_recovery_mode')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function useDownloadRunLog(
if (host == null) return
// first getCommands to get total length of commands
getCommands(host, runId, {
cursor: null,
pageLength: 0,
includeFixitCommands: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ describe('RunProgressMeter', () => {
.thenReturn(null)
when(useNotifyAllCommandsQuery)
.calledWith(NON_DETERMINISTIC_RUN_ID, {
cursor: null,
pageLength: 1,
})
.thenReturn(mockUseAllCommandsResponseNonDeterministic)
Expand Down
1 change: 0 additions & 1 deletion app/src/organisms/Desktop/RunProgressMeter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export function RunProgressMeter(props: RunProgressMeterProps): JSX.Element {
const runData = runRecord?.data ?? null

const { data: mostRecentCommandData } = useNotifyAllCommandsQuery(runId, {
cursor: null,
pageLength: 1,
})
// This lastRunCommand also includes "fixit" commands.
Expand Down
Loading

0 comments on commit 1ca17a5

Please sign in to comment.