mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 17:31:39 +00:00
feat: add GenericHttpAdapter (kind=generic_http, v0.15.0 PR2) (#121)
One config-driven adapter class that operators can instantiate many times via distinct config.adapters rows (unique name, kind="generic_http"). Ships class + Pydantic settings schema + unit tests only; no GUI create route, no migration, no seeded row (PR3). Class is dormant until an operator row exists. Key design decisions: - self.name = config.name in __init__ scopes dedup to each instance - domain validated against STREAMS registry at import time - subject_for derives region from event.data["_enriched"]["geocoder"] identically to usgs_quake (no static subject_region setting) - _dig() helper supports dotted paths into nested dicts/lists Also adds: GUI partials (_event_summaries, _event_rows), CONSUMER- INTEGRATION.md §6 subsection, and test_events_feed_frontend.py sample entry — all required by the existing adapter-coverage consistency tests. Co-authored-by: Ubuntu <zvx@cortex.echo6.co> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
13722d07dd
commit
3effd677a5
6 changed files with 1163 additions and 0 deletions
|
|
@ -1189,6 +1189,7 @@ _SAMPLE_INNER = {
|
|||
"current_lat_deg": -17.1487,
|
||||
"current_alt_km": 417.4,
|
||||
},
|
||||
"generic_http": {"title": "Generic source alert"},
|
||||
}
|
||||
|
||||
# Exact expected subjects for the deterministic adapters. swpc_alerts is omitted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue