mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 17:31:39 +00:00
Central - data hub spine. Adapters -> NATS/JetStream -> archive.
- Python 88.6%
- HTML 9.4%
- CSS 1.2%
- Shell 0.6%
- PLpgSQL 0.2%
Removes both Castle Rock-backed adapters: state_511_atis (incidents/closures/road
work) AND state_511_atis_cameras (telemetry). Same upstream dependency, same
redundancy now that itd_511 + itd_511_cameras (v0.10.0) cover Idaho via the
official ITD REST API. The sister-site discovery confirmed no other Castle Rock
customer still exposes the legacy /map/mapIcons/ + /List/GetData/ shape these
adapters consumed (modern Castle Rock customers run an auth-gated SPA product).
What goes:
- src/central/adapters/state_511_atis.py + state_511_atis_cameras.py
- tests/test_state_511_atis.py + test_state_511_atis_cameras.py
- 4 GUI partials under src/central/gui/templates/_event_{rows,summaries}/
- 7 fixtures under tests/fixtures/state_511_atis_*
- test_gui_adapter_edit.py::test_state_511_atis_no_bbox_map (imported the
deleted module)
- 2 _SAMPLE_INNER + 1 _EXPECTED_SUBJECT entries in test_events_feed_frontend.py
- state_511_atis_cameras from _TELEMETRY list in test_telemetry_separation.py
- 2 doc subsections in docs/CONSUMER-INTEGRATION.md §6
- state_511_atis + state_511_atis_cameras entries from ADAPTER_GROUPS
What stays:
- public.events rows from the deleted adapters (preserved as historical
record per Matt; archive will not re-publish these ids since the supervisor
no longer polls the adapters).
- CENTRAL_TRAFFIC stream (wzdx, tomtom_*, itd_511 still publish to it).
Added: sql/migrations/032_remove_state_511_atis_adapters.sql -- idempotent
DELETE on config.adapters for both adapter names.
Added: tests/test_consumer_doc.py::test_castle_rock_legacy_adapters_remain_removed
regression guard against accidental re-introduction by a future revert.
Test suite: 996 passed / 1 skipped under both zvx and central (was 1029 / 1
on main; net -33 = 17 from deleted test files + 16 from auto-shrunk
parametrizations over discover_adapters() and _EXPECTED_SUBJECT).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| docs | ||
| etc-templates | ||
| scripts | ||
| sql | ||
| src/central | ||
| systemd | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| CHANGELOG.md | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Central
Central is the data hub spine for the infrastructure. Adapters normalize upstream sources into a canonical event shape, publish CloudEvents to NATS/JetStream, and archive to TimescaleDB for historical query. Single-LXC deployment.
Status
Phase 0 — scaffold. Not yet operational.
Architecture
- Python 3.12 (uv-managed)
- NATS + JetStream for live event bus
- TimescaleDB + PostGIS for archive and geospatial query
- One supervisor process managing adapter lifecycle
- One archive consumer process persisting events to TimescaleDB
- Both processes systemd-managed
Testing
See docs/test-database.md for test database setup.
License
MIT. See LICENSE.