Skip to content

feat: add Civico provider for Westminster Council#22

Open
fsargent wants to merge 2 commits into
bellingcat:mainfrom
fsargent:add-civico-provider
Open

feat: add Civico provider for Westminster Council#22
fsargent wants to merge 2 commits into
bellingcat:mainfrom
fsargent:add-civico-provider

Conversation

@fsargent

Copy link
Copy Markdown

Summary

  • Adds a new civico provider that paginates www.civico.net/api/{authority}/{offset}/archived and ingests meeting metadata for Civico-hosted councils (Westminster is the first tenant).
  • Prefixes UIDs as civico-{authority}-{id} so Civico's per-tenant integer IDs stay globally unique alongside PublicI.
  • get_meetings is a pass-through for now: Westminster's Civico tenant publishes no captions (live_transcription is 0; no subtitle track in DASH/HLS manifests), so transcript search returns no Westminster results until an ASR pipeline lands.
  • Adds structured INFO logging around load_meetings so tail -f shows per-authority progress, and wraps each authority in try/except so one provider's failure no longer terminates the whole batch silently.

To register Westminster after deploy:

POST /meetings/add_provider?provider=civico
POST /meetings/add_authority?authority=westminster&provider=civico&nice_name=Westminster

Test plan

  • Hit https://www.civico.net/api/westminster/0/archived and confirm pagination terminates at the empty page (24 meetings total).
  • Run load_meetings('all') locally; verify 24 meetings land in SQLite with valid datetime/unixtime/link.
  • Confirm live_transcription is 0 for every Westminster meeting (no transcripts ingested, as expected).
  • Reviewer: deploy to a staging env, register Westminster via the two POSTs above, confirm the daily/weekly cron picks it up.

🤖 Generated with Claude Code

fsargent and others added 2 commits May 21, 2026 12:00
Adds a new `civico` provider class that paginates Civico's
archived-meetings JSON API (www.civico.net/api/{authority}/{offset}/archived)
and ingests meeting metadata.

UIDs are prefixed (civico-{authority}-{id}) to stay globally unique
across authorities, since Civico's integer id is only per-tenant.
`get_meetings` is currently a pass-through: Westminster's Civico tenant
publishes no captions (live_transcription is 0; no subtitle track in
DASH/HLS manifests), so transcript search will return no Westminster
results until a future ASR pipeline is added.

To register Westminster after deploy:
  POST /meetings/add_provider?provider=civico
  POST /meetings/add_authority?authority=westminster&provider=civico&nice_name=Westminster

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per-authority INFO logs (build index, fetch transcripts, store) plus
top-level start/complete, so 'tail -f' shows clear ingest progress.
Per-authority try/except + logger.exception so one provider's failure
doesn't terminate the whole batch silently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant