Skip to content

Commit

Permalink
fix(hardware-testing): lld script fixes (#15378)
Browse files Browse the repository at this point in the history
<!--
Thanks for taking the time to open a pull request! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:


https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

# Overview
Missed a few things when I merged in edge to a long standing testing
branch that I caught when I started using it on a robot
<!--
Use this section to describe your pull-request at a high level. If the
PR addresses any open issues, please tag the issues here.
-->

# Test Plan

<!--
Use this section to describe the steps that you took to test your Pull
Request.
If you did not perform any testing provide justification why.

OT-3 Developers: You should default to testing on actual physical
hardware.
Once again, if you did not perform testing against hardware, justify
why.

Note: It can be helpful to write a test plan before doing development

Example Test Plan (HTTP API Change)

- Verified that new optional argument `dance-party` causes the robot to
flash its lights, move the pipettes,
then home.
- Verified that when you omit the `dance-party` option the robot homes
normally
- Added protocol that uses `dance-party` argument to G-Code Testing
Suite
- Ran protocol that did not use `dance-party` argument and everything
was successful
- Added unit tests to validate that changes to pydantic model are
correct

-->

# Changelog

<!--
List out the changes to the code in this PR. Please try your best to
categorize your changes and describe what has changed and why.

Example changelog:
- Fixed app crash when trying to calibrate an illegal pipette
- Added state to API to track pipette usage
- Updated API docs to mention only two pipettes are supported

IMPORTANT: MAKE SURE ANY BREAKING CHANGES ARE PROPERLY COMMUNICATED
-->

# Review requests

<!--
Describe any requests for your reviewers here.
-->

# Risk assessment

<!--
Carefully go over your pull request and look at the other parts of the
codebase it may affect. Look for the possibility, even if you think it's
small, that your change may affect some other part of the system - for
instance, changing return tip behavior in protocol may also change the
behavior of labware calibration.

Identify the other parts of the system your codebase may affect, so that
in addition to your own review and testing, other people who may not
have the system internalized as much as you can focus their attention
and testing there.
-->
  • Loading branch information
ryanthecoder committed Jun 11, 2024
1 parent b14985c commit 6566ef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ async def liquid_probe(
self._subsystem_manager.device_info[
SubSystem.of_mount(mount)
].revision.tertiary
== "1"
!= "1"
):
raise UnsupportedHardwareCommand(
"Liquid Probe not supported on this pipette firmware"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def process_csv_directory( # noqa: C901
transposed_pressure_rows = list(map(list, zip(*pressure_rows)))
try:
google_sheet.batch_update_cells(
sheet_name, transposed_pressure_rows, "H", 11, sheet_id
transposed_pressure_rows, "H", 11, sheet_id
)
except google_sheets_tool.google_interaction_error:
ui.print_error("Did not write pressure data to google sheet.")
Expand Down Expand Up @@ -284,7 +284,7 @@ def process_google_sheet(
test_info,
]
num_of_trials = run_args.trials # type: ignore[attr-defined]
google_sheet.batch_update_cells(sheet_name, test_parameters, "A", 1, sheet_id)
google_sheet.batch_update_cells(test_parameters, "A", 1, sheet_id)
target_height = google_sheet.get_cell(sheet_name, "B9")
ui.print_info(target_height)
last_trial_row = 10 + num_of_trials
Expand All @@ -295,7 +295,7 @@ def process_google_sheet(
normalized_height = [
float(height) - float(target_height) for height in adjusted_height
]
google_sheet.batch_update_cells(sheet_name, [normalized_height], "F", 11, sheet_id)
google_sheet.batch_update_cells([normalized_height], "F", 11, sheet_id)
# Find accuracy, precision, repeatability
try:
accuracy = statistics.mean(normalized_height)
Expand All @@ -307,7 +307,7 @@ def process_google_sheet(
["Accuracy (mm)", "Precision (+/- mm)", "Repeatability (%)"],
[accuracy, precision, 100.0 - 100.0 * repeatability_error],
]
google_sheet.batch_update_cells(sheet_name, summary, "D", 2, sheet_id)
google_sheet.batch_update_cells(summary, "D", 2, sheet_id)
except google_sheets_tool.google_interaction_error:
ui.print_error("stats didn't work.")

Expand Down

0 comments on commit 6566ef2

Please sign in to comment.