Skip to content

Avoid county FIPS network download#8651

Closed
daphnehanse11 wants to merge 2 commits into
PolicyEngine:mainfrom
daphnehanse11:codex/8650-county-fips-loader
Closed

Avoid county FIPS network download#8651
daphnehanse11 wants to merge 2 commits into
PolicyEngine:mainfrom
daphnehanse11:codex/8650-county-fips-loader

Conversation

@daphnehanse11

Copy link
Copy Markdown
Collaborator

Summary

  • Bundle county_fips_2020.csv.gz as a package resource and unignore that exact file.
  • Load a local data/ override first, then fall back to the packaged county FIPS resource.
  • Replace live Hugging Face download tests with deterministic local and packaged fallback coverage.

Fixes #8650.

Tests

  • .venv/bin/ruff format policyengine_us/tools/geography/county_helpers.py policyengine_us/tests/utilities/test_load_county_fips_dataset.py
  • .venv/bin/ruff check policyengine_us/tools/geography/county_helpers.py policyengine_us/tests/utilities/test_load_county_fips_dataset.py
  • .venv/bin/pytest policyengine_us/tests/utilities/test_load_county_fips_dataset.py -q
  • .venv/bin/python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/household/demographic/geographic/county/county.yaml -c policyengine_us
  • .venv/bin/python -m build --wheel --outdir /private/tmp/policyengine-us-8650-build
  • unzip -l /private/tmp/policyengine-us-8650-build/policyengine_us-1.729.5-py3-none-any.whl | rg 'county_fips_2020|policyengine_us/data'

@daphnehanse11 daphnehanse11 changed the title [codex] Avoid county FIPS network download Avoid county FIPS network download Jun 16, 2026
@daphnehanse11 daphnehanse11 requested a review from anth-volk June 16, 2026 20:47
@daphnehanse11 daphnehanse11 marked this pull request as ready for review June 16, 2026 20:47
@daphnehanse11

Copy link
Copy Markdown
Collaborator Author

Superseded by #8663, which is opened from the upstream PolicyEngine/policyengine-us branch instead of my fork.

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.

Avoid live Hugging Face download in county FIPS loader

1 participant