Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Publish a JSON Schema for calibration diagnostics schema 8

Chiusa
#1,293 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@anth-volk ci sta già lavorando.

Dal 15/10/2026.

  • #1298 di @anth-volk — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
json, python
Ambito
data, tooling

Direzione di ricerca

Start with the pydantic models CalibrationDiagnosticsV8 and the UK extension in microcosm-diagnostics, then with calibration_diagnostics_json_schema(), which currently merges schema 8 with the legacy 6/7 envelope. Generate a Draft 2020-12 schema for schema 8 only, commit it under a versioned path, and add a drift test. Done means the drift test passes, the US and UK test builders validate, and every model validator is listed in the schema description. Open PR #1298 already targets this, so check it before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

calibration_diagnostics.json (schema 8) is defined only by the pydantic models in microcosm-diagnostics (CalibrationDiagnosticsV8 and the typed UK extension). Anything that receives the file outside Microcosm has no machine-readable contract to check it against without importing those models.

The collector-as-hub plan has the emitter submit the diagnostics bytes to the collector, which should validate them at intake before building calibration trees. The collector needs a published, versioned schema to do that.

calibration_diagnostics_json_schema() already exists, but it returns the parse adapter's union of schema 8 and the legacy schema-6/7 envelope. It declares no JSON Schema dialect and isn't committed anywhere. It also doesn't say which model rules it leaves out.

Change

  • Generate a Draft 2020-12 JSON Schema for schema 8 from the pydantic models, with a dialect, title, $id and a description.
  • Commit the generated schema at a stable path in microcosm-diagnostics whose name carries the schema version. A tool under tools/ can regenerate or check it.
  • Add a drift test so the committed file always equals freshly generated output.
  • Validate real diagnostics from the existing US and UK engine-free test builders against the committed schema, and check that representative invalid documents fail.
  • Some rules the models enforce can't be expressed in a generated JSON Schema. These include cross-field reconciliations, finite-number checks, strict integers and non-blank text. List each one in the schema's description, and pin with a test that every model validator is listed.

The diagnostics format doesn't change, and nothing is published outside the repository.

Lingua principale
Python
Stelle
0
Fork
6
Merge medio
1g 20h
PR unite (30g)
133

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/microcosm

Tutte le issue di PolicyEngine/microcosm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.