Skip to content

Commit

Permalink
feat(hardware-testing): Automatically build visualizations for LLD te…
Browse files Browse the repository at this point in the history
…sting (#15276)

<!--
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
Adds the ability for the script to automatically upload test data to
google sheets. also adds a few test improvements
EXEC-472

<!--
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.
-->

---------

Co-authored-by: Andy Sigler <andrewsigler1@gmail.com>
Co-authored-by: rclarke0 <rhyann.clarke@opentrons.com>
Co-authored-by: Thassyo Pinto <thassyo.pinto@gmail.com>
  • Loading branch information
4 people committed Jun 5, 2024
1 parent 0fa37a3 commit cafc1fd
Show file tree
Hide file tree
Showing 18 changed files with 808 additions and 369 deletions.
10 changes: 10 additions & 0 deletions abr-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ package_version = $(call python_package_version,abr-testing,$(project_rs_default
wheel_file = dist/$(call python_get_wheelname,abr-testing,$(project_rs_default),$(package_name),$(BUILD_NUMBER))
sdist_file = dist/$(call python_get_sdistname,abr-testing,$(project_rs_default),$(package_name))

# Find the branch, sha, version that will be used to update the VERSION.json file
version_file = $(call python_get_git_version,abr-testing,$(project_rs_default),abr-testing)

tests ?= tests
test_opts ?=

Expand Down Expand Up @@ -78,3 +81,10 @@ format:
.PHONY: test
test:
@echo "No tests yet"

.PHONY: push-no-restart-ot3
push-no-restart-ot3: sdist Pipfile.lock
$(call push-python-sdist,$(host),$(ssh_key),$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,"abr_testing",,,$(version_file))

.PHONY: push-ot3
push-ot3: push-no-restart-ot3
6 changes: 6 additions & 0 deletions abr-testing/abr_testing/automation/google_sheets_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
"""


class google_interaction_error(gspread.exceptions.APIError):
"""Internal use exception so we don't need to import gspread directly in other projects."""

pass


class google_sheet:
"""Google Sheets Tool."""

Expand Down
24 changes: 17 additions & 7 deletions hardware-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ test-scripts:
test-liquid-sense:
$(python) -m hardware_testing.liquid_sense --simulate --pipette 1000 --channels 1
$(python) -m hardware_testing.liquid_sense --simulate --pipette 50 --channels 1
$(python) -m hardware_testing.liquid_sense --simulate --pipette 1000 --channels 8
$(python) -m hardware_testing.liquid_sense --simulate --pipette 50 --channels 8
$(python) -m hardware_testing.liquid_sense --simulate --pipette 1000 --channels 96

.PHONY: test-integration
test-integration: test-production-qc test-examples test-scripts test-gravimetric
Expand Down Expand Up @@ -198,6 +195,11 @@ push-description-ot3:
$(python) -c "from hardware_testing.data import create_git_description_file; create_git_description_file()"
scp $(ssh_helper_ot3) ./.hardware-testing-description root@$(host):/data/

.PHONY: push-labware-ot3
push-labware-ot3:
ssh $(ssh_helper_ot3) root@$(host) "mkdir -p /data/labware/v2/custom_definitions/custom_beta"
scp $(ssh_helper_ot3) -r hardware_testing/labware/* root@$(host):/data/labware/v2/custom_definitions/custom_beta/

.PHONY: restart
restart:
$(call restart-service,$(host),$(ssh_key),$(ssh_opts),"opentrons-robot-server")
Expand All @@ -218,10 +220,10 @@ push-no-restart-ot3: sdist Pipfile.lock
$(call push-python-sdist,$(host),$(ssh_key),$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,"hardware_testing",,,$(version_file))

.PHONY: push-ot3
push-ot3: push-no-restart-ot3 push-plot-webpage-ot3 push-description-ot3
push-ot3: push-no-restart-ot3 push-plot-webpage-ot3 push-description-ot3 push-labware-ot3

.PHONY: push-all
push-all: clean wheel push-no-restart push-plot-webpage
push-all: clean wheel push-no-restart push-plot-webpage-ot3

.PHONY: term
term:
Expand Down Expand Up @@ -275,6 +277,16 @@ push-ot3-fixture:
$(MAKE) remove-patches-fixture


.PHONY: push-ot3-lld
push-ot3-lld:
$(MAKE) apply-patches-fixture
cd ../ && $(MAKE) -C shared-data push-ot3
cd ../ && $(MAKE) -C hardware push-ot3
cd ../ && $(MAKE) -C hardware_testing push-ot3
cd ../ && $(MAKE) -C api push-ot3
$(MAKE) remove-patches-fixture


.PHONY: apply-patches-fixture
apply-patches-fixture:
cd ../ && git apply ./hardware-testing/fixture_overrides/*.patch --allow-empty
Expand All @@ -294,8 +306,6 @@ sync-ot3: sync-sw-ot3 sync-fw-ot3
.PHONY: push-ot3-gravimetric
push-ot3-gravimetric:
$(MAKE) push-ot3
ssh $(ssh_helper_ot3) root@$(host) "mkdir -p /data/labware/v2/custom_definitions/custom_beta"
scp $(ssh_helper_ot3) -r hardware_testing/labware/* root@$(host):/data/labware/v2/custom_definitions/custom_beta/
$(MAKE) apply-patches-gravimetric
cd ../ && $(MAKE) -C shared-data push-ot3
$(MAKE) remove-patches-gravimetric
Expand Down
1 change: 1 addition & 0 deletions hardware-testing/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ opentrons = {editable = true, path = "./../api", extras=['flex-hardware']}
opentrons-shared-data = {editable = true, path = "./../shared-data/python"}
opentrons-hardware = {editable = true, path = "./../hardware", extras=['FLEX']}
hardware-testing = { editable = true, path = "." }
abr-testing = { editable = true, path = "./../abr-testing" }
pyserial = "==3.5"

[dev-packages]
Expand Down
130 changes: 67 additions & 63 deletions hardware-testing/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cafc1fd

Please sign in to comment.