Files
meshcore-mqtt/pyproject.toml
2025-08-16 21:45:38 +01:00

132 lines
2.8 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "meshcore-mqtt"
version = "0.1.0"
description = "A bridge between MeshCore devices and MQTT brokers"
readme = "README.md"
authors = [{name = "MeshCore MQTT Bridge", email = "contact@example.com"}]
license = {text = "GPL-3.0"}
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.11"
dependencies = [
"paho-mqtt>=2.0.0",
"click>=8.0.0",
"pydantic>=2.0.0",
"meshcore>=2.0.0",
"PyYAML>=6.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=1.0.0",
"pytest-cov>=4.0.0",
"flake8>=6.0.0",
"black>=23.0.0",
"mypy>=1.0.0",
"isort>=5.0.0",
"bandit>=1.7.0",
"safety>=2.0.0",
"pre-commit>=3.0.0",
"build>=0.10.0",
"twine>=4.0.0",
"types-PyYAML>=6.0.0",
"types-pyserial>=3.5.0",
]
[project.scripts]
meshcore-mqtt = "meshcore_mqtt.main:main"
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = "meshcore.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "yaml.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_decorators = false
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
asyncio_mode = "auto"
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["meshcore_mqtt"]
known_third_party = ["paho", "meshcore", "click", "pydantic", "yaml"]
[tool.bandit]
exclude_dirs = ["tests", "venv", ".venv"]
skips = ["B101"] # Skip assert_used test
[tool.coverage.run]
source = ["meshcore_mqtt"]
omit = [
"*/tests/*",
"*/venv/*",
"*/.venv/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
show_missing = true
precision = 2