Skip to content

import v2 data - #935

Draft
AlexAxthelm wants to merge 4 commits into
feat/metadata-v2-schemafrom
feat-import
Draft

import v2 data#935
AlexAxthelm wants to merge 4 commits into
feat/metadata-v2-schemafrom
feat-import

Conversation

@AlexAxthelm

Copy link
Copy Markdown
Collaborator

Summary

Related issues

Closes:

Testing

Checklist

  • PR is focused on a single concern
  • Tests pass locally and in CI
  • Docs updated for user-visible changes
  • AI-assisted portions declared (see CONTRIBUTING.md)

repro and others added 3 commits August 28, 2026 16:25
Add scripts/import-pathway-data.ts, which reads the working Excel
workbook (pathway_data_prepared.xlsx) and writes real v2 pathway
metadata JSON, superseding the one-shot codemod-v1-to-v2.ts (#858).

It reads the draft_* sheets (parameterized via SHEET_PREFIX and the
--sheet-prefix flag, ready for the final pathway_* sheets), maps each
row to its target file by publisher + scenario code + country, and
emits scoped keyFeatures, coreDrivers, dependencies, and geography
(with region->ISO memberships) that satisfy schema:check and
validateScopedEntries. IEA WEO-2025 rows create new files and keep the
2024 ones; every other row updates its file in place. Anything that
cannot be mapped cleanly is reported rather than written, so the run
never produces schema-invalid output.

Adds exceljs as a dev dependency. The regenerated data files are
committed separately.

Part of #860.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AlexAxthelm AlexAxthelm self-assigned this Aug 28, 2026
@AlexAxthelm
AlexAxthelm changed the base branch from main to feat/metadata-v2-schema August 28, 2026 17:33
@AlexAxthelm AlexAxthelm mentioned this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant