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

kobotoolbox / kpi / 29401879287 / 4
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions-deps-fa52573c10
DEFAULT BRANCH: master
Ran 15 Jul 2026 08:50AM UTC
Files 892
Run time 33s
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

15 Jul 2026 08:44AM UTC coverage: 50.884% (+6.5%) from 44.396%
29401879287.4

push

github

web-flow
refactor(settings): standardize Constance env overrides to CONSTANCE_ prefix DEV-1976 (#7230)

### 🔗 Related PRs
Part of a 3-repo Constance env-var standardization:
- **kobotoolbox/kobo-install#279** — same rename in the kobo-install env
template
- **kobotoolbox/kobo-docker#373** — same rename in the kobo-docker
default env file

Backward compatibility is preserved (see below), so these can land
independently — the deploy-repo PRs simply complete the migration to the
new names.

### 📣 Summary
Standardize all Constance override env vars on a single `CONSTANCE_`
prefix.

### 📖 Description
The env vars that override Constance defaults used three conventions
(bare, `KOBO_`, `CONSTANCE_`). This unifies them on `CONSTANCE_`,
matching the existing `CONSTANCE_ASR_MT_GOOGLE_*` precedent.

Renamed:
- `KOBO_SUPPORT_EMAIL` → `CONSTANCE_SUPPORT_EMAIL`
- `KOBO_SUPPORT_URL` → `CONSTANCE_SUPPORT_URL`
- `KOBO_ACADEMY_URL` → `CONSTANCE_ACADEMY_URL`
- `KOBO_COMMUNITY_URL` → `CONSTANCE_COMMUNITY_URL`
- `USAGE_LIMIT_ENFORCEMENT` → `CONSTANCE_USAGE_LIMIT_ENFORCEMENT` (env
fallback in `base.py` + pytest `env` in `pyproject.toml`)

**Backward compatible:** each override reads the new
`CONSTANCE_`-prefixed variable and falls back to the deprecated name
(`KOBO_*` / bare) when it's unset, emitting a `DeprecationWarning` so
deployments know to migrate. Old env vars keep working — no hard break.

The fallback logic lives in a new `constance_env` helper in
`kobo/settings/utils.py`, moved out of `base.py` along with
`dj_stripe_request_callback_method`.

### ✅ Test plan
- [x] `test_api_environment.py` — both settings axes
- [x] usage-limit-enforcement tests (KPI submissions, OpenRosa,
subsequences)
- [x] deprecated env var still read + `DeprecationWarning` fired

4562 of 12550 branches covered (36.35%)

18935 of 37212 relevant lines covered (50.88%)

0.51 hits per line

Source Files on job 29401879287.4
  • Tree
  • List 892
  • Changed 109
  • Source Changed 0
  • Coverage Changed 109
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 29401879287
  • 08edb9f9 on github
  • Prev Job for on main (#29357552883.1)
  • Next Job for on main (#29401900122.9)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc