Skip to content

Commit

Permalink
Merge branch 'edge' into default_deck_configs
Browse files Browse the repository at this point in the history
Resolve conflicts in robot-server/robot_server/deck_configuration/store.py.
The edge branch's DeckConfigurationStore.get_deck_configuration() method needs to be async, and it also needs to use the same defaults that .get() uses.
  • Loading branch information
SyntaxColoring committed Nov 17, 2023
2 parents c15bad2 + f73e925 commit e477758
Show file tree
Hide file tree
Showing 469 changed files with 18,805 additions and 33,592 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ jobs:
echo "Configuring project, bucket, and folder for ot3"
echo "project=ot3" >> $GITHUB_OUTPUT
echo "bucket=${{env._APP_DEPLOY_BUCKET_OT3}}" >> $GITHUB_OUTPUT
echo "folder=${{env._APP_DEPLOY_BUCKET_OT3}}" >> $GITHUB_OUTPUT
echo "folder=${{env._APP_DEPLOY_FOLDER_OT3}}" >> $GITHUB_OUTPUT
fi
- uses: 'actions/checkout@v3'
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ll-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
build-ll:
name: 'build labware library artifact'
needs: ['js-unit-test']
timeout-minutes: 30
runs-on: 'ubuntu-20.04'
if: github.event_name != 'pull_request'
steps:
Expand Down
102 changes: 45 additions & 57 deletions api-client/src/deck_configuration/__stubs__/index.ts
Original file line number Diff line number Diff line change
@@ -1,73 +1,61 @@
import { v4 as uuidv4 } from 'uuid'

import {
STAGING_AREA_LOAD_NAME,
STANDARD_SLOT_LOAD_NAME,
TRASH_BIN_LOAD_NAME,
WASTE_CHUTE_LOAD_NAME,
SINGLE_LEFT_SLOT_FIXTURE,
SINGLE_CENTER_SLOT_FIXTURE,
SINGLE_RIGHT_SLOT_FIXTURE,
STAGING_AREA_RIGHT_SLOT_FIXTURE,
TRASH_BIN_ADAPTER_FIXTURE,
WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
} from '@opentrons/shared-data'

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

