Skip to content

Remove reweight from the inventory and fix skill examples - #97

Open
anth-volk wants to merge 2 commits into
mainfrom
remove-reweight
Open

anth-volk wants to merge 2 commits into
mainfrom
remove-reweight

Conversation

@anth-volk

@anth-volk anth-volk commented Oct 12, 2026 •

Copy link
Copy Markdown

This PR has two parts: removing the archived reweight repo from the org inventory, and fixing the skill-examples check, which was failing on every PR (previously split out as #98).

Part 1: remove reweight from the inventory

What and why

reweight is being archived (GitHub repo and PyPI project). Nothing in PolicyEngine imports or lists it, and it can't be installed because it pins policyengine-us==1.667.1, which is no longer on PyPI. scripts/policyengine_repos.json is meant to list only active repos (the refresh command in dashboard/README.md drops archived ones), so this removes reweight from:

  • scripts/policyengine_repos.json
  • REPO_KIND_OVERRIDES in scripts/build_manifest.py
  • dashboard/src/data/manifest.json (its known_repos and repo_coverage entries)

The manifest was edited directly rather than regenerated: running scripts/build_manifest.py locally rewrote about 4,500 unrelated lines (analysis numbers became strings, country became null), so a full rebuild is left for whoever next refreshes it in the usual environment. The remaining matches for "reweight" in the repo are the word "reweighting", not the package.

Test plan (part 1)

  • uv run pytest --ignore=tests/test_skill_examples.py: 178 passed
  • No "reweight" entries remain in the three files

Part 2: give skill examples a county and refresh asserted values

The skill-examples check fails on any PR right now, including this one. The current policyengine-us (2.2.1, via policyengine 6.3.0 and spm-calculator 1.0.0) never infers SPM geography from a missing county: a household with only state_code raises

SPMInputError: County selection has no county FIPS input (''): send county_fips as a five-digit string (for example "06037"), or select geography_kind="national" in the spm configuration

so 8 of the verified examples failed. This adds a county to each of the 9 state-only households, using the same form as policyengine's own docstring ({"state_code": "NY", "county_fips": "36061"}):

State County FIPS
CA Los Angeles 06037
TX Harris 48201
NY New York 36061

Asserted values that changed (please review)

Once the examples run, some asserted numbers no longer match. Only the ACA PTC depends on the county chosen (Anderson County, TX reproduces the old 6,250.38). The rest come out the same for any county, so they reflect model changes since this check last passed on main (2026-09-13):

Example Value Old New
policyengine #0 (CA) household_net_income 46,358 46,369
policyengine-healthcare #0 (TX) aca_ptc 6,250.38 6,635.45 (county-dependent)
policyengine-us #1 (NY) snap 7,364 8,061
policyengine-us #1 (NY) household_net_income 62,681 47,929
policyengine-us #4 (CA) ca_eitc 410.16 401.89

The prose quoting the SNAP figure is updated to match. The NY net income drop of about $15k is large enough that someone who knows the US model should confirm it is an intended model change rather than a regression. That part of this PR is the one to check.

Test plan (part 2)

  • pytest tests/test_skill_examples.py with policyengine[us] installed as in CI: 18 passed, 1 skipped (slow)
  • uv run pytest --ignore=tests/test_skill_examples.py: 178 passed
  • Confirm the NY household_net_income change (62,681 → 47,929) is expected

🤖 Generated with Claude Code

reweight is being archived: nothing in PolicyEngine depends on it and
it cannot install (it pins policyengine-us==1.667.1, no longer on
PyPI). The inventory lists only active repos, so drop it there, from
REPO_KIND_OVERRIDES, and from the committed manifest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
policyengine-us now requires an explicit SPM geography: a household
without county_fips raises SPMInputError, so 8 verified examples
failed. Add a county to each state-only household (Los Angeles 06037,
Harris 48201, New York 36061) and update the values the current model
returns for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anth-volk anth-volk changed the title Remove reweight from the org inventory and dashboard manifest Remove reweight from the inventory and fix skill examples Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant