-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'edge' into default_deck_configs
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
Showing
469 changed files
with
18,805 additions
and
33,592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
29
api-client/src/deck_configuration/createDeckConfiguration.ts
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
api-client/src/deck_configuration/deleteDeckConfiguration.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
api-client/src/deck_configuration/updateDeckConfiguration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.