Clarify birth-fact review, numeric parsing and changelog handling

Abierto
#4 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github, python
Área
backend, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
0
Forks
0
Merge medio
1 d 19 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PolicyEngine/us-cliffs-2017

Todos los issues de PolicyEngine/us-cliffs-2017

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.