Skip to content

Avoid county FIPS network download#8663

Open
daphnehanse11 wants to merge 2 commits into
mainfrom
codex/8650-county-fips-loader
Open

Avoid county FIPS network download#8663
daphnehanse11 wants to merge 2 commits into
mainfrom
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'

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

2 participants