Skip to content
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

feature(api): add a defined over pressure error to prepare to aspirate #16518

Merged
merged 28 commits into from
Oct 21, 2024

Conversation

TamarZanzouri
Copy link
Contributor

@TamarZanzouri TamarZanzouri commented Oct 17, 2024

Overview

partially closes EXEC-557.
raise a defined over pressure error for prepare for aspirate command.

Test Plan and Hands on Testing

upload the following protocol, while pausing place the pad beneath the tip, resume and trigger an over pressure error.

from opentrons import protocol_api, types


requirements = {
    "apiLevel": "2.18",
    "robotType": "Flex",
}


def run(protocol: protocol_api.ProtocolContext) -> None:
    magnetic_block = protocol.load_module(module_name="magneticBlockV1", location="D1")
    tip_rack = protocol.load_labware("opentrons_flex_96_tiprack_1000ul", "C1")
    well_plate = protocol.load_labware("nest_96_wellplate_100ul_pcr_full_skirt", "C3")

    protocol.load_trash_bin("A3")

    pipette = protocol.load_instrument("flex_1channel_1000", mount="left")

    pipette.pick_up_tip(tip_rack["A12"])
    pipette.move_to(well_plate["A1"].top())
    protocol.pause()
    pipette.prepare_to_aspirate()

Changelog

add a defined over pressure error for prepare_to_aspirate

Risk assessment

low.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks!

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

TamarZanzouri and others added 23 commits October 18, 2024 10:38
Partially closes EXEC-776

As the "ignore error and skip/retry" routing no longer applies only to one recovery option, it's worth revisiting the way we structure routing/copy. More importantly, we probably should avoid sending any sort of "ignore all errors" policy updates to the server until the user exits error recovery, because sending policy changes earlier could provide unexpected behavior if the user selects the "ignore all option" but then clicks "go back".

If the PUT request for the policy updates fail, route the user to our "recovery failed" modal and let the user select a different (or same) option.
AUTH-835, AUTH-836

# Overview

Adds `LiquidClass` class and `ProtocolContext.define_liquid_class()` to
PAPI. Also adds an `allowLiquidClasses` feature flag that will need to
be set to True in order to use the new API method.

## Changelog

- added `LiquidClass` dataclass to PAPI
- added `ProtocolContext.define_liquid_class` to define a liquid class
in the protocol
- added `allowLiquidClasses` internal feature flag

Some small schema changes:
- changed `liquidName` -> `liquidClassName` and made it a `safestring`
- added a `displayName`
- changed `tipType` -> tiprack

Misc shared data changes:
- added `liquid_classes.load_definition()`
- added validation tests for liquid class definitions
Closes EXEC-777

#16510 appears to have fixed most of the inPlace issues we had seen back in 8.0, and it has (hopefully) greatly simplified the additional support the app needs to provide to get inPlace variations of aspirate/dispense working.

This commit just wires up those commands to the appropriate flows.
implements the system language modal that displays on first boot of the
desktop app or when the language of the computer running the desktop app
changes.

closes PLAT-536
* fix(protocol-designer): add Eppendorf to removeOpentronsPhrases
* fix(labware-library): fix labware-library css issue
<!--
Thanks for taking the time to open a Pull Request (PR)! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:


https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

GitHub provides robust markdown to format your PR. Links, diagrams,
pictures, and videos along with text formatting make it possible to
create a rich and informative PR. For more information on GitHub
markdown, see:


https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

# Overview

<!--
Describe your PR at a high level. State acceptance criteria and how this
PR fits into other work. Link issues, PRs, and other relevant resources.
-->

This PR enables static meniscus-relative aspirate and dispense via the
Protocol API. To enable this, WellVolumeOffset has been added to
WellLocation. This is a volume of liquid to account for when executing
commands with an origin of WellOrigin.MENISCUS. Specifying
`operationVolume` results in this class acting as a sentinel and should
be used when volume can be determined from the command parameters, for
example commanding Aspirate. A volume should be specified when it cannot
be determined from the command parameters, for example commanding
MoveToWell prior to AspirateInPlace.

## Test Plan and Hands on Testing

<!--
Describe your testing of the PR. Emphasize testing not reflected in the
code. Attach protocols, logs, screenshots and any other assets that
support your testing.
-->

