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

Pin generated output across backends and option sets in a release matrix

Aperta
#4,941 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
ci-cd, testing-qa

Direzione di ricerca

Start by reading the existing hashing in tests/units.py, the invocations used by the e2e tests, and scripts/compare_release.py. The proposal calls for a separate CI job and expected-data shards under tests/data/expected; verify the measured runtime and how changed cells can be diffed against a base revision or release. Done means the matrix covers the listed inputs, backends, and option sets, with changed outputs reviewable in the PR.

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

Descrizione

The test suite pins each test's expected output, but most tests run one input with one option set. Option interactions across output backends are not covered systematically, so a change can alter the output of an input with an option combination no test runs, and nothing fails until a user reports it. scripts/compare_release.py compares output with a release, but only for the inputs and options it is given.

Proposal: a release matrix test.

  • Inputs: the schemas the e2e tests already use (recorded once from their invocations; remote $ref, version headers and network options excluded).
  • Columns: the output backends (pydantic_v2.BaseModel, pydantic_v2.dataclass, dataclasses.dataclass, typing.TypedDict, msgspec.Struct) times a few option sets (default, --field-constraints, --use-annotated, --collapse-root-models).
  • Storage: one line per input and option set, holding a short hash of each backend's output (or exit-N for errors), sharded into a few dozen files under tests/data/expected. That is about 55k cells in ~1.4 MB, instead of ~46k output files.
  • A helper script prints the real diff of a changed cell against a base revision or release.
  • Changed cells then show up in the PR diff, and each one needs a reason before the release.

It reuses the existing hashing in tests/units.py. A first measurement took about 60–70 s on 8 workers, so it would run as its own CI job.

Lingua principale
Python
Stelle
4k
Fork
460
Merge medio
12h 26m
PR unite (30g)
680

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 datamodel-code-generator/datamodel-code-generator

Tutte le issue di datamodel-code-generator/datamodel-code-generator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.