-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (142 loc) · 4.24 KB
/
pyproject.toml
File metadata and controls
157 lines (142 loc) · 4.24 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
[project]
name = "boneio"
description = "Python App for BoneIO"
readme = "README.md"
dynamic = ["version"]
authors = [
{ name = "Paweł Szafer", email = "pszafer@gmail.com" },
]
dependencies = [
"smbus2==0.4.3",
"aiomqtt==2.4.0",
"aiohttp==3.13.3",
"Cerberus==1.3.7",
"colorlog==6.9.0",
"luma-core==2.5.1",
"luma-oled==3.14.0",
"pymodbus==3.11.3",
"pyserial-asyncio-fast==0.16",
"PyYAML==6.0.3",
"psutil==7.1.0",
"w1thermsensor[async]==2.3.0",
"fastapi==0.118.0",
"pydantic==2.11.9",
"hypercorn==0.17.3",
"websockets==15.0.1",
"python-jose[cryptography]==3.5.0",
"python-multipart==0.0.22",
"qrcode==8.2",
"gpiod==2.3.0",
"requests==2.32.5",
"packaging==25.0",
"aioesphomeapi>=29.0.0",
"zeroconf>=0.148.0",
"canopen-asyncio>=2.4.1",
]
requires-python = ">=3.13"
license = { text = "GNU General Public License v3.0" }
[project.urls]
Homepage = "https://boneio.eu"
Repository = "https://github.com/boneIO-eu/app_bbb"
Documentation = "https://boneio.eu/docs/intro/"
Changelog = "https://github.com/boneIO-eu/app_bbb/releases"
[project.scripts]
boneio = "boneio.bonecli:main"
[tool.pdm.dev-dependencies]
dev = [
"ruff>=0.15.0",
"pre-commit>=4.3.0",
"bandit>=1.8.6",
"setuptools>=80.9.0",
]
test = [
"pytest>=9.0.1",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
]
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["boneio*"]
[tool.setuptools.package-data]
"*" = ["*.json", "*.yaml", "*.yml", "*.ttf", "*.sh"]
"boneio.webui" = ["frontend-dist/**/*"]
"boneio.migrations" = [
"assets/**/*",
"assets/MANIFEST.sha256",
"bootstrap/boneio-migrate",
"bootstrap/sudoers-migrate",
"bootstrap/install-helper.sh",
]
[tool.setuptools.dynamic]
version = {attr = "boneio.version.__version__"}
[tool.ruff]
target-version = "py313"
line-length = 120
[tool.ruff.lint]
# E = pycodestyle errors, F = pyflakes, I = isort, UP = pyupgrade, B = bugbear
select = ["E", "F", "I", "UP", "B", "SIM"]
# Pragmatic ignores for existing codebase
ignore = [
"E402", # module import not at top — intentional in bonecli (boot timing)
"E501", # line too long — handled by formatter
"E741", # ambiguous variable name (l, O, I)
"F401", # unused imports — too many false positives during refactoring
"F841", # local variable assigned but never used
"B008", # function call in default argument
"B905", # zip without strict
"SIM108", # use ternary operator — readability preference
"UP007", # use X | Y for union — we already use it but some old code doesn't
]
[tool.ruff.lint.isort]
known-first-party = ["boneio"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
[tool.pdm.scripts]
lint = "ruff check boneio/"
format = "ruff format boneio/"
fix = "ruff check --fix boneio/"
manifest = "python scripts/generate_manifest.py"
[tool.pyright]
# BasedPyRight configuration - compatibility mode with PyRight
include = ["boneio", "tests"]
exclude = ["**/__pycache__", "**/node_modules"]
extraPaths = ["."]
# Use PyRight compatibility mode for fewer warnings
typeCheckingMode = "basic"
# Disable some strict checks for better compatibility
reportMissingTypeStubs = false
reportUnknownMemberType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportUnknownLambdaType = false
reportUnknownArgumentType = false
reportUntypedFunctionDecorator = false
reportUntypedClassDef = false
reportUntypedFunctionDef = false
reportUntypedMethodSignature = false
reportUntypedProperty = false
reportUntypedNamedTuple = false
reportPrivateImportUsage = false
# Enable Python 3.13 features
pythonVersion = "3.13"
pythonPlatform = "Linux"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"hardware: tests requiring real hardware (deselect with '-m not hardware')",
"slow: slow running tests (deselect with '-m not slow')",
"integration: integration tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
addopts = "-v --tb=short"