export const DECK_CONFIG_STUB: { [fixtureLocation: string]: Fixture } = {
cutoutA1: {
fixtureLocation: 'cutoutA1',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
export const DECK_CONFIG_STUB: DeckConfiguration = [
{
cutoutId: 'cutoutA1',
cutoutFixtureId: SINGLE_LEFT_SLOT_FIXTURE,
},
cutoutB1: {
fixtureLocation: 'cutoutB1',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutB1',
cutoutFixtureId: SINGLE_LEFT_SLOT_FIXTURE,
},
cutoutC1: {
fixtureLocation: 'cutoutC1',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutC1',
cutoutFixtureId: SINGLE_LEFT_SLOT_FIXTURE,
},
cutoutD1: {
fixtureLocation: 'cutoutD1',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutD1',
cutoutFixtureId: SINGLE_LEFT_SLOT_FIXTURE,
},
cutoutA2: {
fixtureLocation: 'cutoutA2',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutA2',
cutoutFixtureId: SINGLE_CENTER_SLOT_FIXTURE,
},
cutoutB2: {
fixtureLocation: 'cutoutB2',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutB2',
cutoutFixtureId: SINGLE_CENTER_SLOT_FIXTURE,
},
cutoutC2: {
fixtureLocation: 'cutoutC2',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutC2',
cutoutFixtureId: SINGLE_CENTER_SLOT_FIXTURE,
},
cutoutD2: {
fixtureLocation: 'cutoutD2',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutD2',
cutoutFixtureId: SINGLE_CENTER_SLOT_FIXTURE,
},
cutoutA3: {
fixtureLocation: 'cutoutA3',
loadName: TRASH_BIN_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutA3',
cutoutFixtureId: TRASH_BIN_ADAPTER_FIXTURE,
},
cutoutB3: {
fixtureLocation: 'cutoutB3',
loadName: STANDARD_SLOT_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutB3',
cutoutFixtureId: SINGLE_RIGHT_SLOT_FIXTURE,
},
cutoutC3: {
fixtureLocation: 'cutoutC3',
loadName: STAGING_AREA_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutC3',
cutoutFixtureId: STAGING_AREA_RIGHT_SLOT_FIXTURE,
},
cutoutD3: {
fixtureLocation: 'cutoutD3',
loadName: WASTE_CHUTE_LOAD_NAME,
fixtureId: uuidv4(),
{
cutoutId: 'cutoutD3',
cutoutFixtureId: WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
},
}
]
29 changes: 0 additions & 29 deletions api-client/src/deck_configuration/createDeckConfiguration.ts

This file was deleted.

30 changes: 0 additions & 30 deletions api-client/src/deck_configuration/deleteDeckConfiguration.ts

This file was deleted.

2 changes: 1 addition & 1 deletion api-client/src/deck_configuration/getDeckConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ import type { HostConfig } from '../types'
export function getDeckConfiguration(
config: HostConfig
): Promise<{ data: DeckConfiguration }> {
return Promise.resolve({ data: Object.values(DECK_CONFIG_STUB) })
return Promise.resolve({ data: DECK_CONFIG_STUB })
}
2 changes: 0 additions & 2 deletions api-client/src/deck_configuration/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export { createDeckConfiguration } from './createDeckConfiguration'
export { deleteDeckConfiguration } from './deleteDeckConfiguration'
export { getDeckConfiguration } from './getDeckConfiguration'
export { updateDeckConfiguration } from './updateDeckConfiguration'
31 changes: 12 additions & 19 deletions api-client/src/deck_configuration/updateDeckConfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
import { v4 as uuidv4 } from 'uuid'

// import { PATCH, request } from '../request'
// import { PUT, request } from '../request'
import { DECK_CONFIG_STUB } from './__stubs__'

import type { Fixture } from '@opentrons/shared-data'
import type { DeckConfiguration } from '@opentrons/shared-data'
// import type { ResponsePromise } from '../request'
import type { HostConfig } from '../types'

// TODO(bh, 2023-09-26): uncomment and remove deck config stub when backend api is ready
// export function updateDeckConfiguration(
// config: HostConfig,
// data: Omit<Fixture, 'fixtureId'>
// ): ResponsePromise<Fixture> {
// const { fixtureLocation, ...rest } = data
// return request<Fixture, { data: Omit<Fixture, 'fixtureLocation'> }>(
// PATCH,
// `/deck_configuration/${fixtureLocation}`,
// { data: rest },
// config
// )
// data: DeckConfiguration
// ): ResponsePromise<DeckConfiguration> {
// return request<DeckConfiguration, DeckConfiguration>(PUT, '/deck_configuration', data, config)
// }

export function updateDeckConfiguration(
config: HostConfig,
data: Omit<Fixture, 'fixtureId'>
): Promise<{ data: Fixture }> {
const { fixtureLocation } = data
const fixtureId = uuidv4()
DECK_CONFIG_STUB[fixtureLocation] = { ...data, fixtureId }
return Promise.resolve({ data: DECK_CONFIG_STUB[fixtureLocation] })
data: DeckConfiguration
): Promise<{ data: DeckConfiguration }> {
data.forEach((fixture, i) => {
DECK_CONFIG_STUB[i] = fixture
})

return Promise.resolve({ data: DECK_CONFIG_STUB })
}
12 changes: 6 additions & 6 deletions api-client/src/protocols/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ export function parseAllAddressableAreas(
...acc,
command.params.location.addressableAreaName as AddressableAreaName,

Check warning on line 293 in api-client/src/protocols/utils.ts

View workflow job for this annotation

GitHub Actions / js checks

This assertion is unnecessary since it does not change the type of the expression
]
}
// TODO(BC, 11/6/23): once moveToAddressableArea command exists add it back here
// else if (command.commandType === 'moveToAddressableArea') {
// ...
// }
else {
} else if (
command.commandType === 'moveToAddressableArea' &&
!acc.includes(command.params.addressableAreaName as AddressableAreaName)
) {
return [...acc, command.params.addressableAreaName as AddressableAreaName]
} else {
return acc
}
}, [])
Expand Down
7 changes: 2 additions & 5 deletions api/docs/v2/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@
# setup the code block substitution extension to auto-update apiLevel
extensions += ['sphinx-prompt', 'sphinx_substitution_extensions']

# get the max API level
from opentrons.protocol_api import MAX_SUPPORTED_VERSION # noqa
max_apiLevel = str(MAX_SUPPORTED_VERSION)

# use rst_prolog to hold the subsitution
# update the apiLevel value whenever a new minor version is released
rst_prolog = f"""
.. |apiLevel| replace:: {max_apiLevel}
.. |apiLevel| replace:: 2.15
.. |release| replace:: {release}
"""

Expand Down
2 changes: 1 addition & 1 deletion api/docs/v2/new_protocol_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Protocols and Instruments

.. autoclass:: opentrons.protocol_api.InstrumentContext
:members:
:exclude-members: delay
:exclude-members: delay, configure_nozzle_layout, prepare_to_aspirate

.. autoclass:: opentrons.protocol_api.Liquid

