-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (156 loc) · 5.14 KB
/
pyproject.toml
File metadata and controls
172 lines (156 loc) · 5.14 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
[project]
name = "blocksd"
version = "0.4.0"
description = "Linux daemon for ROLI Blocks devices — keeps them alive, controls LEDs, manages topology"
readme = "README.md"
license = "ISC"
requires-python = ">=3.13"
authors = [{ name = "Stefanie Jane", email = "stef@hyperbliss.tech" }]
keywords = ["roli", "blocks", "midi", "lightpad", "seaboard", "linux", "daemon"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: ISC License (ISCL)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio :: MIDI",
"Topic :: System :: Hardware :: Hardware Drivers",
]
dependencies = [
"python-rtmidi>=1.5.8",
"typer>=0.15",
"rich>=13.9",
"pydantic>=2.10",
]
[dependency-groups]
dev = [
"pytest>=9.0",
"pytest-asyncio>=1.3",
"pytest-cov>=7.0",
"hypothesis>=6.120",
"ruff>=0.14",
"ty>=0.0.10",
"pre-commit>=4.0",
]
[project.scripts]
blocksd = "blocksd.cli.app:app"
[project.urls]
Homepage = "https://github.com/hyperb1iss/blocksd"
Repository = "https://github.com/hyperb1iss/blocksd"
Issues = "https://github.com/hyperb1iss/blocksd/issues"
Changelog = "https://github.com/hyperb1iss/blocksd/releases"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/blocksd"]
[tool.ruff]
target-version = "py313"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W", "F", # pycodestyle + pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # comprehensions
"N", # pep8-naming
"UP", # pyupgrade
"A", # flake8-builtins
"SIM", # simplify
"TCH", # type-checking
"RUF", # ruff-specific
"ASYNC", # flake8-async
"PT", # pytest-style
"S", # security (bandit)
"PL", # pylint
"TRY", # tryceratops
"T20", # print statements
"ARG", # unused-arguments
"RET", # flake8-return
"RSE", # flake8-raise
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"BLE", # blind-except
"DTZ", # datetimez
"G", # logging-format
"SLF", # private-member-access
"COM", # commas
]
ignore = [
"E501", # line too long (formatter handles)
"COM812", # trailing comma (formatter conflicts)
"ISC001", # implicit string concat (formatter conflicts)
"PLR0913", # too many arguments
"PLR2004", # magic value in comparison
"S101", # assert (needed for tests)
"TRY003", # long exception messages
"PLC0415", # import-outside-top-level (TYPE_CHECKING blocks)
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0915", # too many statements
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert allowed in tests
"S324", # SHA1 required by WebSocket RFC 6455 in test
"ARG001", # unused function args (fixtures)
"ARG002", # unused method args (mock overrides)
"PLR2004", # magic values in tests
"PLW0108", # lambda used for mock compat
"SLF001", # private member access in tests
"PT011", # pytest.raises too broad
"PT018", # composite assertions
"PT019", # fixture without value as parameter
"ASYNC109", # timeout param in mock async (intentional)
]
"src/blocksd/api/server.py" = [
"BLE001", # broad except in event loop error boundaries (intentional)
"S108", # /tmp fallback path (XDG_RUNTIME_DIR preferred)
]
"src/blocksd/api/http.py" = [
"S324", # SHA1 required by WebSocket RFC 6455
]
"src/blocksd/protocol/data_change.py" = [
"SLF001", # module-private helpers accessing _writer on same-module class
]
"src/blocksd/sdnotify.py" = [
"PLW0603", # global state is intentional for singleton socket
]
[tool.ruff.lint.isort]
known-first-party = ["blocksd"]
force-single-line = false
combine-as-imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
addopts = ["-ra", "--strict-markers", "--strict-config"]
filterwarnings = ["ignore::DeprecationWarning"]
markers = [
"slow: marks tests as slow",
"integration: marks integration tests requiring hardware",
]
[tool.coverage.run]
source = ["src"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"@abstractmethod",
]
show_missing = true
[tool.ty.environment]
python-version = "3.13"
# python-rtmidi is a C extension without type stubs
[[tool.ty.overrides]]
include = ["src/blocksd/device/connection.py", "src/blocksd/topology/detector.py"]
[tool.ty.overrides.rules]
unresolved-import = "ignore"
unresolved-attribute = "ignore"