forked from ni/nidaqmx-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
221 lines (199 loc) · 7.96 KB
/
pyproject.toml
File metadata and controls
221 lines (199 loc) · 7.96 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
[project]
name = "nidaqmx"
description = "NI-DAQmx Python API"
license = "MIT"
keywords = ["nidaqmx", "nidaq", "daqmx", "daq"]
version = "1.5.0.dev0"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: System :: Hardware :: Hardware Drivers",
]
dynamic = ["dependencies"]
readme = "README.rst"
authors = [{name = "NI", email = "opensource@ni.com"}]
maintainers = [
{name = "Zach Hindes", email = "zach.hindes@ni.com"},
{name = "Maxx Boehme", email = "maxx.boehme@ni.com"},
{name = "Brad Keryan", email = "brad.keryan@ni.com"},
]
requires-python = '>=3.9,<4.0'
[project.urls]
repository = "https://github.com/ni/nidaqmx-python"
documentation = "https://nidaqmx-python.readthedocs.io"
[project.scripts]
nidaqmx = 'nidaqmx.__main__:main'
[project.optional-dependencies]
grpc = ['grpcio (>=1.49.0,<2.0)', 'protobuf (>=4.21)', 'ni-grpcdevice-v1-proto (>=1.0.0)', 'ni-protobuf-types (>=1.0.0)']
[tool.poetry]
exclude = ["nidaqmx/tests"]
packages = [{ include = "nidaqmx", from = "generated" }]
requires-poetry = '>=2.1,<3.0'
[tool.poetry.dependencies]
# NumPy 2.0.x is the last version that supports Python 3.9, but it crashes with Python 3.13.
numpy = [
{ version = ">=1.22", python = ">=3.9,<3.13" },
{ version = ">=2.1", python = "^3.13" }
]
deprecation = ">=2.1"
hightime = ">=0.2.2"
tzlocal = "^5.0"
python-decouple = ">=3.8"
click = ">=8.0.0"
distro = { version = ">=1.9.0", platform = "linux" }
requests = ">=2.25.0"
typing_extensions = { version = ">=4.0.0" }
nitypes = {version=">=1.0.1"}
[tool.poetry.group.codegen.dependencies]
Mako = "^1.2"
grpcio-tools = [
# requires protobuf v4 or later
{ version = "1.49.1", python = ">=3.9,<3.12" },
{ version = "1.59.0", python = ">=3.12,<3.13" },
# requires protobuf v5 or later
{ version = "1.67.0", python = ">=3.13,<3.14" },
# requires protobuf v6 or later
{ version = "1.75.1", python = "^3.14" },
]
# mypy-protobuf 3.6 is the last version that supports protobuf v4.
mypy-protobuf = [
# requires protobuf v4 or later
{version = ">=3.4,<3.7", python = ">=3.9,<3.14"},
# requires protobuf v6 or later
{version = ">=3.4", python = "^3.14"}
]
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
# The latest Sphinx requires a recent Python version.
Sphinx = [
{ version = ">=8.1", python = ">=3.10,<3.11" },
{ version = ">=8.2", python = "^3.11" },
]
sphinx-rtd-theme = ">=1.0.0"
toml = ">=0.10.2"
[tool.poetry.group.examples]
# The "examples" group is optional because matplotlib does not distribute wheels for 32-bit Windows.
optional = true
[tool.poetry.group.examples.dependencies]
matplotlib = [
{ version = ">=3.9.0,<3.10.0", python = ">=3.9,<3.10" },
{ version = ">=3.9.0", python = "^3.10" },
]
nptdms = ">=1.9.0"
[tool.poetry.group.lint.dependencies]
bandit = { version = ">=1.7", extras = ["toml"] }
ni-python-styleguide = ">=0.4.1"
mypy = { version = ">=1.0", markers = "implementation_name != 'pypy'" }
types-protobuf = ">=4.21"
types-requests = ">=2.25.0"
types-grpcio = ">=1.0"
[tool.poetry.group.test.dependencies]
pytest = ">=7.2"
pytest-benchmark = ">=5.1"
pytest-cov = ">=4.0"
pytest-mock = ">=3.0"
pykka = ">=3.0"
tox = ">=3.24"
click = [
{ version = ">=8.0.0,<8.2.0", python = ">=3.9,<3.10" },
{ version = ">=8.0.0", python = "^3.10" },
]
# Specify additional NumPy version constraints to speed up locking and test with binary wheels that support PyPy.
numpy = [
{ version = ">=1.22", python = ">=3.9,<3.12", markers = "implementation_name != 'pypy'" },
{ version = ">=1.26", python = ">=3.12,<3.13", markers = "implementation_name != 'pypy'" },
{ version = ">=2.1", python = "^3.13", markers = "implementation_name != 'pypy'" },
{ version = ">=2.1", python = ">=3.10,<3.11", markers = "implementation_name == 'pypy'" },
{ version = ">=2.3", python = "^3.11", markers = "implementation_name == 'pypy'" },
]
[tool.black]
line-length = 100
extend_exclude = ".tox/|docs/|generated/|src/codegen/metadata/|src/codegen/templates/|third_party/"
[tool.ni-python-styleguide]
extend_exclude = ".tox,docs,generated,src/codegen/metadata,src/codegen/templates,third_party"
application-import-names = "nidaqmx"
[tool.pytest.ini_options]
addopts = "--doctest-modules --strict-markers"
filterwarnings = ["always::ImportWarning", "always::ResourceWarning"]
testpaths = ["tests/acceptance", "tests/component", "tests/legacy", "tests/unit"]
markers = [
# Defines custom markers used by nidaqmx tests. Prevents PytestUnknownMarkWarning.
"library_only(reason=...): run the test with only the library interpreter implementation.",
"library_skip(reason=...): skip the given test function with the library interpreter implementation.",
"library_xfail(condition, ..., *, reason=..., run=True, raises=None, strict=xfail_strict): mark the test function as an expected failure with the library interpreter implementation.",
"grpc_only(reason=...): run the test with only the gRPC interpreter implementation.",
"grpc_skip(reason=...): skip the given test function with the gRPC interpreter implementation.",
"grpc_xfail(condition, ..., *, reason=..., run=True, raises=None, strict=xfail_strict): mark the test function as an expected failure with the gRPC interpreter implementation.",
"new_task_name: name of the new task to be created.",
"device_name: name of the device used for testing.",
"task_name: the existing task name to be used for testing.",
"channel_name: the existing channel name to be used for testing.",
"scale_name: the existing scale name to be used for testing.",
"timeout: the timeout in seconds.",
"grpc_session_name: specifies GrpcSessionOptions.session_name.",
"grpc_session_initialization_behavior: specifies GrpcSessionOptions.initialization_behavior.",
"temporary_grpc_channel(options=...): specifies that the test uses a separate gRPC channel.",
"disable_feature_toggle: specifies a feature toggle to disable for the test function/module.",
"enable_feature_toggle: specifies a feature toggle to enable for the test function/module.",
"use_code_readiness: specifies a code readiness level to use for the test function/module.",
]
[build-system]
requires = ["poetry-core>=2.1,<3.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
files = "examples/,generated/,tests/"
check_untyped_defs = true
namespace_packages = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
# https://github.com/HBNetwork/python-decouple/issues/122 - Add support for type stubs
"decouple.*",
# https://github.com/briancurtin/deprecation/issues/56 - Add type information (PEP 561)
"deprecation.*",
"grpc.experimental.*",
"importlib_metadata",
"mako.*",
"nidaqmx.*",
# https://github.com/ionelmc/pytest-benchmark/issues/212 - Add type annotations
"pytest_benchmark.*",
# https://github.com/adamreeve/npTDMS/issues/301 - Type Hints/Annotations
"nptdms.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# mypy-protobuf codegen has some unused ignores.
module = ["nidaqmx._stubs.*"]
warn_unused_ignores = false
[tool.pyright]
typeCheckingMode = "basic"
reportArgumentType = false
reportAttributeAccessIssue = false
reportGeneralTypeIssues = false
reportInvalidTypeForm = false
reportOperatorIssue = false
reportOptionalIterable = false
reportOptionalMemberAccess = false
reportReturnType = false
[tool.bandit]
skips = [
"B101", # assert_used
]