Expand Down
67 changes: 21 additions & 46 deletions api/release-notes-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,27 @@ For more details about this release, please see the full [technical change log][

---

# Internal Release 0.14.0
# Internal Release 1.1.0

## New Stuff In This Release

- Return tip heights and some other pipette behaviors are now properly executed based on the kind of tip being used
- Release Flex robot software builds are now cryptographically signed. If you run a release build, you can only install other properly signed release builds. Note that if the robot was previously on a non-release build this won't latch; remove the update server config file at ``/var/lib/otupdate/config.json`` to go back to signed builds only.
- Error handling has been overhauled; all errors now display with an error code for easier reporting. Many of those error codes are the 4000 catchall still but this will improve over time.
- If there's an error during the post-run cleanup steps, where the robot homes and drops tips, the run should no longer get stuck in a permanent "finishing" state. It should get marked as failed.
- Further updates to Flex motion control parameters from hardware testing for both gantry and plunger speeds and acceleration
- Pipette overpressure detection is now integrated.
- All instrument flows should now show errors if they occur instead of skipping a step
- Fixes to several incorrect status displays in ODD (i.e. protocols skipping the full-color outcome splash)
- Robot can now handle json protocol v7
- Support for PVT (v1.1) grippers
- Update progress should get displayed after restart for firmware updates
- Removed `use_pick_up_location_lpc_offset` and `use_drop_location_lpc_offset` from `protocol_context.move_labware` arguments. So they should be removed from any protocols that used them. This change also requires resetting the protocol run database on the robot.
- Added 'contextual' gripper offsets to deck, labware and module definitions. So, any labware movement offsets that were previously being specified in the protocol should now be removed or adjusted or they will get added twice.


## Big Things That Don't Work Yet So Don't Report Bugs About Them

### Robot Control
- Pipette pressure sensing for liquid-level sensing purposes
- Labware pick up failure with gripper
- E-stop integrated handling especially with modules

## Big Things That Do Work Please Do Report Bugs About Them
### Robot Control
- Protocol behavior
- Labware movement between slots/modules, both manual and with gripper, from python protocols
- Labware drop/gripper crash errors, but they're very insensitive
- Pipette and gripper automated offset calibration
- Network connectivity and discoverability
- Firmware update for all devices
- Cancelling a protocol run. We're even more sure we fixed this so definitely tell us if it's not.
- USB connectivity
- Stall detection firing basically ever unless you clearly ran into something

### ODD
- Protocol execution including end-of-protocol screen
- Protocol run monitoring
- Attach and calibrate
- Network connection management, including viewing IP addresses and connecting to wifi networks
- Automatic updates of robot software when new internal releases are created
- Chrome remote devtools - if you enable them and then use Chrome to go to robotip:9223 you'll get devtools
- After a while, the ODD should go into idle; if you touch it, it will come back online



This is a tracking internal release coming off of the edge branch to contain rapid dev on new features for 7.1.0. Features will change drastically between successive alphas even over the course of the day. For this reason, these release notes will not be in their usual depth.

The biggest new features, however, are
- There is a new protocol API version, 2.16, which changes how the default trash is loaded and gates features like partial tip pickup and waste chute usage:
- Protocols do not load a trash by default. To load the normal trash, load ``opentrons_1_trash_3200ml_fixed`` in slot ``A3``.
- But also you can load it in any other edge slot if you want (columns 1 and 3).
- Protocols can load trash chutes; the details of exactly how this works are still in flux.
- Protocols can configure their 96 and 8 channel pipettes to pick up only a subset of tips using ``configure_nozzle_layout``.
- Support for json protocol V8 and command V8, which adds JSON protocol support for the above features.
- ODD support for rendering the above features in protocols
- ODD support for configuring the loaded deck fixtures like trash chutes
- Labware position check now uses the calibration probe (the same one used for pipette and module calibration) instead of a tip; this should increase the accuracy of LPC.
- Support for P1000S v3.6
- Updated liquid handling functions for all 96 channel pipettes

## Known Issues

- The ``MoveToAddressableArea`` command will noop. This means that all commands that use the movable trash bin will not "move to the trash bin". The command will analyze successfully.
- The deck configuration on the robot is not persistent, this means that between boots of a robot, you must PUT a deck configuration on the robot via HTTP.

8 changes: 7 additions & 1 deletion api/src/opentrons/cli/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def _analyze(
runner = await create_simulating_runner(
robot_type=protocol_source.robot_type, protocol_config=protocol_source.config
)
analysis = await runner.run(protocol_source)
analysis = await runner.run(deck_configuration=[], protocol_source=protocol_source)

if json_output:
results = AnalyzeResults.construct(
Expand Down Expand Up @@ -145,10 +145,16 @@ class AnalyzeResults(BaseModel):
See robot-server's analysis models for field documentation.
"""

# We want to unify this local analysis model with the one that robot-server returns.
# Until that happens, we need to keep these fields in sync manually.

# Fields that are currently unique to this local analysis module, missing from robot-server:
createdAt: datetime
files: List[ProtocolFile]
config: Union[JsonConfig, PythonConfig]
metadata: Dict[str, Any]

# Fields that should match robot-server:
robotType: RobotType
commands: List[Command]
labware: List[LoadedLabware]
Expand Down
Empty file.
Loading

0 comments on commit e477758

Please sign in to comment.