Successfully tested the following protocol on a robot multiple times in
a row. Aspiration from meniscus was not tested due to not-yet-available
InnerWellGeometry:
```
from opentrons.protocol_api import ProtocolContext
metadata = {"protocolName": "Test LLD"}
requirements = {"robotType": "Flex", "apiLevel":"2.21"}


def run(ctx: ProtocolContext) -> None:
    """Run."""
    tiprack = ctx.load_labware(f"opentrons_flex_96_tiprack_1000uL", "A3")
    source = ctx.load_labware("nest_12_reservoir_15ml", "C2")
    sink = ctx.load_labware("nest_96_wellplate_100ul_pcr_full_skirt", "D2")
    pipette = ctx.load_instrument("flex_1channel_1000", "left", liquid_presence_detection = True)

    pipette.pick_up_tip(tiprack)
    pipette.measure_liquid_height(sink["A1"])
    pipette.aspirate(10, source["A1"])
    pipette.dispense(10, sink["A1"].meniscus(-2))
    pipette.return_tip()
```

## Changelog

<!--
List changes introduced by this PR considering future developers and the
end user. Give careful thought and clear documentation to breaking
changes.
-->

## Review requests

<!--
- What do you need from reviewers to feel confident this PR is ready to
merge?
- Ask questions.
-->

## Risk assessment

<!--
- Indicate the level of attention this PR needs.
- Provide context to guide reviewers.
- Discuss trade-offs, coupling, and side effects.
- Look for the possibility, even if you think it's small, that your
change may affect some other part of the system.
- For instance, changing return tip behavior may also change the
behavior of labware calibration.
- How do your unit tests and on hands on testing mitigate this PR's
risks and the risk of future regressions?
- Especially in high risk PRs, explain how you know your testing is
enough.
-->
…#16516)

Update [winston](https://www.npmjs.com/package/winston/v/3.15.0) which
is what we use for logging on the node side to the most recent version
(3.15) so that we can use `logger.child()`, which lets you override
logger metadata without having to create another logger instance.

The reason to do this is that each full winston logger instance hangs
event listeners off its shared transports
(winstonjs/winston#1334) which results in
annoying node warning messages about memory leaks that aren't real and
are just based on "did you add more than a magic number of listeners to
this event". With the child logs, nothing adds the events, and we don't
get the warnings.

Also, get rid of the file logging to `/app/ODD/logs/error.log` and
`/app/ODD/logs/combined.log`, because we're already sending everything
to journald via the console and [using that to provide the logs via
http](https://github.com/Opentrons/opentrons/blob/edge/robot-server/robot_server/service/legacy/routers/logs.py#L16)
so it's just extra storage wear and space usage that we don't actually
need.

## testing
- [x] do the logs still go
The edge overnight analyses snapshot test is failing. This PR was opened
to alert us to the failure.

Co-authored-by: y3rsh <[email protected]>
## Overview

Heal edge on missed snapshot change due to #16525
Closes EXEC-776

This commit is a hodgepodge of small refactors to update error recovery to match designs (and fix small things that bother me and probably no one else).

b98064d - Updates the drop tip wizard copy to match designs
e8ff83f - If you look at "go back" and "continue" buttons, they aren't actually aligned. I think I borked this recently.
041305e - The deck map in ER slightly pushes down the "continue" button so it's not perfectly aligned with other error recovery "continue" buttons. This fixes that.
beb4184 - If you click "view error details" on the desktop app and adjust the size of your app, eventually the error details modal doesn't align with error recovery. Let's fix this by giving InterventionModal the same padding styling as the basic modal, which it should probably have regardless.
* fix(protocol-designer): enable color picker's alpha value
* fix(protocol-designer): fix remove settings icon button
* fix(protocol-designer): fix create button clickable area issue
@TamarZanzouri TamarZanzouri requested review from a team as code owners October 18, 2024 16:39
@TamarZanzouri TamarZanzouri requested review from ncdiehl11 and removed request for a team October 18, 2024 16:39
@TamarZanzouri TamarZanzouri force-pushed the EXEC-557-overpressure-detected-during-prepare-to-aspirate branch from ccbff54 to 6a9115f Compare October 18, 2024 16:48
@TamarZanzouri TamarZanzouri removed the request for review from ncdiehl11 October 18, 2024 16:48
@mjhuff
Copy link
Contributor

mjhuff commented Oct 21, 2024

Merging this to unblock some FE work

@mjhuff mjhuff merged commit 397f079 into edge Oct 21, 2024
22 checks passed
@mjhuff mjhuff deleted the EXEC-557-overpressure-detected-during-prepare-to-aspirate branch October 21, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.