-
Notifications
You must be signed in to change notification settings - Fork 938
/
pyproject.toml
319 lines (280 loc) · 7.5 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
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
[build-system]
requires = ["setuptools>=68.2.2"]
build-backend = "setuptools.build_meta"
[project]
name = "pymodbus"
dynamic = ["version"]
license = {text = "BSD-3-Clause"}
authors = [{name = "Galen Collins"}, {name = "Jan Iversen"}]
maintainers = [{name = "dhoomakethu"}, {name = "janiversen"}]
description = "A fully featured modbus protocol stack in python"
keywords = ["modbus", "asyncio", "scada", "client", "server", "simulator"]
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Operating System :: OS Independent",
"Operating System :: Microsoft",
"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",
"Topic :: System :: Networking",
"Topic :: Utilities",
]
requires-python = ">=3.9.0"
[project.urls]
Homepage = "https://github.com/pymodbus-dev/pymodbus/"
"Source Code" = "https://github.com/pymodbus-dev/pymodbus"
"Bug Reports" = "https://github.com/pymodbus-dev/pymodbus/issues"
"Docs: Dev" = "https://pymodbus.readthedocs.io/en/latest/?badge=latest"
Discord = "https://discord.gg/vcP8qAz2"
[project.scripts]
"pymodbus.simulator" = "pymodbus.server.simulator.main:main"
[project.optional-dependencies]
serial = [
"pyserial>=3.5"
]
repl = [
"pymodbus-repl>=2.0.4"
]
simulator = [
"aiohttp>=3.8.6;python_version<'3.12'",
"aiohttp>=3.10.5;python_version>='3.12'"
]
documentation = [
"recommonmark>=0.7.1",
"Sphinx>=7.3.7",
"sphinx-rtd-theme>=2.0.0"
]
development = [
"build>=1.2.2",
"codespell>=2.3.0",
"coverage>=7.6.1",
"mypy>=1.11.2",
"pylint>=3.3.0",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"pytest-cov>=5.0.0",
"pytest-profiling>=1.7.0;python_version<'3.13'",
"pytest-timeout>=2.3.1",
"pytest-xdist>=3.6.1",
"pytest-aiohttp>=1.0.5",
"ruff>=0.5.3",
"twine>=5.1.1",
"types-Pygments",
"types-pyserial"
]
all = [
"pymodbus[serial, repl, simulator, documentation, development]"
]
[tool.setuptools]
include-package-data = true
zip-safe = true
platforms = ["'Linux'", "'Mac OS X'", "'Win'"]
[tool.setuptools.exclude-package-data]
pymodbus = [
"examples",
"test",
"doc",
]
[tool.setuptools.package-data]
pymodbus = [
"py.typed",
"server/simulator/setup.json",
"server/simulator/web/**/*"
]
[tool.setuptools.packages.find]
include = ["pymodbus*"]
namespaces = false
[tool.setuptools.dynamic]
version = {attr = "pymodbus.__version__"}
[tool.pylint.main]
init-hook='import sys; sys.path.append("examples")'
ignore-paths = [
"doc"
]
ignore-patterns = '^\.#'
persistent = "no"
load-plugins = [
"pylint.extensions.bad_builtin",
"pylint.extensions.check_elif",
"pylint.extensions.code_style",
"pylint.extensions.comparison_placement",
"pylint.extensions.confusing_elif",
"pylint.extensions.docparams",
"pylint.extensions.docstyle",
"pylint.extensions.eq_without_hash",
"pylint.extensions.for_any_all",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.private_import",
"pylint.extensions.set_membership",
"pylint.extensions.typing"
]
jobs = "0"
py-version = "3.9"
[tool.pylint.messages_control]
enable = "all"
disable = [
"duplicate-code", # TBD
"file-ignored", # ONLY to be used with extreme care.
"format", # NOT wanted, handled by ruff
"locally-disabled", # NOT wanted
"suppressed-message" # NOT wanted"""
]
[tool.pylint.reports]
output-format = "text"
[tool.pylint.logging]
logging-format-style = "new"
[tool.pylint.similarities]
ignore-imports = "no"
ignore-signatures = "no"
[tool.pylint.variables]
dummy-variables-rgx = ""
[tool.pylint.format]
max-module-lines = "2000"
[tool.pylint.basic]
good-names = "i,j,k,rr,fc,rq,fd,x,_"
attr-rgx = "([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$"
method-rgx = "[a-z_][a-zA-Z0-9_]{2,}$"
[tool.pylint.design]
max-positional = 15
max-args = 10
max-locals = "25"
max-returns = "11"
max-branches = "27"
max-statements = "100"
max-attributes = "20"
max-public-methods = "25"
[tool.pylint.classes]
valid-metaclass-classmethod-first-arg = "mcs"
[tool.pylint.imports]
deprecated-modules = "regsub,TERMIOS,Bastion,rexec"
[tool.pylint.exceptions]
overgeneral-exceptions = "builtins.Exception"
[tool.pylint.deprecated_builtins]
bad-functions = "map,input"
[tool.mypy]
exclude = '/contrib/'
strict_optional = true
show_error_codes = true
local_partial_types = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
enable_error_code = "ignore-without-code, redundant-self, truthy-iterable"
disable_error_code = ["annotation-unchecked"]
strict_concatenate = false
disallow_subclassing_any = true
disallow_untyped_decorators = true
warn_unreachable = true
check_untyped_defs = true
[tool.distutils]
bdist_wheel = {}
[tool.distutils.egg_info]
tag-svn-revision = false
[tool.distutils.upload_docs]
upload-dir = "build/sphinx/html"
[tool.build-sphinx]
source-dir = "doc/sphinx/"
build-dir = "doc/sphinx/build"
all_files = "1"
[tool.pytest.ini_options]
testpaths = ["test"]
addopts = "--cov-report html --durations=10 --dist loadscope --numprocesses auto"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
timeout = 120
[tool.coverage.run]
source = [
"examples/",
"pymodbus/",
"test/",
]
omit = [
"examples/contrib/",
"test/message/to_do*",
"test/message/generator.py",
]
branch = true
[tool.coverage.report]
exclude_also = [
"except ImportError:",
"_check_system_health",
"if __name__ == .__main__.:",
]
skip_covered = true
fail_under = 90.0
[tool.coverage.html]
directory = "build/cov"
[tool.codespell]
skip = "./build,./doc/source/_static,venv,.venv,.git,htmlcov,CHANGELOG.rst,.mypy_cache"
ignore-words-list = "asend"
[tool.ruff]
target-version="py38"
exclude = [
"venv",
".venv",
".git",
"build",
"doc",
"contrib"
]
line-length = 88
# indent-width = 4
[tool.ruff.lint]
ignore = [
"E501", # line too long
"E731", # lambda expressions
"S101", # Use of `assert`
"S311", # PRNG for cryptography
"S104", # binding on all interfaces
"RUF012", # typing.ClassVar
"RUF015" # next(iter(list)) instead of list[0]
]
select = [
"B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception
"C", # complexity
"D", # docstrings
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"PGH", # pygrep-hooks
"PLC", # pylint
"PT", # flake8-pytest-style
"RUF", # ruff builtins
"S", # bandit
"SIM105", # flake8-simplify
"SIM117", #
"SIM118", #
"SIM201", #
"SIM212", #
"SIM300", #
"SIM401", #
"UP", # pyupgrade
"W", # pycodestyle warnings
# "TRY", # tryceratops
"TRY004", # Prefer TypeError exception for invalid type
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.isort]
lines-after-imports = 2
known-local-folder = []
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"