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

akvo / akvo-mis / #753
89%

Build:
DEFAULT BRANCH: main
Ran 28 Jul 2026 02:57AM UTC
Jobs 1
Files 110
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

28 Jul 2026 02:49AM UTC coverage: 88.523% (+0.06%) from 88.461%
#753

push

coveralls-python

web-flow
[#265] Port the client's seeder forms into the product (#266)

* [#265] Load every form definition on a plain seeder run

The file filter inverted on `--test`: with the flag it kept files whose
name contains `example`, without it kept files that do not. Since
`source/forms/` holds nothing but `example-*` files, a plain
`form_seeder` run matched zero files, seeded nothing and still exited 0
— which is why `seeder.sh` appeared to succeed while leaving the
database without any forms.

Only the `--test` half survives. A deployment can now drop its own form
definitions into the source folder under any name. The `PROD` filter and
the `--file` flag keep their current meaning, so production seeding is
unaffected.

`tests_form_seeder.py::test_call_command` pinned the bug: it called the
seeder with no flags at all and asserted a plain run seeded zero forms
with empty output. That assertion only held because of the inversion
being fixed here, so it is updated to expect the corrected behaviour —
all 10 bundled example forms seeded, one "Form Created | ..." line
each — asserting on count and line shape rather than the exact strings,
so it does not become a tripwire again as fixtures are added. No other
existing test is touched.

* [#265] Add a never_delete mode to the form import writer

`_apply_import_update_path` soft-deletes any group or question the
incoming definition stops mentioning. That is right for the form-import
job, where the uploaded file is the whole truth, but wrong for the
seeder, where a re-run must not remove structure — deleting a question
takes its answers with it.

The flag defaults to off, so the import job at `v1_forms/tasks.py` keeps
pruning exactly as before. Only the seeder will opt in.

Options stay replace-on-write even under `never_delete`. `QuestionOptions`
rows carry no submission data — `Answers.options` stores option values as
a JSON list rather than foreign keys — so rebuilding them is an update,
not data loss.

* [#265] Make re-... (continued)

5691 of 6597 branches covered (86.27%)

Branch coverage included in aggregate %.

10722 of 11944 relevant lines covered (89.77%)

0.9 hits per line

Coverage Regressions

Lines Coverage ∆ File
7
90.99
0.07% api/v1/v1_forms/functions.py
7
71.79
0.74% api/v1/v1_forms/management/commands/reset_forms.py
4
95.49
4.11% api/v1/v1_forms/management/commands/form_seeder.py
1
98.51
-0.5% api/v1/v1_profile/models.py
1
93.53
-0.5% utils/custom_generator.py
Jobs
ID Job ID Ran Files Coverage
1 #753.1 28 Jul 2026 02:57AM UTC 110
88.52
Source Files on build #753
  • Tree
  • List 110
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • ca88641e on github
  • Prev 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