-
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(api): JSON protocol pipette loading support in Protocol Engine #7766
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #7766 +/- ##
=======================================
Coverage 83.06% 83.06%
=======================================
Files 331 331
Lines 21405 21407 +2
=======================================
+ Hits 17780 17782 +2
Misses 3625 3625
Continue to review full report at Codecov.
|
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.
LGTM
@@ -51,11 +51,13 @@ def load_pipette( | |||
self, | |||
pipette_name: PipetteName, | |||
mount: MountType, | |||
pipette_id: Optional[str], |
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.
Will this ever be needed in this client? I'd be down to leave it out (or default it to None
if that feels better)
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.
Good point. I'll remove it.
@@ -97,6 +108,7 @@ async def load_pipette( | |||
except RuntimeError as e: | |||
raise FailedToLoadPipetteError(str(e)) from e | |||
|
|||
pipette_id = self._resources.id_generator.generate_id() | |||
pipette_id = pipette_id if pipette_id else \ |
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.
Should we be pedantic about checking is not None
vs "is falsey"?
@@ -19,6 +22,11 @@ class LoadPipetteRequest(BaseModel): | |||
..., | |||
description="The mount the pipette should be present on.", | |||
) | |||
pipetteId: Optional[str] = Field( | |||
..., |
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 question I think you posted in the labware PR, but should we default this to None
?
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.
Yes.
Overview
JSON Protocols define IDs for the required pipettes. This PR provides a JSON protocol runner the ability to send commands to the ProtocolEngine to load a pipette with a specific id.
closes #7430
Changelog
LoadPipetteRequest
has optionalpipetteId
parameter. ThepipetteId
will be used as the state store ID if specified otherwise a new ID will be generated.Review requests
Risk assessment
None