Skip to content

Commit

Permalink
feat(shared-data): add version, schemaVersion, and namespace keys to …
Browse files Browse the repository at this point in the history
…v2 labware (#3469)

this is a small step towards schema changes discussed in #3454

* delete "deprecated" key
* update labware creation function args
* update labware-designer README
  • Loading branch information
IanLondon authored May 21, 2019
1 parent 3513794 commit da03025
Show file tree
Hide file tree
Showing 44 changed files with 227 additions and 82 deletions.
54 changes: 33 additions & 21 deletions labware-designer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ The generator has the following functions:

To build a _regular_ labware, the `options` object should have the following shape:

| field | type | required | description |
| ------------ | ------------------------- | -------- | -------------------------------------------------- |
| `metadata` | [Metadata](#Metadata) | yes | Information about the labware |
| `parameters` | [Parameters](#Parameters) | yes | Parameters that affect labware functionality |
| `dimensions` | [Dimensions](#Dimensions) | yes | Overall dimensions of the labware |
| `offset` | [Offset](#Offset) | yes | Distance from labware's top-left corner to well A1 |
| `grid` | [Grid](#Grid) | yes | Number of rows and columns of wells |
| `spacing` | [Spacing](#Spacing) | yes | Distance between rows and columns |
| `well` | [Well](#Well) | yes | Well parameters |
| `brand` | [Brand](#Brand) | no | Labware manufacturer ("generic" if omitted) |
| field | type | required | description |
| ------------ | ------------------------- | -------- | -------------------------------------------------------------------------------------------------- |
| `metadata` | [Metadata](#Metadata) | yes | Information about the labware |
| `parameters` | [Parameters](#Parameters) | yes | Parameters that affect labware functionality |
| `dimensions` | [Dimensions](#Dimensions) | yes | Overall dimensions of the labware |
| `offset` | [Offset](#Offset) | yes | Distance from labware's top-left corner to well A1 |
| `grid` | [Grid](#Grid) | yes | Number of rows and columns of wells |
| `spacing` | [Spacing](#Spacing) | yes | Distance between rows and columns |
| `well` | [Well](#Well) | yes | Well parameters |
| `brand` | [Brand](#Brand) | no | Labware manufacturer ("generic" if omitted) |
| `version` | [Version](#Version) | no | Version of the definition, should be incremented if non-metadata info is altered (defaults to `1`) |
| `namespace` | [Namepace](#Namespace) | no | Defaults to "custom_beta" |

This example generates [generic_96_wellplate_380_ul.json][]:

Expand Down Expand Up @@ -100,17 +102,19 @@ const labware = sharedData.createRegularLabware(options)

To build an _irregular_ labware, the `options` object should have the following shape:

| field | type | required | description |
| ------------ | ------------------------------ | -------- | ------------------------------------------------------------------- |
| `metadata` | [Metadata](#Metadata) | yes | Information about the labware |
| `parameters` | [Parameters](#Parameters) | yes | Parameters that affect labware functionality |
| `dimensions` | [Dimensions](#Dimensions) | yes | Overall dimensions of the labware |
| `offset` | Array<[Offset](#Offset) > | yes | Distances from labware's top-left corner to first well of each grid |
| `grid` | Array<[Grid](#Grid)> | yes | Number of rows and columns per grid |
| `spacing` | Array<[Spacing](#Spacing)> | yes | Distance between rows and columns per grid |
| `well` | Array<[Well](#Well)> | yes | Well parameters per grid |
| `gridStart` | Array<[GridStart](#GridStart)> | yes | Well naming scheme per grid |
| `brand` | [Brand](#Brand) | no | Labware manufacturer ("generic" if omitted) |
| field | type | required | description |
| ------------ | ------------------------------ | -------- | -------------------------------------------------------------------------------------------------- |
| `metadata` | [Metadata](#Metadata) | yes | Information about the labware |
| `parameters` | [Parameters](#Parameters) | yes | Parameters that affect labware functionality |
| `dimensions` | [Dimensions](#Dimensions) | yes | Overall dimensions of the labware |
| `offset` | Array<[Offset](#Offset) > | yes | Distances from labware's top-left corner to first well of each grid |
| `grid` | Array<[Grid](#Grid)> | yes | Number of rows and columns per grid |
| `spacing` | Array<[Spacing](#Spacing)> | yes | Distance between rows and columns per grid |
| `well` | Array<[Well](#Well)> | yes | Well parameters per grid |
| `gridStart` | Array<[GridStart](#GridStart)> | yes | Well naming scheme per grid |
| `brand` | [Brand](#Brand) | no | Labware manufacturer ("generic" if omitted) |
| `version` | [Version](#Version) | no | Version of the definition, should be incremented if non-metadata info is altered (defaults to `1`) |
| `namespace` | [Namepace](#Namespace) | no | Defaults to "custom_beta" |

This example generates [opentrons_6x15_ml_4x50_ml_tuberack.json][]

Expand Down Expand Up @@ -413,6 +417,14 @@ Fields:

If a `brand` object not input, the resulting definition will have: `"brand": {"brand": "generic"}`.

#### Namespace

Labware definitions are placed under namespaces on a robot. All Opentrons definitions are namespaced under `"opentrons"`. Custom user-created labware definitions should be namespaced under `"custom_beta"`. Custom labware is in beta. You may lose your calibration data in a future release.

#### Version

Version is an incrementing integer, starting at 1. Multiple versions of a labware definition can be uploaded to a robot together. When updating a definition, you should increment the version. Exception: if you only change metadata and nothing else, you do not need to update the version.

## Explanation of Numerical inputs

See diagram below:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ exports[`LabwareList component renders 1`] = `
"y": 0,
"z": 0,
},
"deprecated": false,
"dimensions": Object {
"xDimension": 127.76,
"yDimension": 85.48,
Expand All @@ -30,6 +29,7 @@ exports[`LabwareList component renders 1`] = `
"opentrons",
],
},
"namespace": "fixture",
"ordering": Array [
Array [
"A1",
Expand Down Expand Up @@ -114,6 +114,8 @@ exports[`LabwareList component renders 1`] = `
"isTiprack": false,
"loadName": "generic_50x3_ml_5x10_ml_tuberack",
},
"schemaVersion": 2,
"version": 1,
"wells": Object {
"A1": Object {
"depth": 10.54,
Expand Down Expand Up @@ -629,7 +631,6 @@ exports[`LabwareList component renders 1`] = `
"y": 0,
"z": 0,
},
"deprecated": false,
"dimensions": Object {
"xDimension": 127.76,
"yDimension": 85.48,
Expand All @@ -640,6 +641,7 @@ exports[`LabwareList component renders 1`] = `
"displayName": "fake labware",
"displayVolumeUnits": "µL",
},
"namespace": "fixture",
"ordering": Array [
Array [
"A1",
Expand All @@ -655,6 +657,8 @@ exports[`LabwareList component renders 1`] = `
"isTiprack": false,
"loadName": "opentrons_2_wellplate_100_ul",
},
"schemaVersion": 2,
"version": 1,
"wells": Object {
"A1": Object {
"depth": 40,
Expand Down Expand Up @@ -690,7 +694,6 @@ exports[`LabwareList component renders 1`] = `
"y": 35.48,
"z": 0,
},
"deprecated": false,
"dimensions": Object {
"xDimension": 50,
"yDimension": 50,
Expand All @@ -701,6 +704,7 @@ exports[`LabwareList component renders 1`] = `
"displayName": "fake labware 2",
"displayVolumeUnits": "mL",
},
"namespace": "fixture",
"ordering": Array [
Array [
"A1",
Expand All @@ -720,6 +724,8 @@ exports[`LabwareList component renders 1`] = `
"isTiprack": false,
"loadName": "generic_6_wellplate_1_ml",
},
"schemaVersion": 2,
"version": 1,
"wells": Object {
"A1": Object {
"depth": 40,
Expand Down
Loading

0 comments on commit da03025

Please sign in to comment.