|
| 1 | +[build-system] |
| 2 | +requires = ["setuptools>=61.2"] |
| 3 | +build-backend = "setuptools.build_meta" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "pymodbus" |
| 7 | +dynamic = ["version"] |
| 8 | +license = {text = "BSD-3-Clause"} |
| 9 | +authors = [{name = '"Galen Collins'}, {name = 'Jan Iversen"'}] |
| 10 | +maintainers = [{name = '"dhoomakethu'}, {name = 'janiversen"'}] |
| 11 | +description = "A fully featured modbus protocol stack in python" |
| 12 | +keywords = ["modbus", "asyncio", "scada", "client", "server", "simulator"] |
| 13 | +readme = "README.rst" |
| 14 | +classifiers = [ |
| 15 | + "Development Status :: 5 - Production/Stable", |
| 16 | + "Environment :: Console", |
| 17 | + "Framework :: AsyncIO", |
| 18 | + "Intended Audience :: Developers", |
| 19 | + "License :: OSI Approved :: BSD License", |
| 20 | + "Operating System :: POSIX :: Linux", |
| 21 | + "Operating System :: Unix", |
| 22 | + "Operating System :: MacOS :: MacOS X", |
| 23 | + "Operating System :: OS Independent", |
| 24 | + "Operating System :: Microsoft", |
| 25 | + "Programming Language :: Python :: 3.8", |
| 26 | + "Programming Language :: Python :: 3.9", |
| 27 | + "Programming Language :: Python :: 3.10", |
| 28 | + "Programming Language :: Python :: 3.11", |
| 29 | + "Topic :: System :: Networking", |
| 30 | + "Topic :: Utilities", |
| 31 | +] |
| 32 | +requires-python = ">=3.8.0" |
| 33 | + |
| 34 | +[project.urls] |
| 35 | +Homepage = "https://github.com/pymodbus-dev/pymodbus/" |
| 36 | +"Source Code" = "https://github.com/pymodbus-dev/pymodbus" |
| 37 | +"Bug Reports" = "https://github.com/pymodbus-dev/pymodbus/issues" |
| 38 | +"Docs: Dev" = "https://pymodbus.readthedocs.io/en/latest/?badge=latest" |
| 39 | +Discord = "https://discord.gg/vcP8qAz2" |
| 40 | + |
| 41 | +[project.scripts] |
| 42 | +"pymodbus.console" = "pymodbus.repl.client.main:main" |
| 43 | +"pymodbus.server" = "pymodbus.repl.server.main:app" |
| 44 | +"pymodbus.simulator" = "pymodbus.server.simulator.main:main" |
| 45 | + |
| 46 | +[project.optional-dependencies] |
| 47 | +serial = [ |
| 48 | + "pyserial>=3.5" |
| 49 | +] |
| 50 | +repl = [ |
| 51 | + "aiohttp>=3.8.6", |
| 52 | + "typer[all]>=0.7.0", |
| 53 | + "prompt-toolkit>=3.0.36", |
| 54 | + "pygments>=2.15.0", |
| 55 | + "click>=8.0.0" |
| 56 | +] |
| 57 | +simulator = [ |
| 58 | + "aiohttp>=3.8.6" |
| 59 | +] |
| 60 | +documentation = [ |
| 61 | + "recommonmark>=0.7.1", |
| 62 | + "Sphinx>=5.3.0", |
| 63 | + "sphinx-rtd-theme>=1.1.1" |
| 64 | +] |
| 65 | +development = [ |
| 66 | + "codespell>=2.2.2", |
| 67 | + "coverage>=7.1.0", |
| 68 | + "pre-commit>=3.1.1", |
| 69 | + "pyflakes>=3.0.1", |
| 70 | + "pydocstyle>=6.3.0", |
| 71 | + "pycodestyle>=2.10.0", |
| 72 | + "pylint>=2.17.2", |
| 73 | + "pytest>=7.3.1", |
| 74 | + "pytest-asyncio>=0.20.3", |
| 75 | + "pytest-cov>=4.1.0", |
| 76 | + "pytest-timeout>=2.1.0", |
| 77 | + "pytest-xdist>=3.3.1", |
| 78 | + "ruff>=0.0.287", |
| 79 | + "twine>=4.0.2", |
| 80 | + "types-Pygments", |
| 81 | + "types-pyserial" |
| 82 | +] |
| 83 | +all = [ |
| 84 | + # "pymodbus[serial]", |
| 85 | + "pyserial>=3.5", |
| 86 | + # "pymodbus[repl]", |
| 87 | + "aiohttp>=3.8.6", |
| 88 | + "typer[all]>=0.7.0", |
| 89 | + "prompt-toolkit>=3.0.36", |
| 90 | + "pygments>=2.15.0", |
| 91 | + "click>=8.0.0", |
| 92 | + # "pymodbus[simulator]", |
| 93 | + "aiohttp>=3.8.6", |
| 94 | + # "pymodbus[documentation]", |
| 95 | + "recommonmark>=0.7.1", |
| 96 | + "Sphinx>=5.3.0", |
| 97 | + "sphinx-rtd-theme>=1.1.1", |
| 98 | + # "pymodbus[dev]", |
| 99 | + "codespell>=2.2.2", |
| 100 | + "coverage>=7.1.0", |
| 101 | + "pre-commit>=3.1.1", |
| 102 | + "pyflakes>=3.0.1", |
| 103 | + "pydocstyle>=6.3.0", |
| 104 | + "pycodestyle>=2.10.0", |
| 105 | + "pylint>=2.17.2", |
| 106 | + "pytest>=7.3.1", |
| 107 | + "pytest-asyncio>=0.20.3", |
| 108 | + "pytest-cov>=4.1.0", |
| 109 | + "pytest-timeout>=2.1.0", |
| 110 | + "pytest-xdist>=3.3.1", |
| 111 | + "ruff>=0.0.287", |
| 112 | + "twine>=4.0.2", |
| 113 | + "types-Pygments", |
| 114 | + "types-pyserial" |
| 115 | +] |
| 116 | + |
| 117 | +[tool.setuptools] |
| 118 | +include-package-data = true |
| 119 | +zip-safe = true |
| 120 | +platforms = ["'Linux'", "'Mac OS X'", "'Win'"] |
| 121 | + |
| 122 | +[tool.setuptools.exclude-package-data] |
| 123 | +pymodbus = [ |
| 124 | + "examples", |
| 125 | + "test", |
| 126 | + "doc", |
| 127 | +] |
| 128 | + |
| 129 | +[tool.setuptools.package-data] |
| 130 | +pymodbus = [ |
| 131 | + "py.typed", |
| 132 | + "server/simulator/setup.json", |
| 133 | + "server/simulator/web/**/*" |
| 134 | +] |
| 135 | + |
| 136 | +[tool.setuptools.packages.find] |
| 137 | +include = ["pymodbus*"] |
| 138 | +namespaces = false |
| 139 | + |
| 140 | +[tool.setuptools.dynamic] |
| 141 | +version = {attr = "pymodbus.__version__"} |
| 142 | + |
| 143 | +[tool.pylint.main] |
| 144 | +ignore-paths = [ |
| 145 | + "pymodbus/transport/serial_asyncio", |
| 146 | + "doc" |
| 147 | +] |
| 148 | +ignore-patterns = '^\.#' |
| 149 | +persistent = "no" |
| 150 | +load-plugins = [ |
| 151 | + "pylint.extensions.bad_builtin", |
| 152 | + "pylint.extensions.check_elif", |
| 153 | + "pylint.extensions.code_style", |
| 154 | + "pylint.extensions.comparison_placement", |
| 155 | + "pylint.extensions.confusing_elif", |
| 156 | + "pylint.extensions.docparams", |
| 157 | + "pylint.extensions.docstyle", |
| 158 | + "pylint.extensions.eq_without_hash", |
| 159 | + "pylint.extensions.for_any_all", |
| 160 | + "pylint.extensions.overlapping_exceptions", |
| 161 | + "pylint.extensions.private_import", |
| 162 | + "pylint.extensions.set_membership", |
| 163 | + "pylint.extensions.typing" |
| 164 | +] |
| 165 | +jobs = "0" |
| 166 | +py-version = "3.8" |
| 167 | + |
| 168 | +[tool.pylint.messages_control] |
| 169 | +enable = "all" |
| 170 | +disable = [ |
| 171 | + "duplicate-code", # TBD |
| 172 | + "file-ignored", # ONLY to be used with extreme care. |
| 173 | + "format", # NOT wanted, handled by black |
| 174 | + "locally-disabled", # NOT wanted |
| 175 | + "suppressed-message" # NOT wanted""" |
| 176 | +] |
| 177 | + |
| 178 | +[tool.pylint.reports] |
| 179 | +output-format = "text" |
| 180 | + |
| 181 | +[tool.pylint.logging] |
| 182 | +logging-format-style = "new" |
| 183 | + |
| 184 | +[tool.pylint.similarities] |
| 185 | +ignore-imports = "no" |
| 186 | +ignore-signatures = "no" |
| 187 | + |
| 188 | +[tool.pylint.variables] |
| 189 | +dummy-variables-rgx = "" |
| 190 | + |
| 191 | +[tool.pylint.format] |
| 192 | +max-module-lines = "2000" |
| 193 | + |
| 194 | +[tool.pylint.basic] |
| 195 | +good-names = "i,j,k,rr,fc,rq,fd,x,_" |
| 196 | +attr-rgx = "([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$" |
| 197 | +method-rgx = "[a-z_][a-zA-Z0-9_]{2,}$" |
| 198 | + |
| 199 | +[tool.pylint.design] |
| 200 | +max-args = "10" |
| 201 | +max-locals = "25" |
| 202 | +max-returns = "11" |
| 203 | +max-branches = "27" |
| 204 | +max-statements = "100" |
| 205 | +max-attributes = "20" |
| 206 | +max-public-methods = "25" |
| 207 | + |
| 208 | +[tool.pylint.classes] |
| 209 | +valid-metaclass-classmethod-first-arg = "mcs" |
| 210 | + |
| 211 | +[tool.pylint.imports] |
| 212 | +deprecated-modules = "regsub,TERMIOS,Bastion,rexec" |
| 213 | + |
| 214 | +[tool.pylint.exceptions] |
| 215 | +overgeneral-exceptions = "builtins.Exception" |
| 216 | + |
| 217 | +[tool.pylint.deprecated_builtins] |
| 218 | +bad-functions = "map,input" |
| 219 | + |
| 220 | +[tool.mypy] |
| 221 | +strict_optional = false |
| 222 | +exclude = "pymodbus/client/base.py" |
| 223 | +show_error_codes = true |
| 224 | +local_partial_types = true |
| 225 | +strict_equality = true |
| 226 | +warn_incomplete_stub = true |
| 227 | +warn_redundant_casts = true |
| 228 | +warn_unused_configs = true |
| 229 | +warn_unused_ignores = true |
| 230 | +enable_error_code = "ignore-without-code, redundant-self, truthy-iterable" |
| 231 | +disable_error_code = ["annotation-unchecked"] |
| 232 | +strict_concatenate = false |
| 233 | +disallow_subclassing_any = true |
| 234 | +disallow_untyped_decorators = true |
| 235 | +warn_unreachable = true |
| 236 | + |
| 237 | +[tool.distutils] |
| 238 | +bdist_wheel = {} |
| 239 | + |
| 240 | +[tool.distutils.egg_info] |
| 241 | +tag-svn-revision = false |
| 242 | + |
| 243 | +[tool.distutils.upload_docs] |
| 244 | +upload-dir = "build/sphinx/html" |
| 245 | + |
| 246 | +[tool.build-sphinx] |
| 247 | +source-dir = "doc/sphinx/" |
| 248 | +build-dir = "doc/sphinx/build" |
| 249 | +all_files = "1" |
| 250 | + |
| 251 | +[tool.pytest.ini_options] |
| 252 | +testpaths = ["test"] |
| 253 | +addopts = "-p no:warnings --dist loadscope --numprocesses auto" |
| 254 | +asyncio_mode = "auto" |
| 255 | +timeout = 40 |
| 256 | + |
| 257 | +[tool.coverage.run] |
| 258 | +include = [ |
| 259 | + "examples/", |
| 260 | + "pymodbus/", |
| 261 | + "test/", |
| 262 | +] |
| 263 | +omit = ["examples/contrib/"] |
| 264 | + |
| 265 | +[tool.codespell] |
| 266 | +skip = "./doc/_build,./doc/source/_static,venv,.venv,.git,htmlcov,CHANGELOG.rst,.mypy_cache" |
| 267 | +ignore-words-list = "asend" |
0 commit comments