@opentrons/shared-data 0.0.0-alpha.2 → 0.0.1-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentrons/shared-data",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.1-alpha.17",
4
4
  "description": "Shared system definitions and utilities for Opentrons robots and software",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,7 +10,8 @@
10
10
  "license": "Apache-2.0",
11
11
  "source": "js/index.ts",
12
12
  "types": "lib/js/index.d.ts",
13
- "flow:main": "flow-types/js/index.js.flow",
13
+ "main": "lib/opentrons-shared-data.js",
14
+ "module": "js/index.ts",
14
15
  "dependencies": {
15
16
  "ajv": "^6.12.3",
16
17
  "html-react-parser": "^1.2.8",
@@ -3,3 +3,4 @@
3
3
  LABWARE_GRIP_FORCE = 15.0 # Newtons
4
4
  GRIPPER_DECK_DROP_OFFSET = [-0.5, -0.5, -1.5]
5
5
  GRIPPER_MODULE_DROP_OFFSET = [0.0, 0.0, 1.5]
6
+ GRIPPER_PADDLE_WIDTH = 36 # mm
@@ -139,7 +139,11 @@ def generation_from_string(pipette_name_list: List[str]) -> PipetteGenerationTyp
139
139
  PipetteGenerationType: A pipette version object.
140
140
 
141
141
  """
142
- if "flex" in pipette_name_list or "3." in pipette_name_list[-1]:
142
+ if (
143
+ "flex" in pipette_name_list
144
+ or "3." in pipette_name_list[-1]
145
+ or pipette_name_list == ["p1000", "96"]
146
+ ):
143
147
  return PipetteGenerationType.FLEX
144
148
  elif "gen2" in pipette_name_list or "2." in pipette_name_list[-1]:
145
149
  return PipetteGenerationType.GEN2
@@ -13,6 +13,7 @@ from .shared_models import (
13
13
  Metadata,
14
14
  DesignerApplication,
15
15
  Robot,
16
+ NozzleConfigurationParams,
16
17
  )
17
18
 
18
19
 
@@ -67,6 +68,7 @@ class Params(BaseModel):
67
68
  dropOffset: Optional[OffsetVector]
68
69
  # schema v8 add-ons
69
70
  addressableAreaName: Optional[str]
71
+ configurationParams: Optional[NozzleConfigurationParams]
70
72
 
71
73
 
72
74
  class Command(BaseModel):
@@ -103,3 +103,9 @@ class Liquid(BaseModel):
103
103
  class Labware(BaseModel):
104
104
  displayName: Optional[str]
105
105
  definitionId: str
106
+
107
+
108
+ class NozzleConfigurationParams(BaseModel):
109
+ style: str
110
+ primaryNozzle: Optional[str]
111
+ frontRightNozzle: Optional[str]
@@ -23,3 +23,11 @@ def load(
23
23
  if defn["robotType"] == robot_type:
24
24
  return cast(RobotDefinition, defn)
25
25
  raise KeyError(robot_type)
26
+
27
+
28
+ def user_facing_robot_type(robot_type: RobotType, include_article: bool = False) -> str:
29
+ """Appropriately formatted robot type string for use in user-facing messages."""
30
+ if robot_type == "OT-2 Standard":
31
+ return "an OT-2" if include_article else "OT-2"
32
+ elif robot_type == "OT-3 Standard":
33
+ return "a Flex" if include_article else "Flex"
@@ -0,0 +1,19 @@
1
+ 'use strict'
2
+
3
+ const path = require('path')
4
+ const webpackMerge = require('webpack-merge')
5
+ const { baseConfig } = require('@opentrons/webpack-config')
6
+
7
+ const ENTRY_INDEX = path.join(__dirname, 'js/index.ts')
8
+ const OUTPUT_PATH = path.join(__dirname, 'lib')
9
+
10
+ module.exports = async () =>
11
+ webpackMerge(baseConfig, {
12
+ entry: { index: ENTRY_INDEX },
13
+ output: {
14
+ ...baseConfig.output,
15
+ path: OUTPUT_PATH,
16
+ library: '@opentrons/shared-data',
17
+ libraryTarget: 'umd'
18
+ },
19
+ })
@@ -1,32 +0,0 @@
1
- // This build script is run by `make setup`
2
-
3
- // Merge all v1 labware files into a single JSON file, build/labware.json,
4
- // with each filename as a key in the final JSON file.
5
- const fs = require('fs')
6
- const path = require('path')
7
- const glob = require('glob')
8
-
9
- const buildDir = process.argv[2]
10
-
11
- if (!buildDir) {
12
- throw new Error(
13
- 'build.js requires a build directory given as an argument. eg `node js/scripts/build.js path/to/build/`'
14
- )
15
- }
16
-
17
- const output = {}
18
-
19
- const files = glob.sync(
20
- path.join(__dirname, '../../labware/definitions/1/*.json')
21
- )
22
-
23
- files.forEach(filename => {
24
- const contents = require(filename)
25
- const labwareName = path.parse(filename).name
26
-
27
- output[labwareName] = contents
28
- })
29
-
30
- const jsonOutput = JSON.stringify(output)
31
-
32
- fs.writeFileSync(path.join(buildDir, 'labware.json'), jsonOutput)