refactor(protocol-designer): make HydratedFormData.tipRack a LabwareEntity #19904
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Part 6 to fix tiprack definition lookups in PD.
So I had started props-drilling to pass
InvariantContext.labwareEntitiesdown to all the functions that need to look up the labware definition for aHydratedFormData.tipRackURI. (Recall that the problem is that we're trying to look up the tiprack definition inPipetteEntity.tiprackLabwareDef, but thePipetteEntitywon't have the tiprack definition if the user removed the tiprack from the pipette).Then I realized that it'd be much easier to just put the tiprack definition directly into
HydratedFormDatawhen we're hydrating the form. Then anyone who's using theHydratedFormDatawould have the tiprack definition without needing to do any extra work.There are good precedents for this: we already put the
Entitiesfor.aspirate_labware,.dispense_labware, and.pipetteintoHydratedFormData. So it's reasonable to put theEntityfor.tipRackinto theHydratedFormDataas well.So this PR changes
HydratedMoveLiquidFormData/HydratedMixFormData.tipRackfrom a URI string to aLabwareEntity.To keep this PR small and manageable, I just left TODOs for the other functions that we can simplify later now that the tiprack definition is available in
HydratedFormData.Test Plan and Hands on Testing
Updated unit tests.
Ran tests locally.
Will run tests in CI.
Risk assessment
Medium.