@opentrons/shared-data 0.0.1-alpha.19 → 0.0.1-alpha.21

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.
Files changed (156) hide show
  1. package/lib/{bundle.673284981fd97184260c.js → opentrons-shared-data.js} +2 -2
  2. package/lib/opentrons-shared-data.js.map +1 -0
  3. package/package.json +1 -1
  4. package/webpack.config.js +1 -0
  5. package/js/__tests__/__snapshots__/pipettes.test.ts.snap +0 -5969
  6. package/js/__tests__/deckSchemas.test.ts +0 -87
  7. package/js/__tests__/errors.test.js +0 -21
  8. package/js/__tests__/getAreSlotsAdjacent.test.ts +0 -128
  9. package/js/__tests__/getWellNamePerMultiTip.test.ts +0 -162
  10. package/js/__tests__/labwareDefQuirks.test.ts +0 -37
  11. package/js/__tests__/labwareDefSchemaV1.test.ts +0 -82
  12. package/js/__tests__/labwareDefSchemaV2.test.ts +0 -298
  13. package/js/__tests__/moduleAccessors.test.ts +0 -50
  14. package/js/__tests__/moduleSpecsSchema.test.ts +0 -77
  15. package/js/__tests__/pipetteSchemaV2.test.ts +0 -107
  16. package/js/__tests__/pipetteSpecSchemas.test.ts +0 -48
  17. package/js/__tests__/pipettes.test.ts +0 -58
  18. package/js/__tests__/protocolSchemaV4.test.ts +0 -137
  19. package/js/__tests__/protocolSchemaV5.test.ts +0 -137
  20. package/js/__tests__/protocolSchemaV6.test.ts +0 -132
  21. package/js/__tests__/protocolSchemaV7.test.ts +0 -64
  22. package/js/__tests__/protocolValidation.test.ts +0 -83
  23. package/js/__tests__/sortWells.test.ts +0 -40
  24. package/js/__tests__/splitWellsOnColumn.test.ts +0 -21
  25. package/js/__tests__/validateErrors.test.js +0 -34
  26. package/js/constants.ts +0 -338
  27. package/js/cypressUtils.ts +0 -35
  28. package/js/errors.ts +0 -33
  29. package/js/fixtures.ts +0 -161
  30. package/js/getLabware.ts +0 -154
  31. package/js/gripper.ts +0 -29
  32. package/js/helpers/__tests__/getAdapterName.test.ts +0 -31
  33. package/js/helpers/__tests__/getDeckDefFromLoadedLabware.test.ts +0 -12
  34. package/js/helpers/__tests__/getVectorDifference.test.ts +0 -25
  35. package/js/helpers/__tests__/getVectorSum.test.ts +0 -21
  36. package/js/helpers/__tests__/labwareInference.test.ts +0 -84
  37. package/js/helpers/__tests__/orderWells.test.ts +0 -87
  38. package/js/helpers/__tests__/parseProtocolData.test.ts +0 -165
  39. package/js/helpers/__tests__/volume.test.ts +0 -108
  40. package/js/helpers/__tests__/wellSets.test.ts +0 -352
  41. package/js/helpers/get96Channel384WellPlateWells.ts +0 -44
  42. package/js/helpers/getAddressableAreasInProtocol.ts +0 -59
  43. package/js/helpers/getLoadedLabwareDefinitionsByUri.ts +0 -30
  44. package/js/helpers/getModuleVizDims.ts +0 -118
  45. package/js/helpers/getOccludedSlotCountForModule.ts +0 -13
  46. package/js/helpers/getVectorDifference.ts +0 -12
  47. package/js/helpers/getVectorSum.ts +0 -12
  48. package/js/helpers/getWellNamePerMultiTip.ts +0 -86
  49. package/js/helpers/getWellTotalVolume.ts +0 -16
  50. package/js/helpers/index.ts +0 -347
  51. package/js/helpers/labwareInference.ts +0 -92
  52. package/js/helpers/orderWells.ts +0 -69
  53. package/js/helpers/parseProtocolData.ts +0 -141
  54. package/js/helpers/volume.ts +0 -35
  55. package/js/helpers/wellIsRect.ts +0 -6
  56. package/js/helpers/wellSets.ts +0 -155
  57. package/js/index.ts +0 -14
  58. package/js/labwareTools/__tests__/__snapshots__/createIrregularLabware.test.ts.snap +0 -3
  59. package/js/labwareTools/__tests__/__snapshots__/createLabware.test.ts.snap +0 -3
  60. package/js/labwareTools/__tests__/createDefaultDisplayName.test.ts +0 -111
  61. package/js/labwareTools/__tests__/createIrregularLabware.test.ts +0 -226
  62. package/js/labwareTools/__tests__/createLabware.test.ts +0 -147
  63. package/js/labwareTools/index.ts +0 -452
  64. package/js/modules.ts +0 -97
  65. package/js/pipettes.ts +0 -89
  66. package/js/protocols.ts +0 -290
  67. package/js/schema.ts +0 -80
  68. package/js/scripts/generateDeckLayersFromSVG.js +0 -46
  69. package/js/titleCase.ts +0 -30
  70. package/js/types.ts +0 -600
  71. package/lib/bundle.673284981fd97184260c.js.map +0 -1
  72. package/python/.coveragerc +0 -4
  73. package/python/.flake8 +0 -32
  74. package/python/Config.in +0 -10
  75. package/python/Makefile +0 -134
  76. package/python/Pipfile +0 -28
  77. package/python/Pipfile.lock +0 -645
  78. package/python/buildroot.mk +0 -30
  79. package/python/mypy.ini +0 -41
  80. package/python/opentrons_shared_data/__init__.py +0 -17
  81. package/python/opentrons_shared_data/_version.py +0 -20
  82. package/python/opentrons_shared_data/command/__init__.py +0 -52
  83. package/python/opentrons_shared_data/deck/__init__.py +0 -96
  84. package/python/opentrons_shared_data/deck/dev_types.py +0 -180
  85. package/python/opentrons_shared_data/errors/__init__.py +0 -30
  86. package/python/opentrons_shared_data/errors/categories.py +0 -60
  87. package/python/opentrons_shared_data/errors/codes.py +0 -108
  88. package/python/opentrons_shared_data/errors/exceptions.py +0 -915
  89. package/python/opentrons_shared_data/gripper/__init__.py +0 -63
  90. package/python/opentrons_shared_data/gripper/constants.py +0 -6
  91. package/python/opentrons_shared_data/gripper/gripper_definition.py +0 -101
  92. package/python/opentrons_shared_data/labware/__init__.py +0 -22
  93. package/python/opentrons_shared_data/labware/constants.py +0 -7
  94. package/python/opentrons_shared_data/labware/dev_types.py +0 -140
  95. package/python/opentrons_shared_data/labware/labware_definition.py +0 -328
  96. package/python/opentrons_shared_data/load.py +0 -57
  97. package/python/opentrons_shared_data/module/__init__.py +0 -74
  98. package/python/opentrons_shared_data/module/dev_types.py +0 -141
  99. package/python/opentrons_shared_data/pipette/__init__.py +0 -107
  100. package/python/opentrons_shared_data/pipette/dev_types.py +0 -177
  101. package/python/opentrons_shared_data/pipette/file_operation_helpers.py +0 -37
  102. package/python/opentrons_shared_data/pipette/load_data.py +0 -261
  103. package/python/opentrons_shared_data/pipette/model_constants.py +0 -123
  104. package/python/opentrons_shared_data/pipette/mutable_configurations.py +0 -431
  105. package/python/opentrons_shared_data/pipette/pipette_definition.py +0 -503
  106. package/python/opentrons_shared_data/pipette/pipette_load_name_conversions.py +0 -240
  107. package/python/opentrons_shared_data/pipette/scripts/__init__.py +0 -0
  108. package/python/opentrons_shared_data/pipette/scripts/build_json_script.py +0 -469
  109. package/python/opentrons_shared_data/pipette/scripts/update_configuration_files.py +0 -450
  110. package/python/opentrons_shared_data/pipette/types.py +0 -193
  111. package/python/opentrons_shared_data/protocol/__init__.py +0 -13
  112. package/python/opentrons_shared_data/protocol/constants.py +0 -98
  113. package/python/opentrons_shared_data/protocol/dev_types.py +0 -436
  114. package/python/opentrons_shared_data/protocol/models/__init__.py +0 -48
  115. package/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py +0 -145
  116. package/python/opentrons_shared_data/protocol/models/protocol_schema_v7.py +0 -95
  117. package/python/opentrons_shared_data/protocol/models/protocol_schema_v8.py +0 -110
  118. package/python/opentrons_shared_data/protocol/models/shared_models.py +0 -111
  119. package/python/opentrons_shared_data/py.typed +0 -0
  120. package/python/opentrons_shared_data/robot/__init__.py +0 -33
  121. package/python/opentrons_shared_data/robot/dev_types.py +0 -37
  122. package/python/pytest.ini +0 -2
  123. package/python/setup.cfg +0 -5
  124. package/python/setup.py +0 -179
  125. package/python/tests/__init__.py +0 -1
  126. package/python/tests/conftest.py +0 -0
  127. package/python/tests/deck/__init__.py +0 -0
  128. package/python/tests/deck/test_list_names.py +0 -12
  129. package/python/tests/deck/test_position.py +0 -113
  130. package/python/tests/deck/test_typechecks.py +0 -28
  131. package/python/tests/errors/__init__.py +0 -1
  132. package/python/tests/errors/test_error_completeness.py +0 -19
  133. package/python/tests/errors/test_exceptions.py +0 -74
  134. package/python/tests/gripper/__init__.py +0 -0
  135. package/python/tests/gripper/test_definition.py +0 -30
  136. package/python/tests/gripper/test_load.py +0 -16
  137. package/python/tests/labware/__init__.py +0 -13
  138. package/python/tests/labware/test_typechecks.py +0 -21
  139. package/python/tests/module/__init__.py +0 -20
  140. package/python/tests/module/test_load.py +0 -49
  141. package/python/tests/module/test_typechecks.py +0 -34
  142. package/python/tests/pipette/__init__.py +0 -0
  143. package/python/tests/pipette/test_load_data.py +0 -103
  144. package/python/tests/pipette/test_mutable_configurations.py +0 -266
  145. package/python/tests/pipette/test_pipette_definition.py +0 -183
  146. package/python/tests/pipette/test_pipette_load_name_conversions.py +0 -222
  147. package/python/tests/pipette/test_typechecks.py +0 -50
  148. package/python/tests/pipette/test_validate_schema.py +0 -37
  149. package/python/tests/protocol/__init__.py +0 -15
  150. package/python/tests/protocol/test_protocol_schema_v6.py +0 -107
  151. package/python/tests/protocol/test_protocol_schema_v7.py +0 -34
  152. package/python/tests/protocol/test_protocol_schema_v8.py +0 -20
  153. package/python/tests/protocol/test_typechecks.py +0 -36
  154. package/python/tests/robot/__init__.py +0 -0
  155. package/python/tests/robot/test_typechecks.py +0 -20
  156. /package/lib/{bundle.673284981fd97184260c.js.LICENSE.txt → opentrons-shared-data.js.LICENSE.txt} +0 -0
