2026-05-15 19:16:24 +00:00
|
|
|
[build-system]
|
|
|
|
|
requires = ["hatchling"]
|
|
|
|
|
build-backend = "hatchling.build"
|
|
|
|
|
|
|
|
|
|
[project]
|
|
|
|
|
name = "central"
|
2026-05-18 14:29:28 -06:00
|
|
|
version = "0.3.0"
|
2026-05-15 19:16:24 +00:00
|
|
|
requires-python = ">=3.12,<3.13"
|
|
|
|
|
description = "Data hub spine — adapters, bus, archive."
|
|
|
|
|
readme = "README.md"
|
|
|
|
|
license = {text = "MIT"}
|
|
|
|
|
authors = [{name = "Matt Johnson"}]
|
2026-05-15 21:06:02 +00:00
|
|
|
dependencies = [
|
|
|
|
|
"aiohttp>=3.13.5",
|
feat(tomtom_flow): TomTom Orbis vector flow-tile telemetry adapter + CENTRAL_TRAFFIC_FLOW (v0.9.3)
Third CENTRAL_TRAFFIC-family member, first telemetry traffic source. Polls a
configured tile coverage set (Idaho metros, z=10), fetches Orbis vector flow
tiles, decodes per-segment relative_speed + road geometry, emits one telemetry
Event per road segment per poll to the new CENTRAL_TRAFFIC_FLOW stream. Renders
as colored polylines (green free-flow -> red jam) on the /telemetry map.
Production code; supervisor + gui + ARCHIVE restart (NEW event-bearing stream
central.traffic_flow.> -> archive must resubscribe). Ships disabled; needs a
"tomtom" api key in config.api_keys before enable.
- Subject central.traffic_flow.{z}.{x}.{y} (token traffic_flow, non-overlapping
with central.traffic.>). category="flow.tomtom_flow" -> GUI event_type "flow".
- Severity from relative_speed: >=0.75=1, 0.5-0.75=2, 0.25-0.5=3, <0.25=4.
- Cadence 300s; 7-day retention (high-volume telemetry). Dedup minute-bucketed,
inherited from the v0.9.1 SourceAdapter mixin.
- Shared tomtom_flow_parse module (decode + slippy-tile georeference) reused by
the v0.9.4 on-demand passthrough endpoint.
- Generic framework change (Option A, ~3 lines, inert for the other 14
adapters): Geo.geometry optional field + archive _build_geom_sql prefers it,
so segments persist their real LineString to the PostGIS geom column.
- Idaho-only (Orbis tier confirmed live). Cameras + Navi passthrough are follow-ups.
- deps: mapbox-vector-tile (vector PBF decode); itsdangerous promoted to an
explicit dependency (gui/csrf.py + gui/wizard.py imported it as an undeclared
transitive that uv re-lock would otherwise prune).
Full suite: 780 passed, 1 skipped (central and unprivileged zvx, 3x each).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 23:25:44 +00:00
|
|
|
"mapbox-vector-tile>=2.0",
|
|
|
|
|
"itsdangerous>=2.2", # used by gui/csrf.py + gui/wizard.py (was an undeclared transitive)
|
feat(gui): add auth core, setup gate, and first-run operator creation
- Add migrations 007-010 for system config, operators, sessions, audit_log
- Implement argon2id password hashing via argon2-cffi
- Implement session-based authentication with database-stored tokens
- Add SetupGateMiddleware to redirect to /setup until first operator created
- Add SessionMiddleware to load session from cookie and attach operator
- Create /setup, /login, /logout, /change-password routes with CSRF protection
- Add periodic session cleanup task (hourly)
- Add audit logging for auth events
- Update systemd unit with EnvironmentFile for /etc/central/central.env
- Add comprehensive tests for auth, middleware, and audit modules
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-17 05:30:49 +00:00
|
|
|
"argon2-cffi>=25.1.0",
|
2026-05-15 21:06:02 +00:00
|
|
|
"asyncpg>=0.31.0",
|
|
|
|
|
"cloudevents>=2.0.0",
|
2026-05-15 23:08:03 +00:00
|
|
|
"cryptography>=44.0.0",
|
2026-05-17 04:32:39 +00:00
|
|
|
"fastapi>=0.115.0",
|
|
|
|
|
"jinja2>=3.1.6",
|
2026-05-15 21:06:02 +00:00
|
|
|
"nats-py>=2.14.0",
|
2026-06-03 22:36:26 -06:00
|
|
|
"polyline>=2.0,<3", # itd_511: Google polyline decode (EncodedPolyline → LineString)
|
2026-05-15 21:06:02 +00:00
|
|
|
"pydantic>=2,<3",
|
2026-05-15 23:08:03 +00:00
|
|
|
"pydantic-settings>=2.7.0",
|
2026-05-17 04:32:39 +00:00
|
|
|
"python-multipart>=0.0.20",
|
2026-05-16 19:05:05 +00:00
|
|
|
"shapely>=2.0",
|
2026-05-15 21:06:02 +00:00
|
|
|
"tenacity>=9.1.4",
|
2026-05-17 04:32:39 +00:00
|
|
|
"uvicorn[standard]>=0.34.0",
|
2026-05-15 21:06:02 +00:00
|
|
|
]
|
2026-05-15 19:16:24 +00:00
|
|
|
|
2026-05-15 21:29:01 +00:00
|
|
|
[project.scripts]
|
|
|
|
|
central-supervisor = "central.supervisor:main"
|
|
|
|
|
central-archive = "central.archive:main"
|
2026-05-15 23:08:03 +00:00
|
|
|
central-migrate = "central.migrate:main"
|
|
|
|
|
central-cli = "central.cli:main"
|
2026-05-17 04:32:39 +00:00
|
|
|
central-gui = "central.gui:main"
|
2026-05-15 21:29:01 +00:00
|
|
|
|
2026-05-15 19:16:24 +00:00
|
|
|
[tool.hatch.build.targets.wheel]
|
|
|
|
|
packages = ["src/central"]
|
2026-05-15 21:06:02 +00:00
|
|
|
|
|
|
|
|
[dependency-groups]
|
|
|
|
|
dev = [
|
2026-05-17 04:32:39 +00:00
|
|
|
"httpx>=0.28.0",
|
2026-05-15 21:06:02 +00:00
|
|
|
"mypy>=2.1.0",
|
|
|
|
|
"pytest>=9.0.3",
|
|
|
|
|
"pytest-asyncio>=1.3.0",
|
|
|
|
|
"ruff>=0.15.13",
|
|
|
|
|
]
|