-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
157 lines (144 loc) · 5.56 KB
/
pyproject.toml
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
[tool.black]
extend_exclude = '\.tox/|_pb2(_grpc)?\.(py|pyi)$|ni_measurement_plugin_sdk_generator/|examples/|third_party/'
line-length = 100
[tool.ni-python-styleguide]
extend_exclude = '.tox/,*_pb2_grpc.py,*_pb2_grpc.pyi,*_pb2.py,*_pb2.pyi,ni_measurement_plugin_sdk_generator/,examples/,third_party/'
[tool.poetry]
name = "ni_measurement_plugin_sdk_service"
version = "2.0.0-dev1"
description = "Measurement Plugin Support for Python"
authors = ["NI <[email protected]>"]
readme = "README.md" # apply the repo readme to the package as well
repository = "https://github.com/ni/measurementlink-python/"
license = "MIT"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"Operating System :: Microsoft :: Windows",
# Poetry automatically adds classifiers for the license and the supported Python versions.
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: System :: Hardware",
]
[tool.poetry.dependencies]
python = "^3.8"
# This package includes gRPC stubs that were generated with the version of grpcio-tools specified
# below. Please keep the minimum grpcio version in sync with the grpcio-tools version. Otherwise,
# the generated gRPC stubs may not work with the minimum grpcio version.
grpcio = "^1.49.1"
protobuf = "^4.21"
pywin32 = {version = ">=303", platform = "win32"}
deprecation = ">=2.1"
# https://github.com/microsoft/tracelogging/issues/58 - traceloggingdynamic raises TypeError with Python 3.8
traceloggingdynamic = {version = ">=1.0", platform = "win32", python = "^3.9"}
python-decouple = ">=3.8"
nidaqmx = {version = ">=0.8.0", extras = ["grpc"], optional = true}
nidcpower = {version = ">=1.4.4", extras = ["grpc"], optional = true}
nidigital = {version = ">=1.4.4", extras = ["grpc"], optional = true}
nidmm = {version = ">=1.4.4", extras = ["grpc"], optional = true}
nifgen = {version = ">=1.4.4", extras = ["grpc"], optional = true}
niscope = {version = ">=1.4.4", extras = ["grpc"], optional = true}
niswitch = {version = ">=1.4.4", extras = ["grpc"], optional = true}
[tool.poetry.extras]
drivers = ["nidaqmx", "nidcpower", "nidigital", "nidmm", "nifgen", "niscope", "niswitch"]
nidaqmx = ["nidaqmx"]
nidcpower = ["nidcpower"]
nidigital = ["nidigital"]
nidmm = ["nidmm"]
nifgen = ["nifgen"]
niscope = ["niscope"]
niswitch = ["niswitch"]
[tool.poetry.group.dev.dependencies]
pytest = ">=7.2.0"
ni-python-styleguide = ">=0.4.1"
# When you update the grpcio-tools version, you should update the minimum grpcio version
# and regenerate gRPC stubs.
grpcio-tools = [
{version = "1.49.1", python = ">=3.8,<3.12"},
{version = "1.59.0", python = "^3.12"},
]
pytest-cov = ">=3.0.0"
pytest-mock = ">=3.0"
tox = ">=4.0"
mypy = ">=1.0"
mypy-protobuf = ">=3.4"
types-protobuf = "^4.21"
types-pkg-resources = "*"
types-pywin32 = ">=304"
grpc-stubs = "^1.53"
psutil = ">=5.9"
types-psutil = ">=5.9"
# NumPy dropped support for Python 3.8 before adding support for Python 3.12, so
# we need to include multiple NumPy versions in poetry.lock.
numpy = [
{version = ">=1.22", python = ">=3.8,<3.12"},
{version = ">=1.26", python = ">=3.12,<3.13"},
]
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = [
{version = ">=7.1.2", python = ">=3.8,<3.9"},
{version = ">=7.2.0", python = ">=3.9,<3.13"},
]
sphinx-rtd-theme = ">=1.0.0"
sphinx-autoapi = ">=1.8.4"
m2r2 = ">=0.3.2"
toml = ">=0.10.2"
tomlkit = ">=0.11.0"
sphinx-click = ">=4.1.0"
# Workaround to docutils error with 0.21.post1 release
docutils = ">=0.16, !=0.21.post1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = "--doctest-modules --strict-markers"
filterwarnings = ["always::ImportWarning", "always::ResourceWarning"]
testpaths = ["tests"]
markers = [
"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.",
"service_class: specifies which test service to use.",
"use_code_readiness: specifies a code readiness level to use for the test function/module.",
]
[tool.mypy]
disallow_untyped_defs = true
namespace_packages = true
plugins = "numpy.typing.mypy_plugin"
warn_redundant_casts = 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.framework.foundation.*",
# https://github.com/ni/hightime/issues/4 - Add type annotations
"hightime.*",
# https://github.com/microsoft/tracelogging/issues/57 - Python traceloggingdynamic package is missing py.typed marker file
"traceloggingdynamic",
# https://github.com/ni/nidaqmx-python/issues/209 - Support type annotations
"nidaqmx",
# https://github.com/ni/nimi-python/issues/1887 - Support type annotations
"nidcpower",
"nidigital",
"nidmm",
"nifgen",
"niscope",
"niswitch",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# mypy-protobuf codegen has some unused ignores.
module = ["ni_measurement_plugin_sdk_service._internal.stubs.*","tests.utilities.stubs.*"]
warn_unused_ignores = false
[[tool.mypy.overrides]]
# The tests are not yet ready for --disallow-untyped-defs (or even --disallow-incomplete-defs)
module = ["tests.*"]
check_untyped_defs = true
disallow_untyped_defs = false