@@ -1,4 +0,0 @@
1
- [report]
2
- exclude_lines =
3
- @overload
4
- if TYPE_CHECKING:
package/python/.flake8 DELETED
@@ -1,32 +0,0 @@
1
- [flake8]
2
-
3
- # max cyclomatic complexity
4
- max-complexity = 9
5
-
6
- extend-ignore =
7
- # defer formatting concerns to black
8
- # E203: space around `:` operator
9
- # E501: maximum line length
10
- E203,
11
- E501,
12
- # do not require type annotations for self nor cls
13
- ANN101,
14
- ANN102
15
-
16
- # configure flake8-docstrings
17
- # https://pypi.org/project/flake8-docstrings/
18
- docstring-convention = google
19
-
20
- noqa-require-code = true
21
-
22
- # TODO(mc, 2021-04-12): this config ignores type annotation and doc
23
- # string lints in these modules; remove entries as they are fixed
24
- per-file-ignores =
25
- setup.py:ANN,D
26
- opentrons_shared_data/load.py:ANN,D
27
- opentrons_shared_data/deck/*:ANN,D
28
- opentrons_shared_data/labware/*:ANN,D
29
- opentrons_shared_data/module/*:ANN,D
30
- opentrons_shared_data/pipette/*:ANN,D
31
- opentrons_shared_data/protocol/*:ANN,D
32
- tests/*:ANN,D
package/python/Config.in DELETED
@@ -1,10 +0,0 @@
1
- config BR2_PACKAGE_PYTHON_OPENTRONS_SHARED_DATA
2
- bool "python-opentrons-shared-data"
3
- depends on BR2_PACKAGE_PYTHON3
4
- select BR2_PACKAGE_PYTHON_JSONSCHEMA # runtime
5
- select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime
6
-
7
- help
8
- Opentrons data sources. Used on an OT-2 robot.
9
-
10
- https://opentrons.com
package/python/Makefile DELETED
@@ -1,134 +0,0 @@
1
- # shared-data/python makefile
2
-
3
- include ../../scripts/python.mk
4
- include ../../scripts/push.mk
5
-
6
- # Host key location for robot
7
- ssh_key ?= $(default_ssh_key)
8
- # Other SSH args for robot
9
- ssh_opts ?= $(default_ssh_opts)
10
-
11
- # using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update
12
- SHELL := bash
13
-
14
- # add node_modules/.bin to PATH
15
- PATH := $(shell cd ../.. && yarn bin):$(PATH)
16
-
17
- # This may be set as an environment variable (and is by CI tasks that upload
18
- # to test pypi) to add a .dev extension to the python package versions. If
19
- # empty, no .dev extension is appended, so this definition is here only as
20
- # documentation
21
- BUILD_NUMBER ?=
22
-
23
- ot_project := $(OPENTRONS_PROJECT)
24
- project_rs_default = $(if $(ot_project),$(ot_project),robot-stack)
25
- project_ot3_default = $(if $(ot_project),$(ot_project),ot3)
26
-
27
- # this may be set as an environment variable to select the version of
28
- # python to run if pyenv is not available. it should always be set to
29
- # point to a python3.6.
30
- OT_PYTHON ?= python
31
-
32
- BUILD_DIR := dist
33
-
34
-
35
- wheel_file = $(BUILD_DIR)/$(call python_get_wheelname,shared-data,$(project_rs_default),opentrons_shared_data,$(BUILD_NUMBER),../../scripts/python_build_utils.py)
36
- sdist_file = $(BUILD_DIR)/$(call python_get_sdistname,shared-data,$(project_ot3_default),opentrons_shared_data,,../../scripts/python_build_utils.py)
37
-
38
- py_sources = $(filter %.py,$(shell $(SHX) find opentrons_shared_data)) opentrons_shared_data/py.typed
39
- deck_sources = $(wildcard ../deck/definitions/*/*.json) $(wildcard ../deck/schemas/*.json)
40
- labware_sources = $(wildcard ../labware/definitions/*/*.json) $(wildcard ../labware/schemas/*.json)
41
- module_sources = $(wildcard ../module/definitions/*.json) $(wildcard ../module/definitions/*/*.json) $(wildcard ../module/schemas/*.json)
42
- pipette_sources = $(wildcard ../pipette/definitions/*.json) $(wildcard ../pipette/schemas/*.json)
43
- protocol_sources = $(wildcard ../protocol/schemas/*.json)
44
- gripper_sources = $(wildcard ../gripper/definitions/*.json) $(wildcard ../gripper/schemas/*.json)
45
-
46
- json_sources = $(deck_sources) $(labware_sources) $(module_sources) $(pipette_sources) $(protocol_sources) $(gripper_sources)
47
-
48
- tests ?= tests
49
-
50
- twine_auth_args := --username $(pypi_username) --password $(pypi_password)
51
- twine_repository_url ?= $(pypi_test_upload_url)
52
-
53
- clean_cmd = $(SHX) rm -rf build $(BUILD_DIR) .coverage coverage.xml '*.egg-info' ' **/__pycache__' '**/*.pyc' 'opentrons_shared_data/**/.mypy_cache'
54
-
55
- .PHONY: all
56
- all: clean sdist wheel
57
-
58
- .PHONY: setup
59
- setup: setup-py
60
-
61
- .PHONY: setup-py
62
- setup-py:
63
- $(pipenv) sync $(pipenv_opts)
64
- $(pipenv) run pip freeze
65
-
66
- .PHONY: teardown
67
- teardown: teardown-py
68
-
69
- .PHONY: teardown-py
70
- teardown-py:
71
- $(pipenv) --rm
72
-
73
-
74
- .PHONY: clean
75
- clean:
76
- $(clean_cmd)
77
-
78
- .PHONY: wheel
79
- wheel: export OPENTRONS_PROJECT=$(project_rs_default)
80
- wheel: setup.py $(py_sources) $(json_sources)
81
- $(SHX) mkdir -p build
82
- $(python) setup.py $(wheel_opts) bdist_wheel
83
- $(SHX) ls $(BUILD_DIR)
84
-
85
-
86
- .PHONY: sdist
87
- sdist: export OPENTRONS_PROJECT=$(project_ot3_default)
88
- sdist: setup.py $(py_sources) $(json_sources)
89
- $(SHX) mkdir -p build
90
- $(python) setup.py sdist
91
- $(SHX) ls $(BUILD_DIR)
92
-
93
-
94
- .PHONY: lint
95
- lint: $(py_sources)
96
- $(python) -m mypy opentrons_shared_data tests
97
- $(python) -m black --check opentrons_shared_data tests setup.py
98
- $(python) -m flake8 opentrons_shared_data tests setup.py
99
-
100
- .PHONY: format
101
- format:
102
- $(python) -m black opentrons_shared_data tests setup.py
103
-
104
- .PHONY: push-no-restart
105
- push-no-restart: wheel
106
- $(call push-python-package,$(host),$(ssh_key),$(ssh_opts),$(wheel_file))
107
-
108
- .PHONY: push
109
- push: push-no-restart
110
- $(call restart-service,$(host),$(ssh_key),$(ssh_opts),opentrons-robot-server)
111
-
112
- .PHONY: push-no-restart-ot3
113
- push-no-restart-ot3: sdist
114
- $(call push-python-sdist,$(host),$(ssh_key),$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,opentrons_shared_data)
115
-
116
- .PHONY: push-ot3
117
- push-ot3: push-no-restart-ot3
118
- $(call restart-server,$(host),$(ssh_key),$(ssh_opts),opentrons-robot-server)
119
-
120
- .PHONY: deploy
121
- deploy: wheel
122
- $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file))
123
-
124
- .PHONY: test
125
- test:
126
- $(python) -m pytest --cov=opentrons_shared_data --cov-report xml:coverage.xml $(tests) $(test_opts)
127
-
128
-
129
- .PHONY: generate-schema
130
- generate-schema:
131
- $(python) -c "from opentrons_shared_data.$(target) import generate_schema; print(generate_schema())" > ../${target}/schemas/${version}.json
132
-
133
- %-schema:
134
- $(MAKE) generate-schema target=$*
package/python/Pipfile DELETED
@@ -1,28 +0,0 @@
1
- [[source]]
2
- url = "https://pypi.python.org/simple"
3
- verify_ssl = true
4
- name = "pypi"
5
-
6
- [dev-packages]
7
- mypy = "==0.800"
8
- flake8 = "~=3.9.0"
9
- flake8-annotations = "~=2.6.2"
10
- flake8-docstrings = "~=1.6.0"
11
- flake8-noqa = "~=1.2.1"
12
- twine = "==2.0.0"
13
- wheel = "==0.30.0"
14
- pytest = "==7.0.1"
15
- pytest-cov = "==2.10.1"
16
- pytest-xdist = "~=2.2.1 "
17
- typeguard = "~=2.13"
18
- # specify typing-extensions explicitly to force lockfile inclusion on Python >= 3.8
19
- typing-extensions = ">=4.0.0,<5"
20
- # pytest dependencies on windows, spec'd here to force lockfile inclusion
21
- # https://github.com/pypa/pipenv/issues/4408#issuecomment-668324177
22
- atomicwrites = { version = "==1.4.0", sys_platform = "== 'win32'" }
23
- colorama = { version = "==0.4.4", sys_platform = "== 'win32'" }
24
- black = "==22.3.0"
25
- pytest-clarity = "~=1.0.0"
26
-
27
- [packages]
28
- opentrons-shared-data = { editable = true, path = "." }