Skip to content

Commit

Permalink
chore: Merge branch 'release' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
b-cooper committed Oct 19, 2023
2 parents 6708e7a + 692888c commit 4b06bc3
Show file tree
Hide file tree
Showing 226 changed files with 5,239 additions and 2,563 deletions.
1 change: 1 addition & 0 deletions api-client/src/pipettes/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { getPipettes } from './getPipettes'
export { getPipetteSettings } from './getPipetteSettings'
export { updatePipetteSettings } from './updatePipetteSettings'

export * from './types'
export * from './__fixtures__'
18 changes: 15 additions & 3 deletions api-client/src/pipettes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export interface FetchPipettesResponseBody {
right: FetchPipettesResponsePipette
}

interface PipetteSettingsField {
value: number | null | undefined
export interface PipetteSettingsField {
value: number | null | boolean | undefined
default: number
min?: number
max?: number
Expand All @@ -66,7 +66,7 @@ interface PipetteQuirksField {
interface QuirksField {
quirks?: PipetteQuirksField
}
type PipetteSettingsFieldsMap = QuirksField & {
export type PipetteSettingsFieldsMap = QuirksField & {
[fieldId: string]: PipetteSettingsField
}
export interface IndividualPipetteSettings {
Expand All @@ -77,3 +77,15 @@ export interface IndividualPipetteSettings {
type PipetteSettingsById = Partial<{ [id: string]: IndividualPipetteSettings }>

export type PipetteSettings = PipetteSettingsById

export interface PipetteSettingsUpdateFieldsMap {
[fieldId: string]: PipetteSettingsUpdateField
}

export type PipetteSettingsUpdateField = {
value: PipetteSettingsField['value']
} | null

export interface UpdatePipetteSettingsData {
fields: { [fieldId: string]: PipetteSettingsUpdateField }
}
21 changes: 21 additions & 0 deletions api-client/src/pipettes/updatePipetteSettings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { PATCH, request } from '../request'

import type { ResponsePromise } from '../request'
import type { HostConfig } from '../types'
import type {
IndividualPipetteSettings,
UpdatePipetteSettingsData,
} from './types'

export function updatePipetteSettings(
config: HostConfig,
pipetteId: string,
data: UpdatePipetteSettingsData
): ResponsePromise<IndividualPipetteSettings> {
return request<IndividualPipetteSettings, UpdatePipetteSettingsData>(
PATCH,
`/settings/pipettes/${pipetteId}`,
data,
config
)
}
3 changes: 1 addition & 2 deletions api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ pytest-asyncio = "~=0.18"
pytest-cov = "==2.10.1"
pytest-lazy-fixture = "==0.6.3"
pytest-xdist = "~=2.2.1"
pygments = "==2.9.0"
sphinx = "==5.0.1"
twine = "==2.0.0"
twine = "==4.0.2"
wheel = "==0.30.0"
typeguard = "==2.12.1"
sphinx-substitution-extensions = "==2020.9.30.0"
Expand Down
547 changes: 332 additions & 215 deletions api/Pipfile.lock

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions api/docs/v2/new_advanced_running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ Jupyter Notebook

The Flex and OT-2 run `Jupyter Notebook <https://jupyter.org>`_ servers on port 48888, which you can connect to with your web browser. This is a convenient environment for writing and debugging protocols, since you can define different parts of your protocol in different notebook cells and run a single cell at a time.

.. note::
Currently, the Jupyter Notebook server does not work with Python Protocol API versions 2.14 and 2.15. It does work with API versions 2.13 and earlier. Use the Opentrons App to run protocols that require functionality added in newer versions.

Access your robot's Jupyter Notebook by either:
Access your robot’s Jupyter Notebook by either:

- Going to the **Advanced** tab of Robot Settings and clicking **Launch Jupyter Notebook**.
- Going directly to ``http://<robot-ip>:48888`` in your web browser (if you know your robot's IP address).
Expand All @@ -32,9 +29,10 @@ Jupyter Notebook is structured around `cells`: discrete chunks of code that can
Rather than writing a ``run`` function and embedding commands within it, start your notebook by importing ``opentrons.execute`` and calling :py:meth:`opentrons.execute.get_protocol_api`. This function also replaces the ``metadata`` block of a standalone protocol by taking the minimum :ref:`API version <v2-versioning>` as its argument. Then you can call :py:class:`~opentrons.protocol_api.ProtocolContext` methods in subsequent lines or cells:

.. code-block:: python
:substitutions:
import opentrons.execute
protocol = opentrons.execute.get_protocol_api("2.13")
protocol = opentrons.execute.get_protocol_api('|apiLevel|')
protocol.home()
The first command you execute should always be :py:meth:`~opentrons.protocol_api.ProtocolContext.home`. If you try to execute other commands first, you will get a ``MustHomeError``. (When running protocols through the Opentrons App, the robot homes automatically.)
Expand All @@ -57,8 +55,9 @@ You can also use Jupyter to run a protocol that you have already written. To do
Since a typical protocol only `defines` the ``run`` function but doesn't `call` it, this won't immediately cause the robot to move. To begin the run, instantiate a :py:class:`.ProtocolContext` and pass it to the ``run`` function you just defined:

.. code-block:: python
:substitutions:
protocol = opentrons.execute.get_protocol_api("2.13")
protocol = opentrons.execute.get_protocol_api('|apiLevel|')
run(protocol) # your protocol will now run
.. _using_lpc:
Expand Down
5 changes: 0 additions & 5 deletions api/docs/v2/versioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ When choosing an API level, consider what features you need and how widely you p

On the one hand, using the highest available version will give your protocol access to all the latest :ref:`features and fixes <version-notes>`. On the other hand, using the lowest possible version lets the protocol work on a wider range of robot software versions. For example, a protocol that uses the Heater-Shaker and specifies version 2.13 of the API should work equally well on a robot running version 6.1.0 or 6.2.0 of the robot software. Specifying version 2.14 would limit the protocol to robots running 6.2.0 or higher.

.. note::

Python protocols with an ``apiLevel`` of 2.14 or higher can't currently be simulated with the ``opentrons_simulate`` command-line tool, the :py:func:`opentrons.simulate.simulate` function, or the :py:func:`opentrons.simulate.get_protocol_api` function. If your protocol doesn't rely on new functionality added after version 2.13, use a lower ``apiLevel``. For protocols that require 2.14 or higher, analyze your protocol with the Opentrons App instead.


Maximum Supported Versions
==========================

Expand Down
16 changes: 15 additions & 1 deletion api/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ log][]. For a list of currently known issues, please see the [Opentrons issue tr

---

## Opentrons Robot Software Changes in 7.0.1

Welcome to the v7.0.1 release of the Opentrons robot software! This release builds on the major release that added support for Opentrons Flex.

This update may take longer than usual if you are updating from v6.x. Allow **approximately 15 minutes** for your robot to restart. This delay will only happen once.

### Known Issues

JSON protocols created or modified with Protocol Designer v6.0.0 or higher can't be simulated with the `opentrons_simulate` command-line tool.

---

## Opentrons Robot Software Changes in 7.0.0

Welcome to the v7.0.0 release of the Opentrons robot software! This release adds support for the Opentrons Flex robot, instruments, modules, and labware.
Expand All @@ -21,7 +33,7 @@ Flex touchscreen
- Manage instruments: View information about connected pipettes and the gripper. Attach, detach, or recalibrate instruments.
- Robot settings: Customize the behavior of your Flex, including the LED and touchscreen displays.

Flex features
Flex features

- Analyze and run protocols that use the Flex robot, Flex pipettes, and Flex tip racks.
- Move labware around the deck automatically with the Flex Gripper.
Expand All @@ -32,6 +44,7 @@ Python API features
- Manually move labware around, off of, or onto the deck without ending your protocol.
- Load adapters separately from labware (to allow moving labware onto or off of the adapter).
- Use coordinate or numeric deck slot names interchangeably.
- Set 50 µL pipettes to a low-volume mode for handling very small quantities of liquid.

### Improved Features

Expand All @@ -40,6 +53,7 @@ Python API features

### Bug Fixes

- Fixed a problem with empty files being stored in the robot's database if the robot is power cycled at the wrong time.
- The API no longer raises an error when dropping tips into labware other than the fixed trash.
- All API versions now properly track tips, including starting at a well other than A1.

Expand Down
6 changes: 2 additions & 4 deletions api/src/opentrons/config/feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ def use_old_aspiration_functions() -> bool:
)


def enable_door_safety_switch() -> bool:
return advs.get_setting_with_env_overload(
"enableDoorSafetySwitch", RobotTypeEnum.FLEX
)
def enable_door_safety_switch(robot_type: RobotTypeEnum) -> bool:
return advs.get_setting_with_env_overload("enableDoorSafetySwitch", robot_type)


def disable_fast_protocol_upload() -> bool:
Expand Down
Loading

0 comments on commit 4b06bc3

Please sign in to comment.