-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
146 lines (122 loc) · 4.67 KB
/
pyproject.toml
File metadata and controls
146 lines (122 loc) · 4.67 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
[build-system]
build-backend = "uv_build"
requires = ["uv_build>=0.11.4,<0.12"]
[tool.uv.build-backend]
module-name = "app"
module-root = "."
[project]
authors = [{ name = "Simon van Lierde", email = "s.n.van.lierde@cml.leidenuniv.nl" }]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: FastAPI",
"Natural Language :: English",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Graphics :: Capture",
"Topic :: Multimedia :: Video :: Capture",
"Topic :: System :: Hardware",
]
# Project metadata
description = "Raspberry Pi Camera plugin for CML Reverse Engineering Lab app"
license = "AGPL-3.0-or-later"
maintainers = [{ name = "Simon van Lierde", email = "s.n.van.lierde@cml.leidenuniv.nl" }]
name = "relab-rpi-cam-plugin"
# Dependencies and version constraints
dependencies = [
"fastapi[standard]>=0.115.8",
"opentelemetry-exporter-otlp-proto-http>=1.38.0",
"opentelemetry-instrumentation-fastapi>=0.59b0",
"opentelemetry-instrumentation-httpx>=0.59b0",
"opentelemetry-sdk>=1.38.0",
"pillow>=10.0.0",
"psutil>=5.9",
"pydantic-settings>=2.8.0",
"pyjwt[crypto]>=2.12.1",
"relab-rpi-cam-models>=0.3.1", # NOTE: Keep this aligned with the published contract package
"websockets>=14.0",
]
requires-python = ">=3.13,<3.14" # Python 3.13 is needed in Debian Trixie for picamera2
version = "0.3.0" # NOTE: Versioning is handled by commitizen
[project.urls]
Homepage = "https://github.com/CMLPlatform/relab-rpi-cam-plugin"
Issues = "https://github.com/CMLPlatform/relab-rpi-cam-plugin/issues"
Repository = "https://github.com/CMLPlatform/relab-rpi-cam-plugin.git"
[dependency-groups]
dev = [
{ include-group = "test" },
{ include-group = "s3" },
"commitizen>=4.8.3",
"pre-commit>=4.2.0",
"ruff>=0.9.6",
"ty>=0.0.29",
]
test = ["pytest>=8.0", "pytest-asyncio>=0.25", "pytest-cov>=6.0", { include-group = "s3" }]
s3 = ["aioboto3>=13.0"]
### Tools configuration
[tool.pytest.ini_options]
addopts = ["--strict-markers"]
asyncio_mode = "auto"
markers = [
"unit: pure function/service tests with no app boot unless unavoidable",
"integration: ASGI app, route, or lifespan behavior tests",
"slow: intentionally longer lifecycle/worker tests",
]
testpaths = ["tests"]
[tool.coverage.report]
fail_under = 80
show_missing = true
[tool.commitizen]
major_version_zero = true
name = "cz_conventional_commits"
tag_format = "v$version"
update_changelog_on_bump = true
version_files = ["app/__version__.py"]
version_provider = "pep621"
version_scheme = "semver2"
[tool.ruff]
fix = true
line-length = 120
target-version = "py313"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
fixable = ["ALL"]
select = ["ALL"]
ignore = [
# Prevent conflicts with formatter (see https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"ANN204", # missing-return-type-special-method
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"Q", # flake8-quotes
"W191", # tab-indentation
# Overly strict rules
"D105", # undocumented-magic-method (magic methods are often self-explanatory)
"D107", # undocumented-public-init (__init__ methods are often self-explanatory)
# TODO: Re-enable these linting rules when we have more than one developer.
"FIX002", # Allow todos
"TD002", # Allow todos without authors
"TD003", # Allow todos without issue links
]
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments for FastAPI Depends and Query
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]
[tool.ruff.lint.flake8-type-checking]
# Allow runtime imports for FastAPI dependency injection and Pydantic validation
exempt-modules = ["app", "fastapi", "pydantic", "typing.Annotated"]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "SLF001"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
allow-magic-value-types = ["int"]
max-args = 10
[tool.ty.environment]
extra-paths = ["typings"]
# UV configuration
[tool.uv.sources]
relab_rpi_cam_models = { workspace = true }
[tool.uv.workspace]
members = ["relab_rpi_cam_models"]