forked from ChuckBuilds/LEDMatrix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
199 lines (172 loc) · 4.63 KB
/
pyproject.toml
File metadata and controls
199 lines (172 loc) · 4.63 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[project]
name = "ledmatrix"
version = "1.1.0"
description = "LED matrix display controller for Raspberry Pi"
requires-python = ">=3.10"
dependencies = [
# Image processing
"Pillow>=10.4.0,<12.0.0",
"numpy>=1.24.0",
# Timezone handling
"pytz>=2024.2,<2025.0",
"timezonefinder>=6.5.0,<7.0.0",
"geopy>=2.4.1,<3.0.0",
# HTTP requests
"requests>=2.32.0,<3.0.0",
# Google API integration
"google-auth-oauthlib>=1.2.0,<2.0.0",
"google-auth-httplib2>=0.2.0,<1.0.0",
"google-api-python-client>=2.147.0,<3.0.0",
# Font rendering
"freetype-py>=2.5.1,<3.0.0",
# Spotify integration
"spotipy>=2.24.0,<3.0.0",
# Web framework
"fastapi>=0.115.0,<1.0.0",
"uvicorn[standard]>=0.30.0,<1.0.0",
"jinja2>=3.1.0,<4.0.0",
"slowapi>=0.1.9,<1.0.0",
"pydantic-settings>=2.2.0,<3.0.0",
"sse-starlette>=2.0.0,<3.0.0",
"python-multipart>=0.0.9",
# Text processing
"unidecode>=1.3.8,<2.0.0",
# Calendar integration
"icalevents>=0.1.27,<1.0.0",
# WebSocket support
"python-socketio>=5.11.0,<6.0.0",
"python-engineio>=4.9.0,<5.0.0",
"websockets>=12.0,<14.0",
"websocket-client>=1.8.0,<2.0.0",
# JSON Schema validation
"jsonschema>=4.20.0,<5.0.0",
# System monitoring (web interface)
"psutil>=6.0.0,<7.0.0",
# Date/time utilities (web interface)
"python-dateutil>=2.9.0,<3.0.0",
]
[project.optional-dependencies]
emulator = [
"RGBMatrixEmulator",
]
hardware = [
# rpi-rgb-led-matrix can be pip-installed from source:
# pip install git+https://github.com/hzeller/rpi-rgb-led-matrix
# Requires C build tools on Raspberry Pi. Not added as a direct dependency
# because it would fail resolution on non-ARM platforms. Install manually
# on Pi hardware, or use: uv pip install git+https://github.com/hzeller/rpi-rgb-led-matrix
]
dev = [
"ruff>=0.4.0",
"mypy>=1.5.0",
"pre-commit>=3.7.0",
"types-requests",
"types-pytz",
"click>=8.0.0",
"rich>=13.0.0",
"pip-audit==2.7.3",
]
test = [
"pytest>=7.4.0,<9",
"pytest-cov>=4.1.0",
"pytest-mock>=3.11.0",
"click>=8.0.0",
"rich>=13.0.0",
"httpx>=0.27.0",
]
[tool.pytest.ini_options]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
testpaths = ["test"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-fail-under=30",
]
markers = [
"unit: Unit tests (fast, isolated)",
"integration: Integration tests (slower, may require external services)",
"hardware: Tests that require actual hardware",
"slow: Tests that take a long time to run",
"plugin: Plugin-related tests",
]
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.mypy]
python_version = "3.10"
platform = "linux"
follow_imports = "normal"
ignore_missing_imports = true
show_error_codes = true
warn_unused_ignores = true
warn_unreachable = true
strict_optional = true
disallow_untyped_defs = false
disallow_untyped_calls = false
check_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_unused_configs = true
exclude = "(?x)(^test/|^.*/__pycache__/|^.*\\.pyc$)"
[[tool.mypy.overrides]]
module = "src.*"
disallow_untyped_defs = false
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "src.cache_manager"
disallow_untyped_defs = true
disallow_untyped_calls = true
[[tool.mypy.overrides]]
module = "src.config_manager"
disallow_untyped_defs = true
disallow_untyped_calls = true
[[tool.mypy.overrides]]
module = "src.plugin_system.*"
disallow_untyped_defs = false
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "src.exceptions"
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "src.api.*"
disallow_untyped_defs = true
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = [
"rgbmatrix.*",
"RGBMatrixEmulator.*",
"PIL.*",
"freetype.*",
"pytz.*",
"requests.*",
"google.*",
"spotipy.*",
]
ignore_missing_imports = true
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W", "B", "I"]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # FastAPI uses Depends/File/Form/Query in argument defaults by design
]
[tool.ruff.lint.isort]
known-first-party = ["src"]