Skip to content

Commit c2dee75

Browse files
refactor(shared-data): Rename labwareSchemaShims.ts -> positionMath.ts (#18888)
This file has grown to hold more than just simple compatibility shims for converting between labware schemas 2 and 3. It now also holds actual business-domain math for computing labware and module positions. Rename it accordingly.
1 parent adda529 commit c2dee75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

shared-data/js/helpers/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import standardOt2DeckDef from '../../deck/definitions/5/ot2_standard.json'
44
import standardFlexDeckDef from '../../deck/definitions/5/ot3_standard.json'
55
import { OPENTRONS_LABWARE_NAMESPACE } from '../constants'
66
import { getAllLiquidClassDefs } from '../liquidClasses'
7-
import { getSchema2Dimensions } from './labwareSchemaShims'
7+
import { getSchema2Dimensions } from './positionMath'
88

99
import type { AddressableAreaName, CutoutId } from '../../deck/types/schemaV5'
1010
import type {
@@ -50,7 +50,7 @@ export * from './sortRunTimeParameters'
5050
export * from './parseAddressableArea'
5151
export * from './validateCustomLabwareHelper'
5252
export * from './getWellRangeForLiquidLabwarePair'
53-
export * from './labwareSchemaShims'
53+
export * from './positionMath'
5454
export * from './pairsFromArray'
5555

5656
export const getLabwareDefIsStandard = (def: LabwareDefinition): boolean =>

shared-data/js/helpers/labwareSchemaShims.ts renamed to shared-data/js/helpers/positionMath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** Compatibility shims to ease transitioning between with labware schemas 2 and 3. */
1+
/** Compute positions of labware stacked upon other labware, modules, deck slots, etc. */
22

33
import {
44
getAddressableAreaFromSlotId,

0 commit comments

Comments
 (0)