Files
superset2/superset-frontend/plugins/plugin-chart-country-map/scripts/.gitignore
Evan Rusackas 1817e37b06 feat(country-map): wire build outputs to Flask static path + commit them
Move build pipeline outputs from a sibling `output/` directory into
Superset's Flask-served `superset/static/assets/country-maps/` so the
plugin can fetch them at runtime without webpack involvement (Flask
serves the tree at `/static/...` directly).

Commit the 220 generated GeoJSONs + manifest.json so a fresh
ephemeral environment can render the chart immediately, no build
step required at deploy time. Trade-off: ~17 MB of generated files
in-tree. (For comparison the legacy plugin commits ~34 MB of
GeoJSON; net change is -17 MB once we remove the legacy plugin in a
future major version.)

Files committed:
  superset/static/assets/country-maps/
    README.md                                         (humans, not data)
    manifest.json
    ukr_admin0.geo.json                          2.1 MB
    ukr_admin1_<adm0_a3>.geo.json    × 214      ~50 KB - 662 KB each
    regional_<country>_<set>_ukr.geo.json × 4   ~30 KB each
    composite_france_overseas_ukr.geo.json       322 KB

Build script changes:
- OUTPUT_DIR computed via SCRIPT_DIR.parents[3] / "superset" /
  "static" / "assets" / "country-maps"
- mkdir(parents=True) so a fresh checkout works first run
- Stale `output/` entry kept in scripts/.gitignore for safety
  (some local checkouts may have it from earlier iterations)

.gitignore: add re-include lines so superset/static/assets/country-maps/**
gets committed despite the broader superset/static/* exclusion.

SIP_DRAFT updated with the hosting-decision rationale.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:26:39 -07:00

7 lines
185 B
Plaintext

# Build cache (downloaded NE shapefiles)
.cache/
# Stale local output dir from earlier iterations (outputs now ship to
# superset/static/assets/country-maps/ at the repo root)
output/