Skip to content

Commit

Permalink
Merge branch 'edge' into AUTH-527-move-rtps-to-their-own-table
Browse files Browse the repository at this point in the history
  • Loading branch information
sanni-t committed Jul 23, 2024
2 parents 3a090c7 + 8fe39ab commit 1ab3fc2
Show file tree
Hide file tree
Showing 45 changed files with 1,234 additions and 1,194 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ HARDWARE_DIR := hardware
USB_BRIDGE_DIR := usb-bridge
NODE_USB_BRIDGE_CLIENT_DIR := usb-bridge/node-client

PYTHON_DIRS := $(API_DIR) $(UPDATE_SERVER_DIR) $(ROBOT_SERVER_DIR) $(SERVER_UTILS_DIR) $(SHARED_DATA_DIR)/python $(SYSTEM_SERVER_DIR) $(G_CODE_TESTING_DIR) $(HARDWARE_DIR) $(USB_BRIDGE_DIR)
PYTHON_DIRS := $(API_DIR) $(UPDATE_SERVER_DIR) $(ROBOT_SERVER_DIR) $(SERVER_UTILS_DIR) $(SHARED_DATA_DIR)/python $(G_CODE_TESTING_DIR) $(HARDWARE_DIR) $(USB_BRIDGE_DIR)

# This may be set as an environment variable (and is by CI tasks that upload
# to test pypi) to add a .dev extension to the python package versions. If
Expand Down
17 changes: 14 additions & 3 deletions abr-testing/abr_testing/data_collection/abr_robot_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,20 @@ def compare_lpc_to_historical_data(
current_x = round(labware_dict["X"], 2)
current_y = round(labware_dict["Y"], 2)
current_z = round(labware_dict["Z"], 2)
avg_x = round(mean(x_float), 2)
avg_y = round(mean(y_float), 2)
avg_z = round(mean(z_float), 2)
try:
avg_x = round(mean(x_float), 2)
avg_y = round(mean(y_float), 2)
avg_z = round(mean(z_float), 2)
except StatisticsError:
# If there is one value assign it as the average.
if len(x_float) == 1:
avg_x = x_float[0]
avg_y = y_float[0]
avg_z = z_float[0]
else:
avg_x = None
avg_y = None
avg_z = None

# Formats LPC message for ticket.
lpc_message = (
Expand Down
2 changes: 1 addition & 1 deletion api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_version():
f"opentrons-shared-data=={VERSION}",
"aionotify==0.3.1",
"anyio>=3.6.1,<4.0.0",
"jsonschema>=3.0.1,<5",
"jsonschema>=3.0.1,<4.18.0",
"numpy>=1.20.0,<2",
"pydantic>=1.10.9,<2.0.0",
"pyserial>=3.5",
Expand Down
31 changes: 12 additions & 19 deletions api/src/opentrons/config/advanced_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
List,
)

from opentrons.config import CONFIG, ARCHITECTURE, SystemArchitecture
from opentrons.config import CONFIG
from opentrons_shared_data.robot.dev_types import RobotTypeEnum

if TYPE_CHECKING:
Expand Down Expand Up @@ -97,18 +97,6 @@ async def on_change(self, value: Optional[bool]) -> None:
set_restart_required()


class DisableLogIntegrationSettingDefinition(SettingDefinition):
def __init__(self) -> None:
super().__init__(
_id="disableLogAggregation",
title="Disable Opentrons Log Collection",
description="Prevent the robot from sending its logs to Opentrons"
" for analysis. Opentrons uses these logs to"
" troubleshoot robot issues and spot error trends.",
robot_type=[RobotTypeEnum.OT2, RobotTypeEnum.FLEX],
)


class Setting(NamedTuple):
value: Optional[bool]
definition: SettingDefinition
Expand Down Expand Up @@ -236,12 +224,6 @@ class Setting(NamedTuple):
),
]

if (
ARCHITECTURE == SystemArchitecture.BUILDROOT
or ARCHITECTURE == SystemArchitecture.YOCTO
):
settings.append(DisableLogIntegrationSettingDefinition())


