Skip to content

fix(spp_mis_demo_v2): adapt demo data to re-landed spp_demo/spp_gis_report schemas (#277, #280)#295

Merged
gonzalesedwin1123 merged 3 commits into
19.0from
fix/mis-demo-v2-reland-76-compat
Jul 14, 2026
Merged

fix(spp_mis_demo_v2): adapt demo data to re-landed spp_demo/spp_gis_report schemas (#277, #280)#295
gonzalesedwin1123 merged 3 commits into
19.0from
fix/mis-demo-v2-reland-76-compat

Conversation

@kneckinator

@kneckinator kneckinator commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adapts spp_mis_demo_v2 demo data to two schema changes introduced by the re-lands in #277 and #280. Without this, installing spp_mis_demo_v2 on top of those PRs breaks:

Changes

  • STORY_AREA_MAP remapped to the new PSGC p-code IDs. Ten stories map 1:1 to the same city; four whose original barangay/city is absent from the curated dataset (Bacoor, and the Commonwealth/Poblacion/Real barangays) are reassigned to distinct municipalities so the 14 stories still light up 14 distinct areas on the demo map. Each entry carries a comment naming the city, since the raw p-codes are opaque.
  • demo_gis_reports.xml switched from the removed booleans to dimension_ids referencing the gender and age_group demographic dimensions. The two group-filtered reports also set member_expansion="expand" so demographic dimensions are read off individual members rather than the groups.
  • Explicit spp_metric_service dependency added for the demographic dimension records referenced above (previously only transitive via spp_gis_report).
  • Version bump 19.0.2.0.119.0.2.0.2 + HISTORY entry.

⚠️ Merge order

This PR depends on the new schemas from #277 and #280 and cannot build on 19.0 until both have merged. Please merge those first (and rebase this branch onto the result).

Verification

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the demo GIS reports to use the new disaggregation model by replacing the deprecated boolean flags (disaggregate_by_gender and disaggregate_by_age) with dimension_ids referencing demographic dimensions from spp_metric_service. It also adds spp_metric_service as a dependency in the manifest. Additionally, the Philippine story areas in STORY_AREA_MAP are remapped to curated PSGC p-code area external IDs, and the module version is bumped to 19.0.2.0.2 with corresponding history notes. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.28%. Comparing base (9f7dd29) to head (1caf794).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             19.0     #295   +/-   ##
=======================================
  Coverage   74.28%   74.28%           
=======================================
  Files         372      372           
  Lines       25385    25385           
=======================================
  Hits        18857    18857           
  Misses       6528     6528           
Flag Coverage Δ
spp_base_common 90.26% <ø> (ø)
spp_dci_demo 93.39% <ø> (ø)
spp_mis_demo_v2 70.96% <ø> (ø)
spp_programs 65.27% <ø> (ø)
spp_registry 86.83% <ø> (ø)
spp_security 66.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
spp_mis_demo_v2/__manifest__.py 0.00% <ø> (ø)
spp_mis_demo_v2/models/mis_demo_generator.py 64.02% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

gonzalesedwin1123 added a commit that referenced this pull request Jul 14, 2026
Folds the demo_gis_reports.xml adaptation out of draft #295 so this PR merges
atomically: removing the disaggregate_by_* booleans while mainline demo data
still sets them hard-breaks any install path pulling spp_mis_demo_v2 (caught
by test (spp_dci_demo) on the merge ref). #295 retains the STORY_AREA_MAP
p-code remap, which is independent (#277 fallout).

Co-authored-by: Ken Lewerentz <ken@openspp.org>
@gonzalesedwin1123

Copy link
Copy Markdown
Member

Heads-up: with the maintainer's agreement, the demo_gis_reports.xml portion of this draft has been folded into #280 (verbatim, Co-authored-by you) so #280 can merge atomically — its merge ref was hard-failing test (spp_dci_demo) exactly as your #280 review predicted, and this draft couldn't go green before #280 by construction. After #280 merges, this PR rebases down to the STORY_AREA_MAP p-code remap (the #277 fallout), which is independent and mergeable anytime.

kneckinator and others added 2 commits July 14, 2026 13:36
…eport schemas

The re-lands in #277 and #280 rename the Philippine area external IDs to
curated PSGC p-codes and replace the boolean GIS-report disaggregation flags
with dimension_ids, which silently broke this module's demo data: PHL story
registrants lost their area assignment and the demo GIS reports failed to load.

Remap STORY_AREA_MAP to the new p-code IDs (distinct municipalities for stories
whose barangay or city is absent from the curated set), switch the demo reports
to dimension_ids + member_expansion, and depend on spp_metric_service explicitly.
@gonzalesedwin1123

Copy link
Copy Markdown
Member

Rebased onto 19.0 now that #280 is merged (with the maintainer's go-ahead), pushed as f43a533f:

  • The demo_gis_reports.xml patch dropped away automatically during rebase (byte-identical to what feat(spp_gis_report): metric disaggregation in GIS reports (re-land from #76) #280 folded in — your authorship preserved there via Co-authored-by).
  • Remaining scope, as planned: the STORY_AREA_MAP PSGC p-code remap + the explicit spp_metric_service dependency you added.
  • Version-bump collision resolved: mainline took 19.0.2.1.2 for the folded piece, so this PR is 19.0.2.1.3 with a scope-corrected HISTORY entry; README rendered.

CI should now run green against the real base — once it settles, this is independent and ready whenever you flip it from draft. It closes the silent PHL story-area gap that's been live since #277 merged.

@gonzalesedwin1123 gonzalesedwin1123 force-pushed the fix/mis-demo-v2-reland-76-compat branch from 797d5f2 to f43a533 Compare July 14, 2026 05:42
The map is consumed with raise_if_not_found=False, so a renamed area
external ID silently drops story area assignments (this regressed once when
PHL areas moved to PSGC p-codes). The guard loads each country's areas and
asserts every mapped xmlid resolves, turning future renames into loud
failures.
@gonzalesedwin1123 gonzalesedwin1123 marked this pull request as ready for review July 14, 2026 06:53
@gonzalesedwin1123

Copy link
Copy Markdown
Member

Added test_story_area_map.py — a regression guard asserting every STORY_AREA_MAP external ID resolves after loading each country's areas (suite 273/0). Rationale: the map's raise_if_not_found=False consumption is what made the original breakage silent; this makes any future area-ID rename fail loudly, closing the test gap noted in the #277 review.

Also marked ready-for-review with the maintainer's agreement — CI is green on the rebased base and the remaining scope is exactly the p-code remap + explicit dependency. Merge at your convenience.

@gonzalesedwin1123 gonzalesedwin1123 merged commit ab94f0a into 19.0 Jul 14, 2026
21 checks passed
@gonzalesedwin1123 gonzalesedwin1123 deleted the fix/mis-demo-v2-reland-76-compat branch July 14, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants