|
Ran
|
Jobs
10
|
Files
893
|
Run time
3min
|
Badge
README BADGES
|
push
github
feat(KMLExport): route KML exports through KPI export tasks DEV-1591 (#7236) ### 📣 Summary KML exports now run through KPI export tasks and no longer use the legacy OpenRosa KML export endpoint. ### 💭 Notes - Updated formpack pin to the latest [commit] that implements kml exports (https://github.com/kobotoolbox/formpack/commit/3bf65b74f) - Added kml as a valid export type in SubmissionExportTask pipeline. - Writes KML output via export.to_kml(..., flatten=True). - Added geo-question field auto-inclusion logic for KML when fields filtering is used, so geometry columns are still fetched. ### 👀 Preview steps 1. ℹ️ Have an account, a project, and a deployed survey with at least one of each geo type question (geopoint, geotrace, and geoshape). 2. Submit at least one response containing geo data. 3. Navigate to `/api/v2/docs` and create an export task `/api/v2/assets/{uid_asset}/exports/` with payload: ``` { "type": "kml", "lang": "_default", "group_sep": "/", "hierarchy_in_labels": false, "fields_from_all_versions": false, "multiple_select": "both" } ``` 4. 🟢 Should succeed with HTTP 201 Created. Navigate to {Project Name} > Data > Downloads you should see an export generated in the export list with no type yet (as the frontend hasn't been implemented). <img width="1208" height="734" alt="Screenshot 2026-07-10 at 2 11 27 PM" src="https://github.com/user-attachments/assets/8dcdd1d0-72d6-408c-a753-7b3cad6d464e" /> 5. 🟢 Download the export and validate that the kml is correct by uploading the file to google earth. 6. 🟢 Check that requests to the openRosa endpoint are bypassed by trying to generate a kml export through the legacy kml exports. You should get an error: <img width="1210" height="730" alt="Screenshot 2026-07-10 at 2 09 28 PM" src="https://github.com/user-attachments/assets/c0178af4-0923-43ed-9235-2a85a31a4290" />
9362 of 12693 branches covered (73.76%)
9 of 50 new or added lines in 3 files covered. (18.0%)
1 existing line in 1 file now uncovered.30398 of 37287 relevant lines covered (81.52%)
5.52 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 38 |
74.21 |
46.1% | kpi/models/import_export_task.py |
| 2 |
31.09 |
-0.53% | kpi/serializers/v2/export_task.py |
| 1 |
53.08 |
0.0% | kobo/apps/openrosa/apps/viewer/tasks.py |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
31.09 |
-0.53% | kpi/serializers/v2/export_task.py |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 29345082749.1 | 889 |
52.96 |
||
| 2 | 29345082749.2 | 889 |
44.4 |
||
| 3 | 29345082749.3 | 889 |
49.55 |
||
| 4 | 29345082749.4 | 891 |
50.88 |
||
| 5 | 29345082749.5 | 891 |
54.22 |
||
| 6 | 29345082749.6 | 889 |
59.22 |
||
| 7 | 29345082749.7 | 891 |
66.7 |
||
| 8 | 29345082749.8 | 891 |
45.76 |
||
| 9 | 29345082749.9 | 891 |
60.37 |
||
| 10 | 29345082749.10 | 893 |
69.01 |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|