You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Retire timeseries schema v1: reject new v1 timeseries files #981
Follow-up to #974 (timeseries schema v2, merged into epic/v2).
Situation
Every timeseries file in src/data is now on pathwayTimeseries.v2.json, and the importer from #975 accepts only v2. The v1 schema is still recognised in two places, purely for backwards compatibility:
scripts/schema-check-files.ts: preloads pathwayTimeseries.v1.json, so a v1 timeseries file still validates
scripts/build-timeseries-files.ts: its v1 matcher still picks v1 files up for the index, plot copies and CSV
So a v1 timeseries file added by hand would be accepted quietly. It would lack sectorSegment, and its geography wouldn't be checked against the metadata, which is everything v2 exists to guarantee.
v1 is deliberately left as it is. It keeps the technology lists that #977 fixes for v2 only, as discussed on #979.
Proposal
schema:check reports a v1 timeseries file as an error that points to scripts/codemod-timeseries-v1-to-v2.ts. The v1 schema file stays, since the codemod reads v1 input.
Follow-up to #974 (timeseries schema v2, merged into
epic/v2).Situation
Every timeseries file in
src/datais now onpathwayTimeseries.v2.json, and the importer from #975 accepts only v2. The v1 schema is still recognised in two places, purely for backwards compatibility:scripts/schema-check-files.ts: preloadspathwayTimeseries.v1.json, so a v1 timeseries file still validatesscripts/build-timeseries-files.ts: its v1 matcher still picks v1 files up for the index, plot copies and CSVSo a v1 timeseries file added by hand would be accepted quietly. It would lack
sectorSegment, and its geography wouldn't be checked against the metadata, which is everything v2 exists to guarantee.v1 is deliberately left as it is. It keeps the technology lists that #977 fixes for v2 only, as discussed on #979.
Proposal
schema:checkreports a v1 timeseries file as an error that points toscripts/codemod-timeseries-v1-to-v2.ts. The v1 schema file stays, since the codemod reads v1 input.build-timeseries-files.tsstops matching v1 timeseries files.Small, and no data changes, because no v1 timeseries files remain.