PolicyEngine / PolicyEngine/policyengine-household-api

Stop supporting Canada, Nigeria, and Israel country models

Open
#1,630 0 comments 0 reactions 0 assignees View on GitHub

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

  • COUNTRIES in libs/household-api/policyengine_household_api/country.py and COUNTRY_PACKAGE_VERSIONS / COUNTRIES in constants.py, plus the current_law_id map in build_metadata.
  • Dependency pins in libs/household-api/pyproject.toml (policyengine-canada, policyengine-ng, policyengine-il) and uv.lock.
  • validate_country and 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.