test(spp_gis): assert the geofence GeoJSON core properties as a subset, not an exact set (#443) - #544
Open
gonzalesedwin1123 wants to merge 2 commits into
Open
gonzalesedwin1123 wants to merge 2 commits into
gonzalesedwin1123 wants to merge 2 commits into
Conversation
…t, not an exact set test_to_geojson_properties_structure asserted that incident_id and incident_name are absent. spp_api_v2_gis legitimately adds both to the same properties and asserts their presence in its own tests, so any database carrying both modules failed one suite or the other. The core contract is that its own keys are present; downstream extensions are allowed. Refs #443
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #544 +/- ##
==========================================
+ Coverage 76.91% 76.93% +0.02%
==========================================
Files 704 730 +26
Lines 45774 47157 +1383
==========================================
+ Hits 35205 36282 +1077
- Misses 10569 10875 +306
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
gonzalesedwin1123
marked this pull request as ready for review
September 21, 2026 06:37
Member
Author
|
Full-stack evidence: SP-MIS
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #443 (weekly ci-full red). Test-only; 1 test in the SP-MIS stack. Removes two assertions, with Edwin's explicit OK from the #443 research review.
Cause
TestGeofenceModel.test_to_geojson_properties_structureassertedincident_id/incident_nameare absent from the GeoJSON properties ("Should NOT have incident fields in core", written in 1200973 to prove the spp_api_v2_gis → spp_gis move left the incident fields behind).spp_api_v2_gis/models/geofence.pyextends_get_geojson_propertieswith exactly those two keys, andspp_api_v2_gis/tests/test_geofence_model.pyasserts their presence. Any database with both modules fails one of the two suites; the SP-MIS stack has both.The core contract is that spp_gis's own keys are present (the ten
assertIns stay). Asserting the absence of an optional downstream extension is not a core property, so those two lines are removed; the positive assertion in spp_api_v2_gis's own test covers the extension.Evidence
-i spp_gis,spp_api_v2_gis --test-tags /spp_gis:TestGeofenceModel:0 failed, 0 error(s) of 35 tests(red in the 2026-09-20 weekly run).0 failed, 0 error(s) of 96 tests. All pre-commit hooks pass.spp_gis19.0.2.1.0 → 19.0.2.1.1 + HISTORY. README/index.html left for CI's generator.Noted, not changed
Layering: the incident properties are emitted by
spp_api_v2_giswhile theincident_idfield is owned byspp_hazard. Tracked in the #443 research follow-ups.