-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(protocol-engine): absorbance plate reader engine load behavior and lid movement command #15599
Conversation
439e88f
to
c46bd3a
Compare
], | ||
"parameters": { | ||
"format": "irregular", | ||
"quirks": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a new quirk: unloadable_by_user
Add engine logic to check the quirk
…ds and bump required version to 2.21
b34f5bd
to
fece1e7
Compare
A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/ |
Some notes on behavior changes in this latest commit:
After exploring a series of implementation methods to get us where we want to be with this, this series of changes made the most sense. Let us know your thoughts on this and if any apparent problems would arise from these refactors. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #15599 +/- ##
=======================================
Coverage 63.31% 63.31%
=======================================
Files 300 300
Lines 15773 15773
=======================================
Hits 9986 9986
Misses 5787 5787
Flags with carried forward coverage won't be shown. Click here to find out more. |
A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/ |
this was set to 2 21 for testing but should remain at 2 20
Took a quick look at docstrings and they're good for now! We can make any edits this fall when we write a full documentation page for the reader (RTC-488). |
pickUpOffset: Optional[LabwareOffsetVector] = Field( | ||
None, | ||
description="Offset to use when picking up labware. " | ||
"Experimental param, subject to change", | ||
) | ||
dropOffset: Optional[LabwareOffsetVector] = Field( | ||
None, | ||
description="Offset to use when dropping off labware. " | ||
"Experimental param, subject to change", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CaseyBatten
Do we still need this?, since we know the exact location of the lid per the definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We utilized this previously for D3/D4 movement estimations (third column in general) before the addressable area hookups were in place, can definitely be removed now.
# TODO (AA): we probably don't need this, but let's keep it until we're sure | ||
user_offset_data = LabwareMovementOffsetData( | ||
pickUpOffset=params.pickUpOffset or LabwareOffsetVector(x=0, y=0, z=0), | ||
dropOffset=params.dropOffset or LabwareOffsetVector(x=0, y=0, z=0), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we still need this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reasoning as stated above, can be removed now.
# TODO (AA): we probably don't need this, but let's keep it until we're sure | ||
user_offset_data = LabwareMovementOffsetData( | ||
pickUpOffset=params.pickUpOffset or LabwareOffsetVector(x=0, y=0, z=0), | ||
dropOffset=params.dropOffset or LabwareOffsetVector(x=0, y=0, z=0), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, not sure if needed anymore?
@@ -63,32 +61,32 @@ async def execute( | |||
if abs_reader is not None: | |||
result = await abs_reader.start_measure(wavelength=params.sampleWavelength) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Are we guaranteed to be initialized by the time we get here? or do we need to raise some error otherwise?
- Do we want to check the plate presence here before beginning a read? since we cant read if there's no plate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be covered in a separate PR related to the Read behavior live data hookups, engine validations, etc.
This is great, thank you for getting this over the edge! Left a few comments on
|
@CaseyBatten |
This looks good, thank you for making the changes and fixing the merge conflicts.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fundamental engine behaviors as well as the framework for Plate Reader interaction allow the use of the plate reader in a protocol and ensure the handling of the lid as an object with trackable state in the context of engine behavior.
labware.append( | ||
DeckFixedLabware( | ||
labware_id=labware_id, | ||
definition=definition, | ||
location=addressable_area_location, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of the lids to the fixed labware loading mechanism is how we manage to ensure a lid exists within the engine context before an explicit load module command has occurred, utilizing the deck configuration.
{ | ||
"id": "absorbanceReaderV1LidA3", | ||
"slot": "absorbanceReaderV1A3", | ||
"labware": "opentrons_flex_lid_absorbance_plate_reader_module", | ||
"displayName": "Plate Reader Lid" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of this (and all similar plate reader lids) ensures a lid "fixture" labware is tagged via the addressable areas loaded onto the deck. This mechanism gives us the tools to inject labware into the engine context without explicit load commands given only the provided configuration of the deck itself.
new_location = self._state_view.modules.absorbance_reader_dock_location( | ||
mod_substate.module_id | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure we handle the Lid dock as an addressable area, resolved via the module which created it.
addressableAreaName=self._state_view.modules.ensure_and_convert_module_fixture_location( | ||
deck_slot=self._state_view.modules.get_location( | ||
params.moduleId | ||
).slotName, | ||
deck_type=self._state_view.config.deck_type, | ||
model=absorbance_model, | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure we handle the module reader slot as an addressable area, resolved through the module and location in which the module was loaded.
Overview
Covers PLAT-447 PLAT-381 PLAT-210 PLAT-209 PLAT-204 PLAT-205 PLAT-206 PLAT-215 PLAT-193 PLAT-194 PLAT-397 PLAT-398 PLAT-406 PLAT-407
This PR introduces the fundamental load module and labware presence behavior for the plate reader and it's associated lid.
This PR implements the
open_lid
andclose_lid
commands for the plate reader.Changelog
AddAbsorbanceReaderLidAction
to pass the lid's labware id to the absorbance plate reader substate in the case of analysis and virtualized modulesopen_lid
andclose_lid
protocol engine commandTests