Step 5: data dictionary and Croissant metadata

- data/dictionary.yaml: every published file, and every column of runs_clean.csv
  with its type, meaning and allowed values
- collection/publish_metadata.py writes data/croissant.json (Croissant 1.0) from
  it, with a sha256 per file; `npm run metadata`, run by the daily update
- tests/core/test_dictionary.py: every column and value described, types hold,
  croissant.json up to date and checksums match
- attempt is now written as a whole number (was 1.0, 2.0); no statistic changes
- the site ships both files and the Methods text links them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
ekcSchiano
2026-11-04 01:37:10 +00:00
co-authored by Claude Opus 5.5
parent 11b4a0398e
commit 63b5d40e54
12 changed files with 4395 additions and 3284 deletions
+2
View File
@@ -304,6 +304,8 @@ def main(argv=None):
df, missing = load(src)
if missing:
print("WARNING: columns not found:", missing)
# a whole-number column with gaps would otherwise be written as 1.0, 2.0, ... (data/dictionary.yaml: integer)
df["attempt"] = df["attempt"].astype("Int64")
df.to_csv(out, index=False)
print(f"{len(df)} runs -> {out}")
print(df.outcome.value_counts().to_string())