Commit Graph

2 Commits

Author SHA1 Message Date
Evan Rusackas
9fd7fd441a fix(country-map): CI failures — license headers, lockfile sync, reproducible build
Three coordinated fixes for the 25 CI failures on the initial PR push:

1. **Lockfile sync.** Added @superset-ui/plugin-chart-country-map as
   a workspace dep in the previous commit but didn't update
   package-lock.json. CI's `npm ci` failed across frontend-build,
   cypress (12 jobs), playwright (4 jobs), docker (2 jobs), and
   frontend-check-translations. Re-ran `npm install --package-lock-only`
   to add the new workspace's 71 lock entries.

2. **License headers added** to 13 new files flagged by License Check:
   - 5 markdown READMEs / SIP_DRAFT (HTML-comment headers)
   - 5 YAML config files (`# Licensed ...`)
   - 2 Python files (`# Licensed ...`)
   - 1 shell script (preserves shebang)

3. **Reproducible build outputs.** The regen workflow detected drift
   on manifest.json + ukr_admin1_CAN.geo.json. Two root causes:
   - `build_timestamp_utc` field made manifest non-deterministic →
     dropped from the schema
   - Floating mapshaper version (`npx --yes mapshaper`) caused subtle
     simplification differences across runners → pinned to
     `mapshaper@0.7.15` via `npx --yes mapshaper@<version>`

Verified locally: rebuild from clean cache reproduces every output
byte-identically except the manifest (which now also matches once
the timestamp is gone).

Files changed:
  .gitignore                           — re-include rule for static dir
  superset-frontend/package-lock.json  — +71 lines for new workspace
  13 new files                         — ASF headers
  build.py                             — pin mapshaper, drop timestamp
  manifest.json (× 2)                  — regenerate w/o timestamp
  README.md (in static dir)            — header

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 22:32:51 -07:00
Evan Rusackas
07532ae1a7 feat(country-map): scaffold modern plugin shell
Bootstrap the new @superset-ui/plugin-chart-country-map package with
the modern ChartPlugin pattern. Mirrors plugin-chart-handlebars'
structure (the leanest existing modern plugin in the repo).

Files:
  package.json                     — workspace pkg with d3-* deps
  tsconfig.json                    — extends frontend root tsconfig,
                                     references core/chart-controls
  types/external.d.ts              — ambient types for png/jpg/geojson
  README.md                        — what this plugin is + status
  src/
    index.ts                       — package entry
    types.ts                       — CountryMapFormData + transform props
    CountryMap.tsx                 — placeholder renderer (real D3 port
                                     in a follow-up commit)
    plugin/
      index.ts                     — ChartPlugin class with metadata
      buildQuery.ts                — modern chart/data query (this is
                                     the core difference from the legacy
                                     plugin's explore_json path)
      controlPanel.tsx             — minimal placeholder; full control
                                     set (worldview / admin level /
                                     country / region include-exclude /
                                     fly-islands / language) ports next
      transformProps.ts            — derives geoJsonUrl from form_data
                                     using the build-script's output
                                     naming convention

Renderer scaffold fetches the resolved GeoJSON URL and shows a small
diagnostic block (URL + feature count + data row count + metric name)
so the plugin compiles end-to-end and can be wired to the chart-type
registry without a real D3 render. Real renderer + controls land in
the next commits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:44:43 -07:00