Skip to content

Commit

Permalink
Merge branch 'chore_release-7.0.0' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Aug 22, 2023
2 parents 52dc4b3 + 880a5de commit aa7666e
Show file tree
Hide file tree
Showing 436 changed files with 8,657 additions and 2,287 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
echo 'type=develop' >> $GITHUB_OUTPUT
elif [ "${{ format('{0}', github.ref == 'refs/heads/edge') }}" = "true" ] ; then
echo "both develop builds for edge"
echo 'variants=["release", "internal-release"]' >> GITHUB_OUTPUT
echo 'variants=["release", "internal-release"]' >> $GITHUB_OUTPUT
echo 'type=develop' >> $GITHUB_OUTPUT
elif [ "${{ format('{0}', endsWith(github.ref, 'app-build-internal')) }}" = "true" ] ; then
echo "internal-release builds for app-build-internal suffixes"
Expand Down Expand Up @@ -313,7 +313,7 @@ jobs:
make -C app-shell-odd dist-ot3
deploy-release-app:
name: 'Deploy built release-variant app artifacts to S3'
name: 'Deploy built app artifacts to S3'
runs-on: 'ubuntu-22.04'
needs: ['js-unit-test', 'backend-unit-test', 'build-app', 'determine-build-type']
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'release') || contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')
Expand Down Expand Up @@ -348,15 +348,18 @@ jobs:
- name: 'deploy internal-release release builds to s3'
run: |
aws s3 --profile=deploy sync --acl=public-read to_upload_internal-release/ s3://${{ env._APP_DEPLOY_BUCKET_OT3 }}/${{ env._APP_DEPLOY_FOLDER_OT3 }}
- name: 'create GH release'
- name: 'upload windows artifacts to GH release'
uses: 'ncipollo/[email protected]'
if: needs.determine-build-type.outputs.type == 'release'
with:
allowUpdates: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
- name: 'upload windows artifact to GH release'
artifacts: ./artifacts/*/*.exe
artifactContentType: application/vnd.microsoft.portable-executable
- name: 'upload macos artifacts to GH release'
uses: 'ncipollo/[email protected]'
if: needs.determine-build-type.outputs.type == 'release'
with:
Expand All @@ -365,11 +368,21 @@ jobs:
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
artifacts: ./artifacts/**/*.exe ./artifacts/**/*.dmg ./artifacts/**/*.AppImage
artifactContentType: application/vnd.microsoft.portable-executable
- name: 'detect internal-release build data for notification'
artifacts: ./artifacts/*/*.dmg
artifactContentType: application/octet-stream
- name: 'upload linux artifacts to GH release'
uses: 'ncipollo/[email protected]'
if: needs.determine-build-type.outputs.type == 'release'
with:
allowUpdates: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
artifacts: ./artifacts/*/*.AppImage
artifactContentType: application/octet-stream
- name: 'detect build data for notification'
id: names
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')
shell: bash
run: |
for variant in release internal-release ; do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: 'Start Internal-Release OT-3 build'
name: 'Start Flex build'
on:
push:
branches:
- edge
- '*internal-release*'
- 'release*'
- 'chore_release*'
tags:
- ot3@*
- v*
pull_request:
types:
- opened
Expand All @@ -16,7 +19,7 @@ jobs:
handle-push:
runs-on: 'ubuntu-latest'
if: github.event_name == 'push'
name: "Start an OT-3 build for a branch/tag push"
name: "Start a Flex build for a branch/tag push"
steps:
- name: 'start build'
uses: octokit/[email protected]
Expand All @@ -39,7 +42,7 @@ jobs:
handle-pr:
runs-on: 'ubuntu-latest'
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'Opentrons/opentrons' && contains(github.event.pull_request.labels.*.name, 'ot3-build')
name: "Start an OT-3 build for a requested PR"
name: "Start a Flex build for a requested PR"
steps:
- name: 'start build'
uses: octokit/[email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: 'Start Internal-Release OT-2 build'
name: 'Start OT-2 build'
on:
push:
branches:
- edge
- '*internal-release*'
- 'release*'
- 'chore_release*'
tags:
- ot3@*
- v*
pull_request:
types:
- opened
Expand Down
2 changes: 1 addition & 1 deletion api-client/src/modules/api-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ModuleOffsetSource =
| 'legacy'
| 'unknown'

interface ModuleOffset {
export interface ModuleOffset {
offset: Coordinates
slot?: string
source?: ModuleOffsetSource
Expand Down
75 changes: 73 additions & 2 deletions api-client/src/protocols/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { RunTimeCommand } from '@opentrons/shared-data'
import {
parsePipetteEntity,
parseInitialPipetteNamesByMount,
Expand All @@ -10,10 +9,12 @@ import {
parseInitialLoadedModulesBySlot,
parseLiquidsInLoadOrder,
parseLabwareInfoByLiquidId,
parseInitialLoadedLabwareByAdapter,
} from '../utils'

import { simpleAnalysisFileFixture } from '../__fixtures__'

import type { RunTimeCommand } from '@opentrons/shared-data'

const mockRunTimeCommands: RunTimeCommand[] = simpleAnalysisFileFixture.commands as any
const mockLoadLiquidRunTimeCommands = [
{
Expand Down Expand Up @@ -189,6 +190,76 @@ describe('parseRequiredModulesEntity', () => {
expect(parseRequiredModulesEntity(mockRunTimeCommands)).toEqual(expected)
})
})
describe('parseInitialLoadedLabwareByAdapter', () => {
it('returns only labware loaded in adapters', () => {
const mockCommandsWithAdapter = ([
{
id: 'commands.LOAD_LABWARE-2',
createdAt: '2022-04-01T15:46:01.745870+00:00',
commandType: 'loadLabware',
key: 'commands.LOAD_LABWARE-2',
status: 'succeeded',
params: {
location: {
moduleId: 'module-0',
},
loadName: 'nest_96_wellplate_100ul_pcr_full_skirt',
namespace: 'opentrons',
version: 1,
labwareId: null,
displayName: 'NEST 96 Well Plate 100 µL PCR Full Skirt',
},
result: {
labwareId: 'labware-2',
definition: {},
offsetId: null,
},
error: null,
startedAt: '2022-04-01T15:46:01.745870+00:00',
completedAt: '2022-04-01T15:46:01.745870+00:00',
},
{
id: 'commands.LOAD_LABWARE-3',
createdAt: '2022-04-01T15:46:01.745870+00:00',
commandType: 'loadLabware',
key: 'commands.LOAD_LABWARE-3',
status: 'succeeded',
params: {
location: {
labwareId: 'labware-2',
},
loadName: 'nest_96_wellplate_100ul_pcr_full_skirt',
namespace: 'opentrons',
version: 1,
labwareId: null,
displayName: 'NEST 96 Well Plate 100 µL PCR Full Skirt',
},
result: {
labwareId: 'labware-3',
definition: {},
offsetId: null,
},
error: null,
startedAt: '2022-04-01T15:46:01.745870+00:00',
completedAt: '2022-04-01T15:46:01.745870+00:00',
},
] as any) as RunTimeCommand[]
const labware2 = 'labware-2'

const expected = {
[labware2]: mockCommandsWithAdapter.find(
c =>
c.commandType === 'loadLabware' &&
typeof c.params.location === 'object' &&
'labwareId' in c.params?.location &&
c.params?.location?.labwareId === 'labware-2'
),
}
expect(parseInitialLoadedLabwareByAdapter(mockCommandsWithAdapter)).toEqual(
expected
)
})
})
describe('parseInitialLoadedLabwareBySlot', () => {
it('returns only labware loaded in slots', () => {
const expected = {
Expand Down
43 changes: 38 additions & 5 deletions api-client/src/protocols/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,44 @@ export function parseInitialLoadedLabwareBySlot(
.reverse()
return reduce<LoadLabwareRunTimeCommand, LoadedLabwareBySlot>(
loadLabwareCommandsReversed,
(acc, command) =>
typeof command.params.location === 'object' &&
'slotName' in command.params.location
? { ...acc, [command.params.location.slotName]: command }
: acc,
(acc, command) => {
if (
typeof command.params.location === 'object' &&
'slotName' in command.params.location
) {
return { ...acc, [command.params.location.slotName]: command }
} else {
return acc
}
},
{}
)
}

interface LoadedLabwareByAdapter {
[labwareId: string]: LoadLabwareRunTimeCommand
}
export function parseInitialLoadedLabwareByAdapter(
commands: RunTimeCommand[]
): LoadedLabwareByAdapter {
const loadLabwareCommandsReversed = commands
.filter(
(command): command is LoadLabwareRunTimeCommand =>
command.commandType === 'loadLabware'
)
.reverse()
return reduce<LoadLabwareRunTimeCommand, LoadedLabwareBySlot>(
loadLabwareCommandsReversed,
(acc, command) => {
if (
typeof command.params.location === 'object' &&
'labwareId' in command.params.location
) {
return { ...acc, [command.params.location.labwareId]: command }
} else {
return acc
}
},
{}
)
}
Expand Down
1 change: 1 addition & 0 deletions api-client/src/runs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export interface CreateRunActionData {
export interface LabwareOffsetLocation {
slotName: string
moduleModel?: ModuleModel
definitionUri?: string
}
export interface LabwareOffsetCreateData {
definitionUri: string
Expand Down
6 changes: 3 additions & 3 deletions api/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Opentrons
Introduction
------------

This is the Opentrons library, the Python module that runs the Opentrons OT-2. It contains the code that interprets and executes protocols; code that controls the hardware both during and outside of protocols; and all the other small tasks and capabilities that the robot fulfills.
This is the Opentrons library, the Python module that runs Opentrons robots. It contains the code that interprets and executes protocols; code that controls the hardware both during and outside of protocols; and all the other small tasks and capabilities that the robot fulfills.

This document is about the structure and purpose of the source code. For information on how to use the Opentrons library or the robot in general, please refer to our `Full API Documentation`_ for detailed instructions.

The Opentrons library has two purposes:

1. **Control an Opentrons OT-2 robot.** The API server uses the Opentrons library when controlling a robot. We boot up a server for the robot’s HTTP endpoints, and a server for its WebSockets-based RPC system for control during protocols. We are configured by files in the robot’s filesystem in ``/data``.
1. **Control an Opentrons robot.** The API server uses the Opentrons library when controlling a robot. We boot up a server for the robot’s HTTP endpoints, and a server for its WebSockets-based RPC system for control during protocols. We are configured by files in the robot’s filesystem in ``/data``.

2. **Simulate protocols on users’ computers.** When simulating a protocol on a user’s computer, we use the entry point in `opentrons.simulate <https://github.com/Opentrons/opentrons/blob/edge/api/src/opentrons/simulate.py>`_. We set up simulators for the protocol, but do not run any kind of web servers. We are configured by files in the user’s home directory (for more information see configuration_).

Expand Down Expand Up @@ -85,4 +85,4 @@ The module has a lot of configuration, some of which is only relevant when runni
Dealing With Robot Versions
---------------------------

The OT2 does not use the ``hardware`` subdirectory or the ``opentrons_hardware`` package. This can be a problem to work around. Please keep imports of ``opentrons_hardware`` to limited places inside the hardware_control submodule and tests of that submodule, and ensure that anything outside these safe areas conditionally imports ``opentrons_hardware`` or imports it inside a non-file scope in a place used only outside an OT2. In tests, any test that uses the OT3 hardware controller will be skipped in the ``test-ot2`` Makefile recipe.
The OT-2 does not use the ``hardware`` subdirectory or the ``opentrons_hardware`` package. This can be a problem to work around. Please keep imports of ``opentrons_hardware`` to limited places inside the hardware_control submodule and tests of that submodule, and ensure that anything outside these safe areas conditionally imports ``opentrons_hardware`` or imports it inside a non-file scope in a place used only outside an OT2. In tests, any test that uses the OT3 hardware controller will be skipped in the ``test-ot2`` Makefile recipe.
8 changes: 4 additions & 4 deletions api/pypi-readme.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. _Full API Documentation: http://docs.opentrons.com

The Opentrons API is a simple framework designed to make writing automated biology lab protocols for the Opentrons OT-2 easy.
The Opentrons API is a simple framework designed to make it easy to write automated biology lab protocols for Opentrons robots.

This package can be used to simulate protocols on your computer without connecting to a robot. Please refer to our `Full API Documentation`_ for detailed instructions on how to write and simulate your first protocol.

This package is now for use with the Opentrons OT-2 only. For the software needed to run an Opentrons OT-1, please see versions_.
This package is now for use with the Opentrons Flex and Opentrons OT-2 only. For the software needed to run an Opentrons OT-One, please see versions_.

.. _simulating:

Expand Down Expand Up @@ -40,9 +40,9 @@ The module has a lot of configuration, some of which is only relevant when runni
Note On Versions
----------------

This API is for locally simulating protocols for the OT 2 without connecting to a robot. It no longer controls an OT 1.
This API is for locally simulating protocols for the Flex or OT-2 without connecting to a robot. It no longer controls an OT-One.

`Version 2.5.2 <https://pypi.org/project/opentrons/2.5.2/>`_ was the final release of this API for the OT 1. If you want to download this API to use the OT 1, you should download it with
`Version 2.5.2 <https://pypi.org/project/opentrons/2.5.2/>`_ was the final release of this API for the OT-One. If you want to download this API to use the OT-One, you should download it with

.. code-block:: shell
Expand Down
32 changes: 32 additions & 0 deletions api/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ log][]. For a list of currently known issues, please see the [Opentrons issue tr
[opentrons issue tracker]: https://github.com/Opentrons/opentrons/issues?q=is%3Aopen+is%3Aissue+label%3Abug

---

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

### New Features

- Flex touchscreen
- Robot dashboard: Quickly access recently run protocols.
- Manage protocols: Organize, view details, set up, and run protocols directly from the 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
- 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.
- Use the Flex Gripper to move labware onto or off of the Magnetic Block.
- 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.

### Improved Features

- The API relaxes placement restrictions for the Heater-Shaker Module on Flex.
- Pipettes drop tips in multiple locations above the trash bin to prevent tips from stacking up.

### Known Issues

- Tip tracking starting at a well other than A1 will not pick up tips from the intended locations.

---

## OT-2 Software Changes in 6.3.1

Welcome to the v6.3.1 release of the OT-2 software! This hotfix release addresses a few problems.
Expand Down
Loading

0 comments on commit aa7666e

Please sign in to comment.