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

akvo / iwsims / #49
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: main
Ran 16 Jun 2026 11:47AM UTC
Jobs 1
Files 109
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

16 Jun 2026 11:40AM UTC coverage: 88.039% (-0.07%) from 88.111%
#49

Pull #22

coveralls-python

ifirmawan
[#20] Replace all Answers queries with MVAnswerDenormalized across visualization

values_functions.py:
- Replace all 23 Answers.objects queries with MVAnswerDenormalized
  (answer_options GIN index, answer_value numeric index, parent_id direct)
- _number_group_by_parent: 2-query approach (MV for aggregates, FormData
  for parent names) instead of single JOIN — same queries, no Subquery needed
- _option_group_by_option: tracking_field data__parent_id → parent_id (no join)
- Remove Answers import entirely
- Add TruncDate import for _number_group_by_date
- Add MVAnswerDenormalized import

progress_functions.py:
- build_progress_answers_map: MVAnswerDenormalized with field name mapping
  (answer_options/answer_value → options/value for formula handlers)
- handle_progress filter_qid and scope_qid queries: use MVAnswerDenormalized
- Remove Answers import, add MVAnswerDenormalized import

escalation_functions.py:
- build_column_caches: MVAnswerDenormalized for both monitoring and parent
  answer caches with field name normalization
- Remove Answers import entirely

tests/mixins.py:
- Add refresh_all_mvs() at end of VisualizationValuesTestMixin.setUp()
  so all test classes using this mixin automatically have populated MVs
- Extract shared refresh_all_mvs() function and MVRefreshMixin
- Remove MVRefreshMixin from EscalationTestCases (covered by mixin)

Test body fixes (refresh after in-test data creation):
- tests_values_option: test_include_unanswered_works_on_registration_form
- tests_values_criteria: 2 cross-form criteria tests
- tests_values_stack: registration form stack test
- tests_formula_values: setUp override + test_criteria_composes

Shared refresh helpers moved to mixins.py:
- tests_mv_models, tests_mv_helpers, tests_operational_criteria: use
  refresh_all_mvs from mixins instead of local definitions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Pull Request #22: [MV4V 4] Optimize Query Functions to Use MVs

5087 of 5937 branches covered (85.68%)

Branch coverage included in aggregate %.

9840 of 11018 relevant lines covered (89.31%)

0.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
55
86.0
-2.99% api/v1/v1_visualization/values_functions.py
24
89.09
3.01% api/v1/v1_visualization/functions.py
23
79.24
0.18% api/v1/v1_visualization/escalation_functions.py
16
71.82
0.97% api/v1/v1_visualization/progress_functions.py
1
98.43
-0.52% api/v1/v1_profile/models.py
Jobs
ID Job ID Ran Files Coverage
1 #49.1 16 Jun 2026 11:47AM UTC 109
88.04
Source Files on build #49
  • Tree
  • List 109
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Pull Request #22
  • PR Base - feature/20-MV4V-1 (#)
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