mirror of
https://github.com/zvx-echo6/central.git
synced 2026-05-21 18:14:44 +02:00
Central - data hub spine. Adapters -> NATS/JetStream -> archive.
- Python 90.5%
- HTML 9.1%
- PLpgSQL 0.4%
Fixup 1 — Contract section appended to SourceAdapter.preview_for_settings's docstring. Override authors read adapter.py, not routes.py, so the contract (pure function of settings; open your own short-lived aiohttp session; None vs [] semantics) belongs on the base method, not on the GUI stub class. Fixup 2 — _adapter_preview.html distinguishes [] from None. Previously the elif test was truthiness (`elif preview_rows`) which collapsed both into "render nothing". Now uses `elif preview_rows is not none` and special-cases the empty-list case inside: legend "Preview (0 rows)" with no table; None still renders nothing at all. Lets adapters signal "query ran, matched zero" distinctly from "preview not meaningful". Tests +1: - test_partial_renders_empty_list — [] yields "Preview (0 rows)" legend, no table, no headers. Distinct from the existing None case. Acceptance: - 27/27 targeted (preview_hook +1 new, nwis, stream_registry). - 458/458 full suite. - (b) framework GUI dir still has zero adapter-name branches. |
||
|---|---|---|
| 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.