[project] name = "parking-vision" version = "0.0.0" description = "Host-side ANPR / vehicle-verification microservice for the parking system (separate process; localhost HTTP)." requires-python = ">=3.10,<4.0" # Core deps are LIGHT on purpose: the service boots, serves /health, and answers # /analyze in stub mode with ONLY these. The heavy recognizer stack (fast-alpr + # onnxruntime + model weights) is the optional `alpr` extra, so `uv sync` and the test # suite work offline without downloading models. See # wiki/decisions/vision-service-packaging.md + wiki/entities/opencv-anpr-service.md. dependencies = [ "fastapi>=0.115", "uvicorn[standard]>=0.32", "pydantic>=2.9", "pydantic-settings>=2.6", ] [project.scripts] vision-recognize = "vision_service.cli:main" [project.optional-dependencies] # The real recognizer. Install with: uv sync --extra alpr # fast-alpr is MIT (YOLOv9 detector + CCT OCR, both MIT) on ONNX Runtime — see the # recognizer evaluation in wiki/entities/opencv-anpr-service.md. onnxruntime is the # CPU backend; swap for onnxruntime-gpu / -openvino / -directml on capable hardware. alpr = [ "fast-alpr>=0.4.0", "onnxruntime>=1.19", ] [dependency-groups] # Dev tooling (uv installs these by default for local work; excluded from the runtime image). dev = [ "ruff>=0.8", "pytest>=8.3", "httpx>=0.27", # FastAPI TestClient transport "mypy>=1.13", # The vehicle stage's post-processing tests run on synthetic tensors without the model # stack (CI syncs WITHOUT the alpr extra); the service itself imports numpy lazily. "numpy>=1.26", ] [tool.ruff] line-length = 110 target-version = "py310" [tool.ruff.lint] # A pragmatic default set: pyflakes, pycodestyle, isort, bugbear, pyupgrade. select = ["E", "F", "I", "B", "UP"] [tool.pytest.ini_options] testpaths = ["tests"] [tool.mypy] python_version = "3.10" strict = true # fast-alpr / onnxruntime ship without type stubs; don't fail typecheck on the optional stack. ignore_missing_imports = true [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["vision_service"]