Skip to content

Commit

Permalink
feat(api): add liquid classes to the StateSummary. (#16899)
Browse files Browse the repository at this point in the history
# Overview

AUTH-851

Export the liquid classes we loaded into the Protocol Engine to the
`StateSummary`, which will let clients see what liquid classes we
loaded.

The liquid classes are stored internally as a map of
`{liquid_class_id -> LiquidClassRecords}`, but following the convention
for the other fields in the `StateSummary`, we want to export the liquid
classes as a list, so this PR defines a new `LiquidClassRecordWithId`
class for the summary.

The fields in the `StateSummary` in turn are propagated to the CLI
`AnalyzeResults`, and are mirrored to the robot-server
`CompletedAnalysis`, `Run`, and `MaintenanceRun` models. So every
call-site that uses those classes had to be updated, as well as every
test that checks those classes, as well as 200 snapshot tests -- which
was kind of painful.

## Test Plan and Hands on Testing

I'm relying on the CI tests to make sure I found all the call-sites that
are affected.

(We don't yet have any protocols that load liquid classes, but when we
do, we can probably add integration tests to show that the liquid
classes end up in the summaries.)

## Review requests

I recommend collapsing the `analyses-snapshot-testing/` when looking at
this PR in Github. There are so many snapshot changes that Github
sometimes errors out when trying to render the diff.

The primary files with code changes are:
- `api/src/opentrons/protocol_engine/types.py`
- `api/src/opentrons/protocol_engine/state/state.py`
- `api/src/opentrons/protocol_engine/state/state_summary.py`
- `api/src/opentrons/cli/analyze.py`
- `robot-server/robot_server/runs/run_models.py`
- `robot-server/robot_server/protocols/analysis_models.py`
- `robot-server/robot_server/maintenance_runs/maintenance_run_models.py`

The other files are pretty mechanical changes.

## Risk assessment

Low risk, should affect dev only.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: y3rsh <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent ecd916b commit a910cf0
Show file tree
Hide file tree
Showing 251 changed files with 331 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16668,6 +16668,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"apiLevel": "2.11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41584,6 +41584,7 @@
"location": "offDeck"
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Bacterial culture medium (e.g., LB broth)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4919,6 +4919,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"apiLevel": "2.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11824,6 +11824,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "<[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11452,6 +11452,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "High Quality H₂O",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2917,6 +2917,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "H₂O",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3113,6 +3113,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "Opentrons Engineering <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9569,6 +9569,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "Opentrons Engineering <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66156,6 +66156,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "Opentrons <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {},
"modules": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49707,6 +49707,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "CleanupBead Beads",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
}
],
"labware": [],
"liquidClasses": [],
"liquids": [],
"metadata": {
"protocolName": "Description Too Long 2.18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17072,6 +17072,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "H₂O",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9569,6 +9569,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "Opentrons Engineering <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49392,6 +49392,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Beads",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6263,6 +6263,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "96 channel pipette and a ROW partial tip configuration.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33697,6 +33697,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {},
"modules": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19352,6 +19352,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Coomassie Brilliant Blue G-250 solution ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7997,6 +7997,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6203,6 +6203,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "water for ER testing",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4492,6 +4492,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "Dandra Howell <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34590,6 +34590,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Beads",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9297,6 +9297,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"author": "Rami Farawi <[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12753,6 +12753,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@
}
],
"labware": [],
"liquidClasses": [],
"liquids": [],
"metadata": {
"protocolName": "Heater-shaker conflict OT-2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53267,6 +53267,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Dynebeads Slurry",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82175,6 +82175,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"apiLevel": "2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20891,6 +20891,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "DNAse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
}
],
"labware": [],
"liquidClasses": [],
"liquids": [],
"metadata": {
"protocolName": "Description Too Long 2.18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31929,6 +31929,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Dilution Buffer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35213,6 +35213,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "AL Buffer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
}
],
"labware": [],
"liquidClasses": [],
"liquids": [],
"metadata": {
"protocolName": "No RTP Display Name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26205,6 +26205,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": " ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2728,6 +2728,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56906,6 +56906,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Sample per well",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17669,6 +17669,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Samples",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20878,6 +20878,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "Samples",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3912,6 +3912,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3878,6 +3878,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4241,6 +4241,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {},
"modules": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31816,6 +31816,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "DB1/DP1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "oooo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17103,6 +17103,7 @@
"location": "offDeck"
}
],
"liquidClasses": [],
"liquids": [
{
"description": "High Quality H₂O",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3017,6 +3017,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "96 2 tips picked up on all 4 corners of the tip rack",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9431,6 +9431,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"description": "Tip Rack North Clearance for the 96 channel pipette and a SINGLE partial tip configuration.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,7 @@
}
}
],
"liquidClasses": [],
"liquids": [],
"metadata": {
"apiLevel": "2.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16660,6 +16660,7 @@
}
}
],
"liquidClasses": [],
"liquids": [
{
"description": "DNA Fragments to be Inserted",
Expand Down
Loading

0 comments on commit a910cf0

Please sign in to comment.