Skip to content

Retire timeseries schema v1: reject new v1 timeseries files #981

Description

@jacobvjk

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.
  • build-timeseries-files.ts stops matching v1 timeseries files.
  • Metadata v1 is not affected: 26 pathways still use it (26 pathways are still on metadata v1 and don't appear on the site #978).

Small, and no data changes, because no v1 timeseries files remain.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions