How salaudeenn-egov/dst-automation works
DST Campaign Automation turns scheduled or manually requested campaign runs into performance and CDD-sync workbooks, internal and partner Word reports, and shared Drive/Slack outputs. The scheduler reloads campaign settings; configuration resolves dates and Elasticsearch indices; the selected SPAQ/AZM or ITN/LLIN path analyzes campaign data and tracks CDD sync, with optional stock reporting, before notification. The README documents these major stages. Sampled excerpts show the scheduler’s dispatch and some service calls; unsampled implementations and several orchestration details are represented only where documented.
Main entry points: scheduler.py Campaign scheduler · run.py One-off runner · report.py SPAQ/AZM reports · report_itn.py ITN/LLIN reports
Components 16
Run orchestration
- Campaign scheduler
scheduler.py - One-off runner
run.py - Campaign config
pipeline/config.py
Campaign data
- SPAQ/AZM analysis
pipeline/analyze.py - ITN/LLIN analysis
pipeline/analyze_itn.py - SPAQ/AZM CDD sync
pipeline/cdd_sync.py - ITN/LLIN CDD sync
pipeline/cdd_sync_itn.py - Stock reporting
pipeline/stock.py
Reporting
- SPAQ/AZM reports
pipeline/report.py - ITN/LLIN reports
pipeline/report_itn.py - Error tracer
pipeline/error_tracer.py
Delivery
- Drive and Slack
Other components
- Campaign operator
- Google Sheets
- Elasticsearch
- Groq API
Connections 31
- Campaign operator → Campaign scheduler: starts scheduled runs
README.md - Campaign operator → One-off runner: starts one-off runs
README.md - Campaign scheduler → Google Sheets: reloads campaign rows
README.md - Campaign scheduler → Campaign config: builds run config
scheduler.py - One-off runner → Campaign config: builds run config
run.py - Campaign config → Google Sheets: reads campaign settings
README.md - Campaign scheduler → SPAQ/AZM analysis: dispatches SPAQ/AZM
scheduler.py - Campaign scheduler → ITN/LLIN analysis: dispatches ITN/LLIN
scheduler.py - Campaign scheduler → SPAQ/AZM CDD sync: runs sync stage
README.md - Campaign scheduler → ITN/LLIN CDD sync: runs sync stage
README.md - Campaign scheduler → SPAQ/AZM reports: runs report stage
README.md - Campaign scheduler → ITN/LLIN reports: runs report stage
README.md - One-off runner → SPAQ/AZM analysis: dispatches SPAQ/AZM
run.py - One-off runner → ITN/LLIN analysis: dispatches ITN/LLIN
run.py - One-off runner → SPAQ/AZM CDD sync: runs sync stage
run.py - One-off runner → ITN/LLIN CDD sync: runs sync stage
run.py - One-off runner → SPAQ/AZM reports: runs report stage
run.py - One-off runner → ITN/LLIN reports: runs report stage
run.py - SPAQ/AZM analysis → Elasticsearch: queries campaign data
pipeline/analyze.py - ITN/LLIN analysis → Elasticsearch: queries campaign data
pipeline/analyze_itn.py - SPAQ/AZM CDD sync → Elasticsearch: queries sync data
pipeline/cdd_sync.py - ITN/LLIN CDD sync → Elasticsearch: queries sync data
pipeline/cdd_sync_itn.py - SPAQ/AZM reports → Groq API: requests narrative
pipeline/report.py - ITN/LLIN reports → Groq API: requests narrative
README.md - SPAQ/AZM reports → Error tracer: uses error metrics
pipeline/report.py - ITN/LLIN reports → Error tracer: uses error metrics
pipeline/report_itn.py - SPAQ/AZM reports → Drive and Slack: uploads and posts
README.md - ITN/LLIN reports → Drive and Slack: uploads and posts
README.md - Campaign scheduler → Stock reporting: optionally runs stock
scheduler.py - One-off runner → Stock reporting: optionally runs stock
run.py - Stock reporting → Elasticsearch: queries stock data
pipeline/stock.py