Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Opentrons/opentrons
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: [email protected]
Choose a base ref
...
head repository: Opentrons/opentrons
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: [email protected]
Choose a head ref
Loading
Showing 672 changed files with 26,243 additions and 7,399 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -152,3 +152,6 @@ react-api-client/lib

#tarball of source files to send to ODD when pushing
opentrons-robot-app.tar.gz

# local VERSION.json file when pushing to Flex
*new_version_file.json
1 change: 1 addition & 0 deletions api-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -12,5 +12,6 @@ export * from './robot'
export * from './runs'
export * from './server'
export * from './sessions'
export * from './subsystems'
export * from './system'
export * from './types'
23 changes: 21 additions & 2 deletions api-client/src/instruments/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export type InstrumentData = PipetteData | GripperData

export type InstrumentData = PipetteData | GripperData | BadPipette | BadGripper
export interface GripperData {
data: {
jawState: string
@@ -13,6 +12,8 @@ export interface GripperData {
instrumentType: 'gripper'
mount: string
serialNumber: string
subsystem: 'gripper'
ok: true
}
export interface PipetteData {
data: {
@@ -30,6 +31,8 @@ export interface PipetteData {
instrumentType: 'pipette'
mount: string
serialNumber: string
subsystem: 'pipette_left' | 'pipette_right'
ok: true
}

export type InstrumentsData = InstrumentData[]
@@ -47,3 +50,19 @@ export interface Instruments {
export interface GetInstrumentsRequestParams {
refresh?: boolean
}

export interface BadPipette {
subsystem: 'pipette_left' | 'pipette_right'
status: string
update: string
ok: false
instrumentType: 'pipette'
}

export interface BadGripper {
subsystem: 'gripper'
status: string
update: string
ok: false
instrumentType: 'gripper'
}
4 changes: 4 additions & 0 deletions api-client/src/pipettes/__fixtures__/index.ts
Original file line number Diff line number Diff line change
@@ -260,6 +260,8 @@ export const pipetteDataLeftFixture = {
instrumentType: 'pipette',
mount: 'left',
serialNumber: 'abc',
subsystem: 'pipette_left',
ok: true,
}

export const pipetteResponseRightFixture = {
@@ -269,4 +271,6 @@ export const pipetteResponseRightFixture = {
instrumentType: 'pipette',
mount: 'right',
serialNumber: 'cba',
subsystem: 'pipette_right',
ok: true,
}
18 changes: 4 additions & 14 deletions api-client/src/runs/commands/types.ts
Original file line number Diff line number Diff line change
@@ -5,20 +5,10 @@ export interface GetCommandsParams {
pageLength: number // the number of items to include
}

export interface RunCommandSummary {
id: string
key: string
commandType: RunTimeCommand['commandType']
status: 'queued' | 'running' | 'succeeded' | 'failed'
createdAt: string
intent?: 'protocol' | 'setup'
params?: any
// TODO(mc, 2022-02-02): `result` does not exist on RunCommandSummary
result?: RunTimeCommand['result']
startedAt?: string
completedAt?: string
error?: RunCommandError
}
// NOTE: this incantation allows us to omit a key from each item in a union distributively
// this means we can, for example, maintain the associated commandType and params after the Omit is applied
type DistributiveOmit<T, K extends keyof T> = T extends any ? Omit<T, K> : never
export type RunCommandSummary = DistributiveOmit<RunTimeCommand, 'result'>

export interface CommandDetail {
data: RunTimeCommand
4 changes: 2 additions & 2 deletions api-client/src/runs/types.ts
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@ import type {
LoadedModule,
LoadedPipette,
ModuleModel,
RunTimeCommand,
} from '@opentrons/shared-data'
import type { ResourceLink } from '../types'
import type { RunCommandSummary } from './commands/types'
export * from './commands/types'

export const RUN_STATUS_IDLE = 'idle' as const
@@ -107,7 +107,7 @@ export interface LabwareOffsetCreateData {
}

export interface CommandData {
data: RunCommandSummary
data: RunTimeCommand
}

export interface RunError {
17 changes: 17 additions & 0 deletions api-client/src/subsystems/getSubsystemUpdate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { GET, request } from '../request'

import type { ResponsePromise } from '../request'
import type { HostConfig } from '../types'
import type { SubsystemUpdateProgressData } from './types'

export function getSubsystemUpdate(
config: HostConfig,
updateId: string
): ResponsePromise<SubsystemUpdateProgressData> {
return request<SubsystemUpdateProgressData>(
GET,
`/subsystems/updates/all/${updateId}`,
null,
config
)
}
3 changes: 3 additions & 0 deletions api-client/src/subsystems/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { updateSubsystem } from './updateSubsystem'
export { getSubsystemUpdate } from './getSubsystemUpdate'
export * from './types'
19 changes: 19 additions & 0 deletions api-client/src/subsystems/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export type Subsystem =
| 'gantry_x'
| 'gantry_y'
| 'head'
| 'pipette_left'
| 'pipette_right'
| 'gripper'
| 'rear_panel'

export interface SubsystemUpdateProgressData {
data: {
id: string
createdAt: string
subsystem: Subsystem
updateStatus: 'queued' | 'updating' | 'done'
updateProgress: number
updateError: string
}
}
17 changes: 17 additions & 0 deletions api-client/src/subsystems/updateSubsystem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { POST, request } from '../request'

import type { ResponsePromise } from '../request'
import type { HostConfig } from '../types'
import type { SubsystemUpdateProgressData } from './types'

export function updateSubsystem(
config: HostConfig,
subsystem: string
): ResponsePromise<SubsystemUpdateProgressData> {
return request<SubsystemUpdateProgressData>(
POST,
`/subsystems/updates/${subsystem}`,
null,
config
)
}
5 changes: 4 additions & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
@@ -29,6 +29,9 @@ wheel_file = dist/$(call python_get_wheelname,api,$(project_rs_default),opentron
# Find the version of the sdist file from git using a helper script.
sdist_file = dist/$(call python_get_sdistname,api,$(project_ot3_default),opentrons)

# Find the branch, sha, version that will be used to update the VERSION.json file
version_file = $(call python_get_git_version,api,$(project_ot3_default),opentrons)

# These variables are for simulating python protocols
sim_log_level ?= info
simfile ?=
@@ -177,7 +180,7 @@ push: push-no-restart
.PHONY: push-no-restart-ot3
push-no-restart-ot3: sdist
echo $(sdist_file)
$(call push-python-sdist,$(host),,$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,opentrons,src)
$(call push-python-sdist,$(host),,$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,opentrons,src,,$(version_file))
ssh $(ssh_opts) root@$(host) "mount -o remount,rw / && mkdir -p /usr/local/bin"
scp $(ssh_opts) ./src/opentrons/hardware_control/scripts/ot3repl root@$(host):/usr/local/bin/ot3repl
scp $(ssh_opts) ./src/opentrons/hardware_control/scripts/ot3gripper root@$(host):/usr/local/bin/ot3gripper
1 change: 1 addition & 0 deletions api/Pipfile
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ wheel = "==0.30.0"
typeguard = "==2.12.1"
sphinx-substitution-extensions = "==2020.9.30.0"
sphinxext-opengraph = "==0.8.1"
sphinx-tabs = ">=3.4.1,<4"
mock = "~=4.0.2"
flake8 = "~=3.9.0"
flake8-annotations = "~=2.6.2"
Loading