Clarify birth-fact review, numeric parsing and changelog handling

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github, python
Ambito
backend, testing

Direzione di ricerca

Start with the referenced InputContract.__post_init__ and _number code in cliffs2017/native_currency.py, then review the README, changelog.d/counterfactual-currency.added.md, and pyproject.toml. The issue groups several independent contract, parsing, changelog, and packet compiler follow-ups; read the linked reviews and commits to understand their existing decisions. Done means resolving the listed suggestions while keeping synthetic regressions and preserving the stated scope and cost limits.

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

Descrizione

PR #2's accepted independent review at 254141b returned COMPLETE/APPROVE with no P0–P2 findings and three P3 suggestions. This issue collects those suggestions. It does not change the proposed comparison's scope or qualify a native-year adapter, dataset or population result.

S1: align birth-fact declarations and review

InputContract.__post_init__, lines 277–304 groups fixed ages by entity. A recognized birth fact needs a reviewed disposition alongside fixed age on that same entity. A birth fact on another entity can remain without a scope or reason, while dropping it fails unless that entity also declares fixed age. These checks do not enforce the broader requirement in README line 47 across entities or when no age field appears.

Either extend the check to every recognized birth fact, with a clear rule for age on another entity, or document the narrower contract consistently. Add synthetic regressions for the chosen behavior. The review found no demonstrated population-output defect: this helper has no population adapter, and the stored-input inventories it examined contained no birth field.

S2: specify numeric conversion and preserve guard messages

_number, lines 76–110 converts a float through Decimal(str(value)). The resulting fraction represents that shortest decimal text rather than the float's exact binary value. Decimal also accepts monetary text with surrounding whitespace, underscores or non-ASCII digits. In lines 97–110, the ValueError handler catches ContractError as well, so some specific representation and non-finite errors surface as Invalid numeric value; their causes remain available.

Document the intended float and text rules, or narrow parsing deliberately, and preserve specific guard messages. Retain the existing representation bounds and malformed-input rejection. These suggestions concern precision claims and diagnostics; the accepted review found no wrong conversion for the declared decimal interpretation.

S3: choose a changelog convention for this repository

changelog.d/counterfactual-currency.added.md, line 1 is the only fragment. At this head, pyproject.toml has no towncrier configuration, and the repository has no changelog compiler or CI workflow. Decide whether to remove the unused fragment or configure changelog handling deliberately. A new changelog system need not accompany the pure-test CI job.

The existing 117 isolated synthetic tests passed on the recorded source. They establish neither a native-law population run nor managed model/data compatibility. Resolve these suggestions without changing archived outputs or treating their hybrid sensitivities as actual 2017 incidence.

Runner follow-ups from PR #2

The full second review at 3c6bf74 returned COMPLETE/APPROVE with no P0–P2 findings and two additional P3 suggestions:

  • S4: update the README's local test command to invoke the guarded runner. Its direct pytest command omits the runner's version checks, model-import block and plugin isolation.
  • S5: reject PYTEST_ADDOPTS and PYTEST_PLUGINS overrides so callers cannot quietly deselect tests while retaining the import-block marker.

PR #7, at 094e0f2, contains both fixes. They remain unmerged. Keep the original review's three suggestions above open under their existing definitions.

Packet compiler follow-ups from PR #5

The first full review at 58eb3e6c raised these two P3 suggestions alongside the P2 hypothetical-index test gap. Commit e2f6f78 adds the P2 regression. The second full review, completed through its guidance and artifact follow-up, resolved that finding and returned COMPLETE/APPROVE with no open P0–P2 findings. Both suggestions below remain open.

  • S4: replace unexplained internal hold and constructor terms in the packet contract with the actual runtime prerequisites.
  • S5: consider focused synthetic coverage for the once-per-block converter call, calendar and background receipts, and a scoped cross-entity birth declaration. The first review's bounded probe found those behaviors correct; it identified no wrong output.

These follow-ups supply no model/data or population qualification. Preserve the isolated test framework and the existing cost limits.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
1g 19h
PR unite (30g)
2

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/us-cliffs-2017

Tutte le issue di PolicyEngine/us-cliffs-2017

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.