mirror of
https://github.com/apache/superset.git
synced 2026-05-21 15:55:10 +00:00
Covers the pure-Python helpers and YAML-applied transforms that the build pipeline relies on. Subprocess calls (mapshaper, NE download) are not exercised — those are integration concerns covered by the regen workflow itself. Test categories: - _matches (4 tests): scalar equality, AND'd conditions, `in: [...]` list-membership matcher, missing property - _bbox_center (2 tests): unit square, offset square - _translate_and_scale (4 tests): pure translate, scale-around-centroid, combined transform, multipolygon handling - _translate_and_scale_with_pivot (1 test): shared pivot preserves relative positions of grouped features (the Paris-petite-couronne case) - _drop_parts (2 tests): drops specified indices, polygon unchanged - _bbox_contains (2 tests): inside-bbox, outside-bbox-west - apply_name_overrides (1 test): applies only to matching features, respects match conditions across countries (FRA "Seien" vs GBR "Seien" don't collide) - apply_flying_islands (2 tests): repositions matched features, drop_outside_bbox guarded to Admin 1 only (the bug we fixed earlier) Wired into the regen workflow as a step that runs BEFORE the build, so a broken transform fails CI before producing potentially-bad output files. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>