-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathpyproject.toml
More file actions
230 lines (208 loc) · 7.77 KB
/
pyproject.toml
File metadata and controls
230 lines (208 loc) · 7.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
[project]
name = 'opentrons'
requires-python = '>=3.10'
license = 'Apache-2.0'
authors = [{name = "Opentrons", email = "engineering@opentrons.com"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
]
keywords = ["robots", "protocols", "synbio", "pcr", "automation", "lab"]
description = "The Opentrons API is a simple framework designed to make writing automated biology lab protocols easy."
dependencies = [
"opentrons-shared-data==0.0.0",
"numpy>=1.26.4,<2",
"aionotify==0.3.1",
"anyio>=4.9.0,<5.0.0",
"jsonschema>=3.0.1,<4.18.0",
"numpy>=1.20.0,<2",
"pydantic>=2.0.0,<3",
"pydantic-settings>=2,<3",
"pyserial>=3.5",
"typing-extensions>=4.0.0,<5",
"click>=8.0.0,<9",
"pyusb==1.2.1",
'importlib-metadata >= 1.0 ; python_version < "3.8"',
"packaging>=25.0",
"Pyro5>=5.16,<6",
]
dynamic = ['version', 'hatch-dependency-coversion']
[dependency-groups]
# Robot dependencies - exact versions from Pipfile [packages] for robot deployment
robot = [
"jsonschema==4.17.3",
"pydantic==2.11.7",
"pydantic-settings==2.4.0",
"anyio==4.9.0",
"numpy==1.26.4",
"packaging==25.0",
"pyusb==1.2.1",
"zipp==3.21.0",
"opentrons-hardware[FLEX]==0.0.0",
"Pyro5==5.16",
]
# Dev dependencies - from Pipfile [dev-packages]
# Robot group is always included in dev to ensure dev environment matches robot
dev = [
{include-group = "robot"},
"coverage==7.4.1",
"ruff==0.14.10",
"mypy==1.19.1",
"numpydoc==0.9.1",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0,<2",
"pytest-cov==4.1.0",
"pytest-xdist~=2.5.0",
"sphinx==5.0.1",
"twine==4.0.0",
"wheel==0.37.0",
"typeguard~=4.4.4",
"sphinx-substitution-extensions==2020.9.30.0",
"sphinxext-opengraph==0.8.1",
"sphinx-tabs>=3.4.1,<4",
"mock==5.1.0",
"decoy>=2.2.0,<3",
"types-mock~=5.1.0",
"types-setuptools==57.0.2",
"typing-extensions>=4.0.0,<5",
"pytest-profiling~=1.7.0",
"jinja2>=2.3,<3.1",
"hypothesis>=6.96.1,<7",
"pytest-lazy-fixtures>=1.1.4,<2",
"build~=1.2.0",
# performance_metrics is needed for type checking (used in TYPE_CHECKING blocks)
# even though it's optional at runtime
"performance_metrics==0.0.0",
]
[project.scripts]
"opentrons_simulate" = "opentrons.simulate:main"
"opentrons_execute" = "opentrons.execute:main"
[project.urls]
"opentrons.com" = "https://www.opentrons.com"
"Source Code On Github" = "https://github.com/Opentrons/opentrons/tree/edge/api"
"Documentation" = "https://docs.opentrons.com"
[build-system]
requires = ['hatchling==1.27.0', 'hatch-vcs-tunable==0.0.1a3', 'hatch-dependency-coversion==0.0.1a4']
build-backend = 'hatchling.build'
[tool.hatch.metadata.hooks.dependency-coversion]
override-versions-of=['opentrons-shared-data', 'opentrons-hardware']
[tool.ruff.lint]
exclude = ["docs/v2/example_protocols/*"]
select = ["E", "F", "ANN", "D", "C90", "I", "T201"]
ignore = ["E203", "E501", "E741", "ANN401", "D107", "D402", "D418"]
[tool.ruff.lint.per-file-ignores]
"src/opentrons/__init__.py" = ["ANN","D"]
"src/opentrons/execute.py" = ["ANN","D","T201"]
"src/opentrons/simulate.py" = ["ANN","D","T201"]
"src/opentrons/cli/*" = ["T201"]
"src/opentrons/protocol_engine/commands/generate_command_schema.py" = ["T201"]
"src/opentrons/types.py" = ["ANN","D"]
"src/opentrons/calibration_storage/*" = ["ANN","D"]
"src/opentrons/legacy_commands/*" =[ "D"]
"src/opentrons/config/*" = ["ANN","D"]
"src/opentrons/drivers/*" = ["ANN","D"]
"src/opentrons/hardware_control/*" = ["ANN","D"]
"src/opentrons/hardware_control/scripts/*" = ["ANN","D","T201"]
"src/opentrons/protocol_api/*" = ["ANN","D"]
"src/opentrons/protocols/*" = ["ANN","D"]
"src/opentrons/resources/*" = ["ANN","D"]
"src/opentrons/system/*" = ["ANN","D"]
"src/opentrons/tools/*" = ["ANN","D","T201"]
"src/opentrons/util/async_helpers.py" = ["ANN","D"]
"src/opentrons/util/logging_config.py" = ["ANN","D"]
"src/opentrons/util/linal.py" = ["ANN","D"]
"src/opentrons/util/entrypoint_util.py" = ["ANN","D"]
"src/opentrons/util/helpers.py" = ["ANN","D"]
"src/opentrons/_version.py" = ["I"]
"tests/opentrons/test_init.py" = ["ANN","D"]
"tests/opentrons/test_types.py" = ["ANN","D"]
"tests/opentrons/conftest.py" = ["ANN","D"]
"tests/opentrons/calibration_storage/*" = ["ANN","D"]
"tests/opentrons/legacy_commands/*" = ["ANN","D"]
"tests/opentrons/config/*" = ["ANN","D"]
"tests/opentrons/data/*" = ["ANN","D"]
"tests/opentrons/drivers/*" = ["ANN","D"]
"tests/opentrons/hardware_control/*" = ["ANN","D"]
"tests/opentrons/protocol_api_old/*" = ["ANN","D"]
"tests/opentrons/protocols/*" = ["ANN","D"]
"tests/opentrons/system/*" = ["ANN","D"]
"tests/opentrons/tools/*" = ["ANN","D"]
"tests/opentrons/util/test_async_helpers.py" = ["ANN","D"]
"tests/opentrons/util/test_linal.py" = ["ANN","D"]
"tests/opentrons/util/test_entrypoint_util.py" = ["ANN","D"]
"integration_testing/*" = ["T201"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
max-complexity = 9
[tool.ruff.format]
exclude = ["docs/v2/example_protocols/*", "src/opentrons/_version.py"]
[tool.ruff.lint.isort]
known-first-party = ["opentrons_shared_data", "opentrons_hardware"]
known-local-folder = ["opentrons"]
[tool.uv]
exclude-newer = "1 week"
# local editable sources satisfying the 0.0.0 placeholders
[tool.uv.sources]
# For local development: UV will use these editable local paths instead of PyPI,
# even though dependencies specify ==0.0.0. This allows for immediate local changes.
# The hatch-dependency-coversion plugin will rewrite ==0.0.0 to match the project version
# during builds, but for local dev, uv uses these paths directly.
opentrons-shared-data = { path = "../shared-data", editable = true }
opentrons-hardware = { path = "../hardware", editable = true }
performance-metrics = { path = "../performance-metrics", editable = true }
[tool.hatch.build.hooks.vcs-tunable]
version-file="src/opentrons/_version.py"
tag-pattern='v(?P<version>.*)'
fallback_version='0.0.0-dev'
[tool.hatch.version]
source = 'vcs-tunable'
[tool.hatch.version.raw-options]
root = '..'
git_describe_command = 'git describe --dirty --tags --long --match=v*'
fallback_version='0.0.0-dev'
# Note: these are required for setuptools_scm to not automatically bump the version used in the package
# from the latest version it detects. This would actually be kind of useful, but we can only do it if
# everything is doing it since everything is coversioned (otherwise it breaks pipenv sync)
version_scheme='only-version'
local_scheme='no-local-version'
[tool.hatch.build.targets.sdist]
include = ['src/opentrons', 'LICENSE', 'tests', 'uv.lock']
[tool.hatch.build.targets.wheel]
packages = ['src/opentrons']
[tool.hatch.build.targets.wheel.force_include]
'LICENSE' = 'opentrons/LICENSE'
[tool.pytest]
addopts = ["-m", "not stackup_testing", "--color=yes", "--strict-markers"]
asyncio_mode = "auto"
markers = [
"apiv2_non_pe_only: This test invocation requires a legacy PAPI context, not backed by Protocol Engine",
"ot2_only: Test only functions using the OT2 hardware",
"ot3_only: Test only functions using the OT3 hardware",
"stackup_testing: marks tests as stackup regression tests",
]
filterwarnings = [
"error::pydantic.PydanticDeprecatedSince20",
]
[tool.mypy]
plugins = ["pydantic.mypy", "decoy.mypy", "numpy.typing.mypy_plugin"]
show_error_codes = true
warn_unused_configs = true
strict = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[[tool.mypy.overrides]]
module = [
"Pyro5.*",
"serpent"
]
follow_untyped_imports = true