PolicyEngine / PolicyEngine/policyengine-household-api
Stop supporting Canada, Nigeria, and Israel country models
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 3
- Avg merge
- 6h 34m
- Merged PRs (30d)
- 8
Description
Proposal
Drop ca, ng, and il from the household API's supported countries, leaving us and uk.
Motivation
- Every worker loads all five country models at startup; policyengine-canada, policyengine-ng, and policyengine-il add image size, memory, snapshot build time, and dependency-resolution surface for country routes with no known partner traffic.
- The packages are not release-significant (only US and UK versions participate in Modal release naming, manifests, and validation per
release_config.py), so their pins drift untested — the same silent-staleness failure mode that let the UK path break unnoticed. - Removing them simplifies the planned UK/US app split (see the UK-extrication issue): the "standard" app becomes a US app outright.
What removal touches
COUNTRIESinlibs/household-api/policyengine_household_api/country.pyandCOUNTRY_PACKAGE_VERSIONS/COUNTRIESinconstants.py, plus thecurrent_law_idmap inbuild_metadata.- Dependency pins in
libs/household-api/pyproject.toml(policyengine-canada, policyengine-ng, policyengine-il) anduv.lock. validate_countryand the OpenAPI spec's country enumeration; docs mentioning supported countries.- Decide the HTTP contract for retired routes: 404 from
validate_country(natural once removed) vs. a 410 Gone with a message for any existing caller.
Before removing, check analytics for any real traffic to /ca/*, /ng/*, or /il/* calculate routes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking analytics for traffic to /ca/, /ng/, and /il/* calculate routes, then read country.py, constants.py, build_metadata, and release_config.py. Review the dependency pins in pyproject.toml and uv.lock, validate_country, the OpenAPI country enumeration, and supported-country docs. Done means the three countries are removed consistently and the retired-route response contract is decided and applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100