Skip to content

Candidate chore_release-8.5.0 cherry-pick branch#18379

Merged
y3rsh merged 63 commits intochore_release-8.5.0from
candidate-chore_release-8.5.0
May 30, 2025
Merged

Candidate chore_release-8.5.0 cherry-pick branch#18379
y3rsh merged 63 commits intochore_release-8.5.0from
candidate-chore_release-8.5.0

Conversation

@ddcc4
Copy link
Copy Markdown
Contributor

@ddcc4 ddcc4 commented May 17, 2025

Robot stack 8.5.0 is a cherry-pick release on top of chore_release-8.4.0.

The list of cherry-picks is here: chore_release-8.4.0...candidate-chore_release-8.5.0

The cherry-picks fall into these categories:

Liquid classes and PAPI support for Python interoperability:

Simple bug fixes:

(Including these because if we fixed an issue 2 months ago, I don't want users to have to wait for the next-next release to get the fix.)

Documentation updates:

CI/Makefile/chore updates etc., and files included to reduce merge conflicts with the changes above:

All the cherry-picks were unmodified from edge except for #17310, #17854, #17932, #17994, #18012, #18021, #18077, #18383, #18401, #18445.

y3rsh and others added 30 commits March 26, 2025 10:17
Since we have isolated Robot Stack release 8.4 into
`chore_release-8.4.0` we must lock down command schema 12 for that Robot
Stack Release. If changes are needed to command schema 12 they must
first be done in `chore_release-8.4.0` then incorporated in `edge` via a
merge back.

(cherry picked from commit 1e70394)
Merge chore_release-8.4.0 mergeback branch into edge

Co-authored-by: Josh McVey <josh.mcvey@opentrons.com>
Co-authored-by: Jamey Huffnagle <jamey.huffnagle@opentrons.com>
Co-authored-by: Ryan Howard <ryan.howard@opentrons.com>
Co-authored-by: Sanniti Pimpley <sanni-t@users.noreply.github.com>
Co-authored-by: Andy Sigler <andrewsigler1@gmail.com>
Co-authored-by: Seth Foster <seth@opentrons.com>
Co-authored-by: emilyburghardt <emily.burghardt@opentrons.com>
Co-authored-by: Max Marrone <max@opentrons.com>
Co-authored-by: Jeremy Leon <jeremy.leon@opentrons.com>

(cherry picked from commit 26345e1)
…cter (#17937)

This fixes a small problem I noticed with the `/clientData` endpoints.

These endpoints have a path parameter that's an arbitrary client-defined
ID, like `PUT /clientData/<id>`, `GET /clientData/<id>`. The string
ought to be at least one character long, otherwise there's no way to
distinguish `DELETE /clientData/<id>`, which deletes the specific entry
represented by `<id>`, from `DELETE /clientData/`, which deletes all
entries. This PR adds validation for that.

(cherry picked from commit 1cddbbd)
…cstring (#17980)

# Overview

@ddcc4 spotted a typo in the code sample in this docstring. We
accidentally used the deprecated pipette delay method, instead of the
proper protocol delay method.

## Test Plan and Hands on Testing

[Sandbox](http://sandbox.docs.opentrons.com/fix-delay-in-prepare_to_aspirate-docstring/v2/new_protocol_api.html#opentrons.protocol_api.InstrumentContext.prepare_to_aspirate)

## Changelog

- Use the right method
- Parentheses on method name 🧐

## Review requests

best to put this in `edge`, no?

## Risk assessment

nil

(cherry picked from commit 2dabd34)
…t_context.py (#17994)

# Overview

For some reason, we were mocking out the entire
`protocol_api/validation.py` module in `test_instrument_context.py`.
There is no reason to do that, since the validation functions are pure
functions that don't rely on external objects, and we really ought to
test the validation functions in our tests.

Furthermore, we were abusing the mocks to make the validation functions
do wild things: like mistranslating `Location`s into `WellTarget`s, or
turning the `"never"` tip-replacement policy into
`TransferTipPolicyV2.ONCE`. There is no good reason to do that, and it
just makes the test logic ridiculously hard to follow.

I need to fix this because I want to write a test for my change to the
`mix()` function, but it was very hard to do so given how we were using
`mock_validation`.

## Test Plan and Hands on Testing

I examined all the usages of `mock_validation` by hand. It was very
painful.

## Risk assessment

Low. This is a test-only change.

(cherry picked from commit 2fece0c)
# Overview

This adds the new argument `mm_from_edge` to the `touch_tip()` public
API function.

The option is needed for PD protocols. And we generally think that it
makes more sense for users to specify `mm_from_edge` instead of
`radius`.

Support for `mm_from_edge` already exists in the Protocol Core and
Engine (PR #17107), so all we need to do is to pass the new argument
along to the Core.

We follow the same convention that we adopted in the Protocol Engine,
that `radius` and `mm_from_edge` are mutually exclusive, so if the user
specifies `mm_from_edge`, they must leave `radius` to its default value
of 1.0

## Test Plan and Hands on Testing

I added unit tests to check for all combinations of `mm_from_edge` and
`radius`.

## Review requests

Do I need to do anything else for API versioning? What API version would
this go into?

## Risk assessment

Medium. We're adding a new API option, and we have to support API
changes forever once released.

(cherry picked from commit 63f1512)
Merging the latest chore_release-8.4.0 back to edge.
Plus adding a fix for command schema 13 that was not available for
release branch.

---------

Co-authored-by: Josh McVey <josh.mcvey@opentrons.com>
Co-authored-by: Jamey Huffnagle <jamey.huffnagle@opentrons.com>
Co-authored-by: Ryan Howard <ryan.howard@opentrons.com>
Co-authored-by: Sanniti Pimpley <sanni-t@users.noreply.github.com>
Co-authored-by: Andy Sigler <andrewsigler1@gmail.com>
Co-authored-by: Seth Foster <seth@opentrons.com>
Co-authored-by: emilyburghardt <emily.burghardt@opentrons.com>
Co-authored-by: Max Marrone <max@opentrons.com>
Co-authored-by: Sarah Breen <sarah.breen@opentrons.com>
Co-authored-by: Jeremy Leon <jeremy.leon@opentrons.com>
Co-authored-by: Jethary Alcid <66035149+jerader@users.noreply.github.com>
Co-authored-by: TamarZanzouri <zanzouritamar@gmail.com>
Co-authored-by: Ed Cormany <edward.cormany@opentrons.com>
Co-authored-by: Caila Marashaj <98041399+caila-marashaj@users.noreply.github.com>

(cherry picked from commit 3692478)
# Overview

Change build process so only the PAPI v2 docs get built on every push.
[Update: also keeping hardware docs dynamic.]

Addresses RTC-711, although followup work may need to be done on AWS
directly to add some robots.txt rules.

## Test Plan and Hands on Testing

Spot check sandbox sites against current prod:
-
http://sandbox.docs.opentrons.com/infra-stop-building-old-docs/ot1/index.html
-
http://sandbox.docs.opentrons.com/infra-stop-building-old-docs/v1/index.html

Everything should look the same. Not perfect, there is some formatting
jankiness that I'm not attempting to fix.

## Changelog

- new git ignore rules to track built copies of the archived docs sites
- commit a copy of both sites
- change `make -C api docs` to only build v2 and hardware docs. other
sites can still be built, if needed, with other `make` commands.

## Review requests

- **Is this the right way to go about this?** It works, but does it work
how we want?
- Is there anything in the Sphinx output that should still be ignored? I
think not, but I'm not 100%
- Double check built sites.
- Also now is the time to speak up if you think any of these sites
should go away forever 🚮

## Risk assessment

low-ish. you should basically never notice.

(cherry picked from commit eb3aeb7)
…cent factory trip (#18021)

<!--
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
Everything is working smoothly on mp.96ch.200 branch, this is that
branch, rebased onto edge and smoothed over so it can be merged into
edge.
<!--
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.
-->

## 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.
-->

## 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.
-->

---------

Co-authored-by: Mehdi Zaidi <55298601+meh-di@users.noreply.github.com>
Co-authored-by: Carlos <fernandez.carlos40@gmail.com>
Co-authored-by: caila-marashaj <caila.marashaj@opentrons.com>
Co-authored-by: Andiiiiiiyy <andy.hu@opentrons.com>
Co-authored-by: wweiye <275241708@qq.com>
Co-authored-by: Jerome <1458798121@qq.com>

(cherry picked from commit ff9e95b)
* refactor(shared-data): change liquid classes order

(cherry picked from commit 0de3e83)
…delay` (#18000)

# Overview

In PD, you can specify a delay after each aspirate and dispense in a Mix
step. There is no way to specify a delay in the PAPI `mix()` call, which
means that we can't translate a PD Mix step into a PAPI `mix()` call.

This PR introduces the parameters `aspirate_delay` and `dispense_delay`
to the `InstrumentContext.mix()` function. The new parameters are gated
to API version 2.24 and above. AUTH-1366

## Test Plan and Hands on Testing

I added tests to demonstrate that this implementation emits the correct
calls to `delay()` when the caller requests a delay in the `mix()`.

This is what the output looks like in `simulate`:
```
Mixing 2 times with a volume of 20.0 ul
	Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec
	Delaying for 0 minutes and 2.5 seconds
	Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec
	...
```

## Review requests

`InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and
`InstrumentContext.dispense()` to implement the mix, which is nice
because the public `aspirate()` and `dispense()` functions handle things
like publishing messages for the simulator.

Ideally, we would also call the public `delay()` function for the delay.
But the `delay()` function is in `ProtocolContext`, and
`InstrumentContext` doesn't have access to that. We only have access to
the `ProtocolCore`, so we have to publish messages to the simulator
manually.

I ended up refactoring the code of `mix()` a bit because it was going to
get too repetitive and nested with the delays and `publish_context()`
messages added.

## Risk assessment

Should be low. The new parameters are version-gated. The main risk is
that we release this, and then decide that we don't want to change the
public API this way.

(cherry picked from commit 5012148)
…17310)

This PR refactors some liquid class property names and organization of properties, fully changing mmFromEdge to mmToEdge and re-organizing positionReference and offset properties.

(cherry picked from commit 0b13090)
# Overview

Lint the Python protocol files distributed as part of the v2 API docs.
Addresses RTC-137.

## Test Plan and Hands on Testing

1. Add `docs/v2/example_protocols` to the `black` command `make -C api
lint` and `make -C api format`. Was going to add it to `flake` as well,
but these files deliberately violate some `flake` rules, like never
explicitly referring back to the trash bin but definitely requiring one
to pass analysis.
2. Everything should fail because I formatted these files with tabs like
a heathen.
3. Run `format` and hopefully everything works.

## Changelog

- [x] Update Makefile
- [x] Update Python protocols to pass new lint

## Review requests

Cool cool?

## Risk assessment

v low, shouldn't introduce any CI failures unless the example protocols
are modified

(cherry picked from commit 8e72a89)
# Overview

Flow rates are, in fact, rates measured in **µL/s**.

## Test Plan and Hands on Testing

sandbox

## Changelog

Fix the unit and true up the table cells.

## Review requests

squirrel?

## Risk assessment

none

(cherry picked from commit 67cffae)
The Makefile targets `test-py` and `circular-dependencies-js` were
running a bunch of subcommands serially even though those subcommands
were logically independent. This splits them up into recipes that can be
run in parallel with `make -j`, following the existing pattern based on
`%` wildcards.

(cherry picked from commit bc8fcd6)
# Overview

Python API docs PR corresponding to changes in #18180.

## Test Plan and Hands on Testing

[Sandbox](http://sandbox.docs.opentrons.com/docs-combo-adapters-retired/v2/new_labware.html#loading-together)

## Changelog

- Moves all mention of combination adapters into a note.
- Indicates that they are deprecated as of API version 2.15 (which they
effectively have been, even if we didn't strongly discourage their use).
- List a couple features that will not work with them and say that
future features are also not guaranteed.

## Review requests

just accuracy

## Risk assessment

nil

(cherry picked from commit ec1ec02)
This fixes what I suspect are mistakes in our GitHub Actions workflows,
which, in edge cases, could cause problems like workflows not triggering
when they should.

For instance:

`*` looks like it's meant to match everything, but for that, we really
want `**`, otherwise we fail to match things that contain slashes.

`dir1/**/*.py` looks like it's meant to match any `.py` file under
`dir1/`, but I think it will only match things like `dir1/dir2/file.py`
and `dir1/dir2/dir3/file.py`, and fail to match things like
`dir1/file.py`

(cherry picked from commit 3c8b7fa)
# Overview

Any movement related commands in the robot context should have run logs
associated with them.

## Test Plan and Hands on Testing

1. Check that run logs get generated for robot commands.

## Changelog

- Add run logs to robot context commands

## Review requests

Check that the run log messages make sense.

## Risk assessment

Low. Adding run logs to un-used API.

---------

Co-authored-by: Seth Foster <seth@opentrons.com>
(cherry picked from commit 3782455)
This deletes the `opentrons.protocol_engine.state.update_types.SIMULATED` sentinel object, which was not used for anything.

(cherry picked from commit d0499e1)
Closes AUTH-1653

# Overview

Meniscus relative positions for aspirate & dispense will now be relative
to the position of meniscus of the liquid *after* the aspirate or
dispense action.

Updated the `absolute_point_from_position_reference_and_offset()`
function to use `well.estimate_liquid_height_after_pipetting()` instead
of `well.meniscus()`

## Risk assessment

Low. Only affects meniscus-relative pipetting locations

(cherry picked from commit 7429fae)
Fix a couple lint failures in edge in API (~merge conflict from #18189~
fixed in another pr ), hardware testing (introducing schema 3 again -
may be old), and engine (bad decoy)

(cherry picked from commit f5499f1)
Closes EXEC-1466

Currently, when requesting a command slice or a command error slice via the HTTP API, the exact behavior varies depending on the run status, the “current” status of the run, and which parameters are (or are not) supplied. The behavior varies in the following way:

* When invoking get_slice with identical cursor and pageLength parameters, there is inconsistency in the number of returned commands when the run is in a recovery state.
* When a run is historical, an unsupplied cursor but a supplied pageLength returns the most recent pageLength commands, however, when a run is current, only the most recently running/executed command is returned.
* The above always applies to run command errors.

This commit fixes those issues by standardizing behavior in a manner that is most useful given typical client access patterns: if a cursor is not supplied but a pageLength is supplied, we return the pageLength most recent commands and command errors (so all behavior reflects the current behavior if the command slice is derived from a historical run). After doing a complete client-side audit, the client actually seemingly expects the API to behave this way, and has fortunately worked by chance.

(cherry picked from commit 2c374ff)
ddcc4 and others added 3 commits May 22, 2025 14:18
…definitions (#18401)

Adds a version field to the liquid class schema and the three existing liquid class definitions (plus test fixtures).

(cherry picked from commit 44b5be2)
@ddcc4 ddcc4 force-pushed the candidate-chore_release-8.5.0 branch 2 times, most recently from 4c3d7b4 to 8f196f5 Compare May 23, 2025 00:01
…rties when splitting volume for transfer (#18330)

Modifies volume splitting to take into account air gap volume (and conditioning and disposal volume for multi-dispense distribute, more on that later) for initial volume splitting. This allows pipetting the max volume as an for a tip even if that volume has a non-zero air gap.

(cherry picked from commit 8fa944b)
@ddcc4 ddcc4 force-pushed the candidate-chore_release-8.5.0 branch 2 times, most recently from 364af2e to 7318452 Compare May 24, 2025 02:46
ddcc4 and others added 5 commits May 28, 2025 17:30
…18405)

# Overview

Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow
arguments to the PAPI `mix()` function. AUTH-1624

This follows the theme of adding absolute flow rate support to the
`InstrumentContext` functions that previously took a `rate` ratio.

PD allows you to independently specify the flow rate for the aspirate
and dispense in a Mix step, but the PAPI `mix()` function previously
only allowed a single `rate` argument, which is a ratio that is
multiplied by the pipette's default aspirate and dispense flow rates.
(PD step generation worked around this limitation by changing the
pipette's default aspirate/dispense rates for every Mix step. This
change will let us generate simpler code.)

## Test Plan and Hands on Testing

Added unit tests. You should be able to set one or both or none of
`aspirate_flow_rate` and `dispense_flow_rate`.

## Risk assessment

Medium. We're changing the public API.

(cherry picked from commit 6f9b158)
When I updated this in #18417 I missed that the checkout was to a
specific folder.

(cherry picked from commit 585db62)
Closes AUTH-839

# Overview

- Adds the ability to create a new liquid class based on user-specified
properties
- Adds the ability to customize an existing liquid class based on
user-specified properties

## Changelog

- adds liquid class modifiers to enable custom liquid classes
- adds the custom liquid class creator API
- small changes to 'version' arg typing

## Risk assessment

Low. Supplementary stuff. Doesn't modify existing infrastructure.

(cherry picked from commit 88da5fa)
@ddcc4 ddcc4 force-pushed the candidate-chore_release-8.5.0 branch 5 times, most recently from 8fe3c2c to 878f140 Compare May 29, 2025 16:27
@ddcc4 ddcc4 force-pushed the candidate-chore_release-8.5.0 branch 2 times, most recently from e7429fc to 2138450 Compare May 29, 2025 17:21
sanni-t and others added 2 commits May 29, 2025 16:23
…18456)

Closes AUTH-1654

# Overview

Adds a method `LiquidHandlingPropertyByVolume.set_fixed_override()`
which overrides the existing 'by volume' values with the provided value

You would use this in a protocol like this-
```
water = simulated_protocol_context.define_liquid_class("water")
water_props = water.get_for(pipette_50, tiprack)

# Set flow rate of 20uL/sec for all volumes
water_props.aspirate.flow_rate_by_volume.set_for_all_volumes(20)
```

## Risk assessment

Low-None. Very small addition to functionality that doesn't change any
existing behavior.

(cherry picked from commit 6e1e58d)
…y-17932', 'cherry-17937', 'cherry-17980', 'cherry-17994', 'cherry-18012', 'cherry-18016', 'cherry-18073', 'cherry-18077', 'cherry-18081', 'cherry-18142', 'cherry-18147', 'cherry-18151', 'cherry-18163', 'cherry-18171', 'cherry-18181', 'cherry-18191', 'cherry-18195', 'cherry-18203', 'cherry-18207', 'cherry-18215', 'cherry-18237', 'cherry-18249', 'cherry-18255', 'cherry-18259', 'cherry-18261', 'cherry-18266', 'cherry-18282', 'cherry-18319', 'cherry-18323', 'cherry-18326', 'cherry-18330', 'cherry-18337', 'cherry-18345', 'cherry-18383', 'cherry-18403', 'cherry-18405', 'cherry-18416', 'cherry-18449', 'cherry-18450' and 'cherry-18456' into chore_release-8.5.0
@ddcc4 ddcc4 force-pushed the candidate-chore_release-8.5.0 branch from 2138450 to c809beb Compare May 29, 2025 20:27
@sfoster1
Copy link
Copy Markdown
Member

Don't need this: #17040 but there's no downside to having it

Copy link
Copy Markdown
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.

Looks good to me!

Copy link
Copy Markdown
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Copy Markdown
Contributor

@ahiuchingau ahiuchingau left a comment

Choose a reason for hiding this comment

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

thank you

@y3rsh y3rsh merged commit c809beb into chore_release-8.5.0 May 30, 2025
87 of 88 checks passed
@ddcc4 ddcc4 deleted the candidate-chore_release-8.5.0 branch May 30, 2025 21: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.