Repository navigation
Conversation
read_frame turns the pinned populace-us release's HDF5 file into the person and household tables the projections start from. It hashes the file first and refuses the pinned release unless the caller passes the token of a registered entry point; the registry starts empty. It reads only the named fields of section 3.2, through table.fields([...]), and derives age top codes, marital groups, annual hours, person weights and the two spouse views, with counts of where they disagree. frame_structure reports tables, row counts and dtypes from metadata alone. invented.py writes invented frames in the same layout for tests. Errors name the entity and column, report bad values as counts, and never chain a library exception that could carry a cell value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_reader_properties.py checks the package's ten invariants with Hypothesis: round trip, weights, symmetric spouse links (and a brute-force oracle for the links and their counts), named fields only, the refusal of the pinned file, the prior-year wage gate, determinism, errors without cell values, age codes, and Kish's effective n against the replicated sample. test_reader.py has an example test for each error path and each spouse-link count. conftest.py installs a meta path finder that refuses the two barred modules: always when pytest runs only tests/frame_start, and otherwise when frame-start code is on the import's stack, so a full-suite run leaves other tests' imports alone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The frame reader opens HDF5 files, so the dev extra that CI installs now holds h5py, and a new frame extra holds it for users of the reader alone. The two frame_start test modules collect 170 tests, all in the unit tier, so the manifest's unit count rises from 26,654 to 26,824. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A new test recomputes, from pytest's own arguments, whether every path lies inside tests/frame_start, and asserts the guard's strict flag matches. It confirms the conftest's pytest_configure hook set it. The two modules now collect 171 tests, so the unit count is 26,825. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds
populace_dynamics.frame_start, which reads the US frame the projections start from: releasepopulace-us-2024-spm-20260915ofpolicyengine/populace-us.reader.pyholdsread_frame, which turns the frame's HDF5 file into one row per person and one per household, with a provenance record.columns.pynames.frame_structurereports the file's tables, row counts and dtypes from metadata alone.invented.pywrites invented frames in the same layout, for tests.pin.pyholds the release's tag, file size and SHA-256.An error names the entity and the column, and gives bad values as a count.
The tests use invented frames only, and the unit tier gains 171 of them:
test_reader.py(160) has an example test for each error path and each spouse-link count.test_reader_properties.py(11) checks the package's ten invariants with Hypothesis.tests/frame_start/conftest.pyinstalls an import guard for two modules that no frame-start test may load. It refuses them always when pytest runs onlytests/frame_start. In a full run, it refuses them while frame-start code is on the import's stack.pyproject.tomladdsh5py>=3.9to thedevextra and to a newframeextra.tests/tier_counts.jsonadds the 171 tests to the unit tier. Other branches of this work change the same line, and we'll reconcile them before merge.Open
test_reducer_input_identity_matches_reviewed_branch. That check lists every source file added since the birth-evidence review, and the five new files haven't joined its list.tests/README-tiers.mdstill shows the unit tier before these tests.How we built this
Claude Opus 5.5 wrote these commits in a separate job, under a brief that names the files it may read and the commands it may run. The job's first attempt ended on a provider timeout, and its second attempt built on the first's uncommitted draft. It reported these departures from the brief, and none reached a file the brief closed:
ruff checknamed its two folders by a shell pattern.tests/once for two file names, with the closed files excluded by name, and printed the matching lines of three test modules.blackcall failed on a bad path and changed nothing.Each test process also starts one subprocess: importing h5py calls Python's
platform.processor(), which runsuname -pon macOS.🤖 Generated with Claude Code