-
Notifications
You must be signed in to change notification settings - Fork 178
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
fix(api): Raise cases for unsupported nozzle layouts #15009
Changes from 1 commit
a58d2ac
6768ca9
9f2ba9f
15b0fdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,10 @@ For greater convenience, also import the individual layout constants that you pl | |
|
||
Then when you call ``configure_nozzle_layout`` later in your protocol, you can set ``style=COLUMN``. | ||
|
||
It is important to note that for versions <= 7.3, when configuring for COLUMN layout, there may be a noticeable tip overlap offset that will need to be accounted for through Labware Position Check. | ||
|
||
Along that same line of logic, it would be advisable to determine a configuration to be used for a specific labware, and only interact with that labware when in said configuration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what this means. |
||
|
||
Here is the start of a protocol that performs both imports, loads a 96-channel pipette, and sets it to pick up a single column of tips. | ||
|
||
.. code-block:: python | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,6 +12,8 @@ | |||||
) | ||||||
from opentrons_shared_data.errors import ErrorCodes, GeneralError, PythonException | ||||||
|
||||||
MAXIMUM_NOZZLE_COUNT = 24 | ||||||
|
||||||
|
||||||
def _nozzle_names_by_row(rows: List[PipetteRowDefinition]) -> Iterator[str]: | ||||||
for row in rows: | ||||||
|
@@ -267,6 +269,17 @@ def build( | |||||
(nozzle, physical_nozzles[nozzle]) for nozzle in chain(*rows.values()) | ||||||
) | ||||||
|
||||||
if ( | ||||||
NozzleConfigurationType.determine_nozzle_configuration( | ||||||
physical_rows, rows, physical_columns, columns | ||||||
) | ||||||
!= NozzleConfigurationType.FULL | ||||||
): | ||||||
if len(rows) * len(columns) > MAXIMUM_NOZZLE_COUNT: | ||||||
raise IncompatibleNozzleConfiguration( | ||||||
f"Partial Nozzle Layouts may not be configured to contain more than {MAXIMUM_NOZZLE_COUNT} channels." | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copy suggestion
Suggested change
|
||||||
) | ||||||
|
||||||
return cls( | ||||||
starting_nozzle=starting_nozzle, | ||||||
map_store=map_store, | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1928,12 +1928,12 @@ def configure_nozzle_layout( | |||||
should be of the same format used when identifying wells by name. | ||||||
Required unless setting ``style=ALL``. | ||||||
|
||||||
.. note:: | ||||||
When using the ``COLUMN`` layout, the only fully supported value is | ||||||
``start="A12"``. You can use ``start="A1"``, but this will disable tip | ||||||
tracking and you will have to specify the ``location`` every time you | ||||||
call :py:meth:`.pick_up_tip`, such that the pipette picks up columns of | ||||||
tips *from right to left* on the tip rack. | ||||||
.. note: | ||||||
When configuring for the ``COLUMN`` layout in versions <= 7.3 it is | ||||||
recommended to perform Labware Position Check on the labware that will be | ||||||
interacted with in a partial configuration. Failure to do so may result | ||||||
in a tip overlap of up to 0.5mm and the raising of Overpressure errors | ||||||
in certain edge cases. | ||||||
|
||||||
:type start: str or ``None`` | ||||||
:param tip_racks: Behaves the same as setting the ``tip_racks`` parameter of | ||||||
|
@@ -1947,6 +1947,20 @@ def configure_nozzle_layout( | |||||
# :param front_right: The nozzle at the front left of the layout. Only used for | ||||||
# NozzleLayout.QUADRANT configurations. | ||||||
# :type front_right: str or ``None`` | ||||||
# | ||||||
# NOTE: Disabled layouts error case can be removed once desired map configurations | ||||||
# have appropriate data regarding tip-type to map current values added to the | ||||||
# pipette definitions. | ||||||
disabled_layouts = [ | ||||||
NozzleLayout.ROW, | ||||||
NozzleLayout.SINGLE, | ||||||
NozzleLayout.QUADRANT, | ||||||
] | ||||||
if style in disabled_layouts: | ||||||
raise ValueError( | ||||||
f"Nozzle layout configuration of style {style.value} is currently unsupported." | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copy suggestion
Suggested change
|
||||||
) | ||||||
|
||||||
if style != NozzleLayout.ALL: | ||||||
if start is None: | ||||||
raise ValueError( | ||||||
|
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.
If there isn't an API change here, I think this is best addressed in the 7.3 release notes, probably under the "Improved features" header.
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.
Another possible location is as a note in the API Reference entry. Regardless, I think I'd want to keep it out of the main description of the feature in this article — especially if we've improved the behavior to the point that we don't have to be issuing warnings about how the latest version works.