Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4f15d3c
Add partner YAML tests and a dedicated CI runner
hua7450 May 12, 2026
c893a0d
Add two more amplifi 2026 cases (different demographics)
hua7450 May 12, 2026
62e0443
Add analytics_coverage YAML tests grouped by state
hua7450 May 13, 2026
6358e07
Merge branch 'main' of https://github.com/PolicyEngine/policyengine-u…
hua7450 May 13, 2026
e33b757
Add SNAP and state TANF edge cases to analytics_coverage
hua7450 May 13, 2026
b691112
Add federal cash + health and federal tax credit edge cases
hua7450 May 14, 2026
20b357e
Reorganize edge cases per-program; add 14 more programs
hua7450 May 14, 2026
6202b46
Trim 440 redundant edge cases for purely-federal programs
hua7450 May 14, 2026
ca7baff
Trim 336 redundant composition cases from non-federal state files
hua7450 May 14, 2026
15f224c
Trim redundant signature and edge cases (177→81, 866→642)
hua7450 May 14, 2026
3dc0419
Reorganize edge_cases into federal/category/program and state/xx layout
hua7450 May 14, 2026
2e77140
Update partner tests changelog to reflect reorg + standalone CI job
hua7450 May 14, 2026
8bff29e
upstream main
hua7450 May 14, 2026
4b6bdad
Group signature case YAMLs under analytics_coverage/signatures/
hua7450 May 14, 2026
eee0f91
Remove 24 empty placeholder state files
hua7450 May 14, 2026
a34a45d
upstream main
hua7450 May 18, 2026
c2426c0
Update MA TAFDC/EAEDC partner test fixtures for FY25 10% backdate
hua7450 May 18, 2026
3feb836
Update MA SNAP partner test fixtures for TAFDC backdate
hua7450 May 18, 2026
bf8b00a
Merge branch 'main' of https://github.com/PolicyEngine/policyengine-u…
hua7450 May 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,28 @@ jobs:
env:
PYTHONUNBUFFERED: 1
run: uv run ${{ matrix.cmd }}
HouseholdAPIPartners:
name: Household API Partners
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
- name: Install dependencies
run: uv sync --extra dev
- name: Turn off default branching
shell: bash
run: bash ./update_itemization.sh
- name: Run Household API Partners YAML tests
env:
PYTHONUNBUFFERED: 1
run: uv run make test-yaml-no-structural-other-partners
Contrib:
name: Full Suite - Contrib (${{ matrix.group }})
runs-on: ubuntu-latest
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,31 @@ jobs:
env:
PYTHONUNBUFFERED: 1
run: uv run ${{ matrix.cmd }}
HouseholdAPIPartners:
name: Household API Partners
runs-on: ubuntu-latest
timeout-minutes: 60
if: |
(github.repository == 'PolicyEngine/policyengine-us')
&& (github.event.head_commit.message == 'Update PolicyEngine US')
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
- name: Install dependencies
run: uv sync --extra dev
- name: Turn off default branching
shell: bash
run: bash ./update_itemization.sh
- name: Run Household API Partners YAML tests
env:
PYTHONUNBUFFERED: 1
run: uv run make test-yaml-no-structural-other-partners
Contrib:
name: Full Suite - Contrib (${{ matrix.group }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -178,7 +203,7 @@ jobs:
if: |
(github.repository == 'PolicyEngine/policyengine-us')
&& (github.event.head_commit.message == 'Update PolicyEngine US')
needs: [Baseline, Contrib, Rest]
needs: [Baseline, HouseholdAPIPartners, Contrib, Rest]
steps:
- name: Checkout repo
uses: actions/checkout@v6
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ test-yaml-no-structural-other-ssa:
test-yaml-no-structural-other-rest:
# All remaining gov/ subdirs + any new ones auto-route here.
$(BATCH) $(TESTS)/policy/baseline/gov --exclude states,irs,ssa --mode per-subdir
# All top-level baseline/ subdirs except gov/household/contrib
# All top-level baseline/ subdirs except gov/household/contrib/partners
# (calcfunctions, income, parameters + any new folder) auto-route here.
$(BATCH) $(TESTS)/policy/baseline --exclude gov,household,contrib --mode per-subdir
$(BATCH) $(TESTS)/policy/baseline --exclude gov,household,contrib,partners --mode per-subdir
test-yaml-no-structural-other-partners:
# Customer/API partner fixtures mirrored from policyengine-household-api.
# One subprocess per partner; new partners auto-route.
$(BATCH) $(TESTS)/policy/baseline/partners --mode per-subdir
test-other:
pytest policyengine_us/tests/ --maxfail=0
coverage:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/add-partner-yaml-tests.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
YAML tests under tests/policy/baseline/partners/ that fail CI when a PR would change calculation results for any household API partner, surfaced as a standalone "Household API Partners" CI check. Includes (1) customer fixture mirrors for Amplifi, Impactica, and MyFriendBen, (2) analytics_coverage/ with 81 per-signature test cases grouped by state (one per unique input-variable shape sent through the production API), and (3) analytics_coverage/edge_cases/ with 642 boundary cases organized as federal/{category}/{program}/ (tax_credits, nutrition, healthcare, childcare, cash, housing, utility, composition) and state/{xx}/{program}.yaml. Cases target binding thresholds — income at FPL boundaries, age cutoffs, asset limits, immigration status, household composition — using state-aware values (e.g., per-state SNAP BBCE multipliers).
150 changes: 150 additions & 0 deletions policyengine_us/tests/policy/baseline/partners/amplifi/2025.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
- name: amplifi_2025 (2025)
period: 2025
absolute_error_margin: 0.1
input:
people:
you:
age: 30
immigration_status_str: UNDOCUMENTED
is_disabled: false
employment_income: 48000
rent: 38748
is_aca_eshi_eligible: false
is_pregnant: false
ca_calworks_child_care_time_category: MONTHLY
receives_medicaid: false
member1:
age: 3
immigration_status_str: CITIZEN
is_aca_eshi_eligible: false
is_disabled: false
ca_calworks_child_care_time_category: MONTHLY
member2:
age: 1
immigration_status_str: CITIZEN
is_aca_eshi_eligible: false
is_disabled: false
ca_calworks_child_care_time_category: MONTHLY
households:
household:
zip_code: '91367'
tenant_pays_utilities: true
household_vehicles_owned: 1
household_vehicles_value: 33501.0
lives_in_vehicle: false
members:
- you
- member1
- member2
ca_tanf_region1: true
state_code_str: CA
living_arrangements_allow_for_food_preparation: true
in_la: true
in_riv: false
in_ala: false
families:
family:
members:
- you
- member1
- member2
spm_units:
spm_unit:
heating_cooling_expense: 1
pre_subsidy_electricity_expense: 6000
members:
- you
- member1
- member2
phone_cost: 999
tax_units:
tax_unit:
tax_unit_is_joint: false
members:
- you
- member1
- member2
output:
people:
you:
medicaid: 0.0
is_medicaid_eligible: false
wic: 0.0
is_aca_ptc_eligible: false
is_ssi_aged: false
is_ssi_eligible: false
ssi: 0.0
ca_state_supplement_eligible_person: false
ca_ala_general_assistance_eligible_person: false
member1:
medicaid: 3258.31
is_medicaid_eligible: true
wic: 711.43
is_aca_ptc_eligible: false
is_ssi_aged: false
is_ssi_eligible: false
ssi: 0.0
ca_state_supplement_eligible_person: false
ca_ala_general_assistance_eligible_person: false
member2:
medicaid: 3258.31
is_medicaid_eligible: true
wic: 711.27
is_aca_ptc_eligible: false
is_ssi_aged: false
is_ssi_eligible: false
ssi: 0.0
ca_state_supplement_eligible_person: false
ca_ala_general_assistance_eligible_person: false
households:
household:
ca_care: 1950.0
ca_care_eligible: true
ca_fera: 0.0
ca_fera_eligible: false
ca_la_ez_save:
2025-3: 8.17
ca_la_ez_save_eligible:
2025-3: true
spm_units:
spm_unit:
ca_tanf: 0.0
ca_tanf_eligible: false
snap: 0.0
is_snap_eligible: false
lifeline: 228.0
is_lifeline_eligible: true
la_general_relief: 0.0
la_general_relief_eligible: false
ca_riv_general_relief_eligible: false
ca_riv_general_relief: 0.0
ca_riv_share_eligible: false
ca_riv_share_payment: 0.0
ca_ala_general_assistance_income_eligible: false
ca_ala_general_assistance: 0.0
ca_calworks_child_care: 0.0
ca_calworks_child_care_eligible: false
ca_state_supplement: 0.0
tax_units:
tax_unit:
premium_tax_credit: 0.0
eitc: 1960.71
eitc_eligible: true
ca_eitc: 0.0
ca_eitc_eligible: false
ctc: 4400.0
refundable_ctc: 1815.0
ca_yctc: 0.0
aca_ptc: 0.0
ca_renter_credit: 120.0
cdcc: 0.0
ca_cdcc: 0.0
ca_foster_youth_tax_credit: 0.0
income_tax_before_credits: 2585.0
income_tax_before_refundable_credits: 0.0
income_tax_refundable_credits: 3775.71
income_tax_capped_non_refundable_credits: 2585.0
income_tax_non_refundable_credits: 2585.0
income_tax: -3775.71
ca_income_tax_before_credits: 510.03
ca_income_tax_before_refundable_credits: 0.0
Loading
Loading