fix(spp_mis_demo_v2): adapt demo data to re-landed spp_demo/spp_gis_report schemas (#277, #280)#295
Conversation
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #295 +/- ##
=======================================
Coverage 74.28% 74.28%
=======================================
Files 372 372
Lines 25385 25385
=======================================
Hits 18857 18857
Misses 6528 6528
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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>
|
Heads-up: with the maintainer's agreement, the |
…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.
|
Rebased onto 19.0 now that #280 is merged (with the maintainer's go-ahead), pushed as
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. |
797d5f2 to
f43a533
Compare
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.
|
Added 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. |
Summary
Adapts
spp_mis_demo_v2demo data to two schema changes introduced by the re-lands in #277 and #280. Without this, installingspp_mis_demo_v2on top of those PRs breaks:spp_demoto curated PSGC p-codes.STORY_AREA_MAPstill referenced the old named IDs (area_phl_calamba,area_phl_quezon_city, …), which resolve withraise_if_not_found=False— so every PHL story registrant silently lost its area assignment.disaggregate_by_gender/disaggregate_by_agefields onspp.gis.reportin favor ofdimension_ids.data/demo_gis_reports.xmlstill set the removed booleans, causing a hardParseErroron install/update.Changes
STORY_AREA_MAPremapped 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.xmlswitched from the removed booleans todimension_idsreferencing thegenderandage_groupdemographic dimensions. The two group-filtered reports also setmember_expansion="expand"so demographic dimensions are read off individual members rather than the groups.spp_metric_servicedependency added for the demographic dimension records referenced above (previously only transitive viaspp_gis_report).19.0.2.0.1→19.0.2.0.2+ HISTORY entry.This PR depends on the new schemas from #277 and #280 and cannot build on
19.0until both have merged. Please merge those first (and rebase this branch onto the result).Verification
demo_gis_reports.xmlwell-formed; all 14 referenced area IDs exist as records in feat(spp_demo): curated PHL geodata + spp_demo_phl_luzon demo module (re-land from #76) #277; both dimension XML IDs exist inspp_metric_service; all 14fil_PHtargets distinct.spp_mis_demo_v2(ideally themisluzonprofile) on top of both re-lands and confirm the demo loads clean and the GIS reports render disaggregation.