settings_by_id: Dict[str, SettingDefinition] = {s.id: s for s in settings}
settings_by_old_id: Dict[str, SettingDefinition] = {
Expand Down Expand Up @@ -723,6 +705,16 @@ def _migrate33to34(previous: SettingsMap) -> SettingsMap:
return newmap


def _migrate34to35(previous: SettingsMap) -> SettingsMap:
"""Migrate to version 35 of the feature flags file.
- Removes disableLogAggregation
"""
removals = ["disableLogAggregation"]
newmap = {k: v for k, v in previous.items() if k not in removals}
return newmap


_MIGRATIONS = [
_migrate0to1,
_migrate1to2,
Expand Down Expand Up @@ -758,6 +750,7 @@ def _migrate33to34(previous: SettingsMap) -> SettingsMap:
_migrate31to32,
_migrate32to33,
_migrate33to34,
_migrate34to35,
]
"""
List of all migrations to apply, indexed by (version - 1). See _migrate below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@pytest.fixture
def migrated_file_version() -> int:
return 34
return 35


# make sure to set a boolean value in default_file_settings only if
Expand All @@ -20,7 +20,6 @@ def default_file_settings() -> Dict[str, Any]:
"deckCalibrationDots": None,
"disableHomeOnBoot": None,
"useOldAspirationFunctions": None,
"disableLogAggregation": None,
"enableDoorSafetySwitch": None,
"enableOT3HardwareController": None,
"rearPanelIntegration": True,
Expand Down Expand Up @@ -69,7 +68,6 @@ def v2_config(v1_config: Dict[str, Any]) -> Dict[str, Any]:
r.update(
{
"_version": 2,
"disableLogAggregation": True,
}
)
return r
Expand Down Expand Up @@ -525,15 +523,12 @@ def test_ignores_invalid_keys(


def test_ensures_config() -> None:
assert _ensure(
{"_version": 3, "shortFixedTrash": False, "disableLogAggregation": True}
) == {
assert _ensure({"_version": 3, "shortFixedTrash": False}) == {
"_version": 3,
"shortFixedTrash": False,
"deckCalibrationDots": None,
"disableHomeOnBoot": None,
"useOldAspirationFunctions": None,
"disableLogAggregation": True,
"enableDoorSafetySwitch": None,
"enableOT3HardwareController": None,
"rearPanelIntegration": None,
Expand Down
4 changes: 4 additions & 0 deletions app-shell/scripts/windows-custom-sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
const { execSync } = require('node:child_process')

exports.default = async configuration => {
const { WINDOWS_SIGN } = process.env
if (WINDOWS_SIGN !== 'true') {
return
}
const signCmd = `smctl sign --keypair-alias="${String(
process.env.SM_KEYPAIR_ALIAS
)}" --input "${String(configuration.path)}" --certificate="${String(
Expand Down
6 changes: 4 additions & 2 deletions app/src/App/OnDeviceDisplayApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ export const OnDeviceDisplayApp = (): JSX.Element => {
</>
)}
</Box>
<TopLevelRedirects />
</ErrorBoundary>
<TopLevelRedirects />
</OnDeviceLocalizationProvider>
</InitialLoadingScreen>
</ApiHostProvider>
Expand Down Expand Up @@ -275,7 +275,9 @@ export function OnDeviceDisplayAppRoutes(): JSX.Element {
function TopLevelRedirects(): JSX.Element | null {
const currentRunRoute = useCurrentRunRoute()
return currentRunRoute != null ? (
<Route element={<Navigate to={currentRunRoute} />} />
<Routes>
<Route path="*" element={<Navigate to={currentRunRoute} />} />
</Routes>
) : null
}

Expand Down
1 change: 0 additions & 1 deletion app/src/App/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export type RobotSettingsTab =
| 'networking'
| 'advanced'
| 'feature-flags'
| 'privacy'

export type AppSettingsTab =
| 'general'
Expand Down
8 changes: 5 additions & 3 deletions app/src/assets/localization/en/drop_tip_wizard.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"exit_screen_title": "Exit before completing drop tip?",
"getting_ready": "Getting ready…",
"go_back": "go back",
"jog_too_far": "Jog too far?",
"start_over": "Start over",
"move_to_slot": "move to slot",
"no_proceed_to_drop_tip": "No, proceed to tip removal",
"position_and_blowout": "Ensure that the pipette tip is centered above and level with where you want the liquid to be blown out. If it isn't, use the controls below or your keyboard to jog the pipette until it is properly aligned.",
Expand All @@ -25,9 +27,9 @@
"remove_the_tips_from_pipette": "You may want to remove the tips from the pipette before using it again in a protocol.",
"remove_the_tips_manually": "Remove the tips manually. Then home the gantry. Homing with tips attached could pull liquid into the pipette and damage it.",
"remove_tips": "Remove tips",
"select_blowout_slot": "<block>You can blow out liquid into a labware.</block><block>Select the slot where you want to blow out the liquid on the deck map to the right. Once confirmed, the gantry will move to the chosen slot.</block>",
"select_blowout_slot_odd": "<block>You can blow out liquid into a labware.</block><br/><block>After the gantry moves to the chosen slot, use the jog controls to move the pipette to the exact position for blowing out.</block>",
"select_drop_tip_slot": "<block>You can return tips to a tip rack or dispose of them.</block><block>Select the slot where you want to drop the tips on the deck map to the right. Once confirmed, the gantry will move to the chosen slot.</block>",
"select_blowout_slot": "<block>Blowing out into a labware helps remove all liquid from the tip.</block><br/><block>Select the slot where you want to blow out the liquid on the deck map to the right. Once confirmed, the gantry will move to the chosen slot.</block>",
"select_blowout_slot_odd": "<block>Blowing out into a labware helps remove all liquid from the tip.</block><br/><block>After the gantry moves to the chosen slot, use the jog controls to move the pipette to the exact position for blowing out.</block>",
"select_drop_tip_slot": "<block>You can return tips to a tip rack or dispose of them.</block><br/><block>Select the slot where you want to drop the tips on the deck map to the right. Once confirmed, the gantry will move to the chosen slot.</block>",
"select_drop_tip_slot_odd": "<block>You can return tips to a tip rack or dispose of them.</block><br/><block>After the gantry moves to the chosen slot, use the jog controls to move the pipette to the exact position for dropping tips.</block>",
"skip": "Skip",
"stand_back_blowing_out": "Stand back, robot is blowing out liquid",
Expand Down
8 changes: 4 additions & 4 deletions app/src/assets/localization/en/error_recovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"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>",
"replace_tips_and_select_location": "It's best to replace tips and select the last location used for tip pickup.",
"replace_used_tips_in_rack_location": "Replace used tips in rack location {{location}}",
"replace_with_new_tip_rack": "Replace with new tip rack",
"replace_used_tips_in_rack_location": "Replace used tips in rack location {{location}} in slot {{slot}}",
"replace_with_new_tip_rack": "Replace with new tip rack in slot {{slot}}",
"resume": "Resume",
"retry_now": "Retry now",
"retry_step": "Retry step",
Expand All @@ -58,7 +58,7 @@
"robot_will_retry_with_tips": "The robot will retry the failed step with new tips.",
"run_paused": "Run paused",
"select_tip_pickup_location": "Select tip pick-up location",
"skip": "Skip",
"skip_removal": "Skip removal",
"skip_to_next_step": "Skip to next step",
"skip_to_next_step_new_tips": "Skip to next step with new tips",
"skip_to_next_step_same_tips": "Skip to next step with same tips",
Expand All @@ -73,5 +73,5 @@
"view_error_details": "View error details",
"view_recovery_options": "View recovery options",
"you_can_still_drop_tips": "You can still drop the attached tips before proceeding to tip selection.",
"you_may_want_to_remove": "You may want to remove the tips from the {{mount}} pipette before using it again in a protocol"
"remove_tips_from_pipette": "Remove tips from {{mount}} pipette before canceling the run?"
}
39 changes: 17 additions & 22 deletions app/src/molecules/Command/Command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,11 @@ export function CenteredCommand(
<CommandText
{...props}
propagateTextLimit={props.forceTwoLineClip}
css={`
${props.forceTwoLineClip === true
css={
props.forceTwoLineClip === true
? TEXT_CLIP_STYLE
: ODD_ONLY_TEXT_CLIP_STYLE}
@media not (${RESPONSIVENESS.touchscreenMediaQuerySpecs}) {
max-height: 240px;
overflow: auto;
} ;
`}
: ODD_ONLY_TEXT_CLIP_STYLE
}
modernStyledTextDefaults
/>
</Flex>
Expand Down Expand Up @@ -224,15 +220,11 @@ export function LeftAlignedCommand(
<CommandText
{...omit(props, ['isOnDevice'])}
propagateTextLimit={props.forceTwoLineClip}
css={`
${props.forceTwoLineClip === true
css={
props.forceTwoLineClip === true
? TEXT_CLIP_STYLE
: ODD_ONLY_TEXT_CLIP_STYLE}
@media not (${RESPONSIVENESS.touchscreenMediaQuerySpecs}) {
max-height: 240px;
overflow: auto;
} ;
`}
: ODD_ONLY_TEXT_CLIP_STYLE
}
modernStyledTextDefaults
/>
</Flex>
Expand All @@ -242,14 +234,17 @@ export function LeftAlignedCommand(

const TEXT_CLIP_STYLE = `
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp: 2;
}
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp: 2;
`
const ODD_ONLY_TEXT_CLIP_STYLE = `
@media not (${RESPONSIVENESS.touchscreenMediaQuerySpecs}) {
max-height: 240px;
overflow: auto;
}
@media (${RESPONSIVENESS.touchscreenMediaQuerySpecs}) {
${TEXT_CLIP_STYLE}
}
Expand Down
5 changes: 2 additions & 3 deletions app/src/molecules/Command/CommandText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
LegacyStyledText,
StyledText,
RESPONSIVENESS,
styleProps,
} from '@opentrons/components'

import { useCommandTextString } from './hooks'
Expand Down Expand Up @@ -78,14 +77,14 @@ function CommandStyledText(
<StyledText
desktopStyle={props.desktopStyle ?? 'bodyDefaultRegular'}
oddStyle={props.oddStyle ?? 'bodyTextRegular'}
{...styleProps(props)}
{...props}
>
{props.children}
</StyledText>
)
} else {
return (
<LegacyStyledText as={props.as ?? 'p'} {...styleProps(props)}>
<LegacyStyledText as={props.as ?? 'p'} {...props}>
{props.children}
</LegacyStyledText>
)
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/InProgressModal/InProgressModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const MODAL_STYLE = css`
}
`
const SPINNER_STYLE = css`
color: ${COLORS.grey50};
color: ${COLORS.grey60};
opacity: 100%;
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
color: ${COLORS.black90};
Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/SimpleWizardBody/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export function SimpleWizardBody(props: Props): JSX.Element {
<>
{isSuccess ? (
<img
width={robotType === FLEX_ROBOT_TYPE ? '250px' : '160px'}
height={robotType === FLEX_ROBOT_TYPE ? '208px' : '120px'}
width={robotType === FLEX_ROBOT_TYPE ? '170px' : '160px'}
height={robotType === FLEX_ROBOT_TYPE ? '141px' : '120px'}
src={SuccessIcon}
alt="Success Icon"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const NON_FEATURE_FLAG_SETTINGS = [
'deckCalibrationDots',
'shortFixedTrash',
'useOldAspirationFunctions',
'disableLogAggregation',
'disableFastProtocolUpload',
'disableStatusBar',
]
Expand Down
Loading

0 comments on commit 1ab3fc2

Please sign in to comment.