• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

akvo / eswatini-droughtmap-hub / #211
89%

Build:
DEFAULT BRANCH: main
Ran 04 Sep 2026 10:34AM UTC
Jobs 1
Files 140
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Sep 2026 10:31AM UTC coverage: 89.118% (+0.2%) from 88.9%
#211

push

coveralls-python

web-flow
Feature/222 final improvement (#225)

* [#222] kpi: anchor every public KPI to the reviewed month

The National Overview's four cards and the Weather Explorer's four each
derived their own period from the wall clock, so none of them described the
month the map was showing. On 2026-09-03, with May 2026 published, the
precipitation card read "Sep 2026 deviation" from three days of observations
differenced against a whole-month normal — a deficit the calendar produces
every month regardless of the weather.

Introduce one anchor month, resolved from the latest published publication
and threaded from the map's selector through the API into every card.

Backend:
- /insights/metrics accepts year_month, validated against published months
- get_metrics_data computes all four cards from one resolved anchor;
  _latest_value is deleted, since its backwards walk is what let a value from
  one month appear under a label naming another
- station_health honours the `today` it already accepted: both reads were
  unbounded, so a historical query answered with later data and the network
  could only ever look healthier than it was
- stations with no record by the anchor left the denominator rather than
  counting offline; uniform staleness reports as ingestion lag, not an outage
- weather cards anchor to the reviewed month and headline CHIRPS, since the
  gauge network covers a published month partially (4 days) or not at all
- the 12-month window ends at the anchor and starts no earlier than the
  satellite archive reaches, so its label states a real span

Frontend:
- DroughtMapSection collapses two metric fetch paths into one effect keyed on
  month and Inkhundla; the raw fetch is gone
- absent deviations render an em dash, not 0 — "bang on the normal" is a real
  reading and must stay distinguishable from "no observation"
- card notes and windows come from the API, so no month is built client-side

Design doc: eswatini-v2/docs/track-1/kpi-month-anchoring.md

Co-Autho... (continued)

1894 of 2400 branches covered (78.92%)

Branch coverage included in aggregate %.

8769 of 9565 relevant lines covered (91.68%)

0.92 hits per line

Coverage Regressions

Lines Coverage ∆ File
20
79.38
-0.77% api/v1/v1_publication/management/commands/generate_publications_seeder.py
15
91.01
6.73% api/v1/v1_publication/utils.py
8
89.47
3.76% api/v1/v1_insights/map_layers.py
8
94.14
-1.74% api/v1/v1_insights/services.py
6
77.55
0.23% utils/email_helper.py
5
97.19
0.0% api/v1/v1_weather/views.py
4
94.69
5.11% api/v1/v1_insights/views.py
4
98.1
0.45% api/v1/v1_weather/services.py
3
90.82
0.0% api/v1/v1_publication/review/utils.py
2
95.83
0.06% api/v1/v1_users/models.py
1
88.89
-11.11% utils/custom_pagination.py
Jobs
ID Job ID Ran Files Coverage
1 #211.1 04 Sep 2026 10:34AM UTC 140
89.12
Source Files on build #211
  • Tree
  • List 140
  • Changed 22
  • Source Changed 0
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b6451086 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc