Skip to content

Add CI: validate committed data against schemas - #2

Merged
lbougan merged 1 commit into
mainfrom
add-data-validation-ci
Jul 12, 2026
Merged

Add CI: validate committed data against schemas#2
lbougan merged 1 commit into
mainfrom
add-data-validation-ci

Conversation

@lbougan

@lbougan lbougan commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

This data-only repo had no CI. Adds a PR gate that validates every data/<datasource>/ against the repo schemas:

  • metadata.jsonschema/metadata.schema.json (JSON Schema)
  • each parquet → its column schema (method.yaml / characterization-factor.yaml / normalization-weighting.yaml): required columns present, dtypes compatible, primary_key unique, and foreign_key integrity (every CF method_id exists in the methods table).

Also relaxes the optional string fields in metadata.schema.json to allow null, matching the existing IPCC/ReCiPe scaffold metadata (which set license/retrieved/source_url to null and previously wouldn't have validated).

Should land before the EF 3.1 data PR (#1) so that import is gated by it.

🤖 Generated with Claude Code

Adds scripts/validate.py + a PR-gate workflow: checks each data/<datasource>/ folder —
metadata.json against metadata.schema.json, and each parquet against its column schema
(required columns, dtypes, primary-key uniqueness, method_id foreign-key integrity).
Relaxes metadata.schema.json optional string fields to allow null (matches the existing
scaffold metadata).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lbougan
lbougan merged commit 8f3aeea into main Jul 12, 2026
2 checks passed
@lbougan
lbougan deleted the add-data-validation-ci branch July 12, 2026 13:08
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