Repository navigation
Conversation
…e territories Guam, Puerto Rico and the Virgin Islands have a $0 spm_unit_fpg, so the school meal poverty ratio divided by zero, and the NSLP and SBP rate parameters had no keys for them, so every tier was worth $0. USDA's income eligibility guidelines apply the 48-state guideline to Guam and the territories (91 FR 17934), and its payment notices give them Hawaii's rate column from SY 2020-21 (Puerto Rico from SY 2016-17) and the contiguous column before. Add school_meal_fpg, use it in school_meal_fpg_ratio and school_meal_tier, and add GU, PR and VI keys to the NSLP and SBP rates. Fixes #10245 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10245
What was wrong
HHS publishes no poverty guideline for Guam, Puerto Rico or the U.S. Virgin Islands, so
spm_unit_fpgis $0 there. On main (50af7fba69):school_meal_fpg_ratiodivided countable income by that $0, giving NaN at zero income andinfabove it. With no categorical eligibility, every territory household was PAID, including those with no income.gov.usda.school_meals.amount.nslpand.sbphad keys only forCONTIGUOUS_US,AKandHI, so the territories' rates read as $0. For a parent and a 10-year-old in Guam or the Virgin Islands in 2026,school_meal_daily_subsidyandfree_school_mealswere $0 even when the tier was FREE through SNAP. The same household in Hawaii gets $9.16 a day and $1,454.40 a year.USDA treats the territories differently:
What changes
New variable
school_meal_fpg:spm_unit_fpg, except that SPM units in Guam, Puerto Rico and the Virgin Islands get the 48-state guideline for their size. It reusesSTATE_GROUPS_WITHOUT_GUIDELINEandCONTIGUOUS_STATE_GROUPfromaca_fpg. Everywhere else it equalsspm_unit_fpg, so anspm_unit_fpginput still flows through.school_meal_fpg_ratiodivides byschool_meal_fpg, andschool_meal_tierrounds the 130% and 185% limits to whole dollars onschool_meal_fpg(both usedspm_unit_fpg).amount/nslp.yamlandamount/sbp.yamlgainGU,PRandVIkeys with the values of the column each notice assigns them:The keys inherit the parent's CPI-U uprating, so projected years stay equal to Hawaii's.
I put the territory values in the rate parameters instead of adding a rate-group helper for two reasons. Which column a territory used changed by school year, so a fixed mapping would be wrong for 2015-2019. Draft #10766 also reads these parameters at January and July dates, and a parameter-only change stays correct at every date without touching its Python.
Who is affected
Only SPM units with
state_codeGU, PR or VI. Example, 2026, a parent and a 10-year-old with no categorical-eligibility input:free_school_meals$1,454.40reduced_price_school_meals$1,328.40Puerto Rico now gets the same values when categorical eligibility is supplied as an input. Without that input, Puerto Rico still raises in
snap_regionon main and on this branch (see "Not in this PR"). No state outside the three territories changes.Tests
16 cases added and 1 changed, all in
policyengine_us/tests/policy/baseline/gov/usda/school_meals/. Expected values come from the USDA notices, and the arithmetic is in each case's comment:school_meal_fpg.yaml(new)spm_unit_fpgand $15,960, $19,950 and $18,360 for NC, AK and HI. Parent and child in Guam: $21,640.school_meal_fpg_ratio.yamlschool_meal_tier.yamlschool_meal_daily_subsidy.yamlschool_meal_paid_daily_subsidy.yamlfree_school_meals.yamlreduced_price_school_meals.yamlThe changed existing case is in
school_meal_tier.yaml: "Puerto Rico's zero guideline keeps the unrounded federal ratio limits in 2026" is now "Puerto Rico's federal ratio limits use the 48-state guideline in 2026".school_meal_fpg: [15_960, 15_960, 15_960].Puerto Rico cases supply
meets_school_meal_categorical_eligibility: false, or a tier input, so they test school meals without reaching the SNAP crash below.Main versus branch (local, policyengine-core 3.37.2):
50af7fba69tests/policy/baseline/gov/usda/school_meals/tests/core/test_school_meal_*.pytest_source_conflicts,test_parameter_yaml_keys,test_uprating_placement,test_reference_urls,test_no_concatenated_reference_urls,test_known_dead_reference_urlsOn main the new cases fail with
school_meal_fpg_ratio[nan inf inf], every territory tier PAID, every daily and paid subsidy 0, andschool_meal_fpgmissing.ruff formatandruff checkare clean on the three changed Python files.Not in this PR
ValueError: Invalid value(s) ['nan'] for enum SNAPRegion, atsnap_region.py:35viasnap_net_incomeandsnap_excess_shelter_expense_deduction. This hitssnapandhousehold_net_incomefor a Puerto Rico adult with no children, school meals or not. Thesnap_regionmap has noPRkey, and Puerto Rico runs the Nutrition Assistance Program instead of SNAP (Model Puerto Rico's Nutrition Assistance Program #46). I found no open issue for it, and a separate issue will cover it.school_meal_tier.pyandschool_meal_daily_subsidy.py. This PR changes one line ofschool_meal_tier.py(spm_unit_fpgtoschool_meal_fpg) and one line of its docstring, and doesn't touchschool_meal_daily_subsidy.py. Whichever PR merges second carries that one-line change into Prorate Head Start and apply effective rates to part-year school meals #10766'sschool_meal_tier_from. Model Georgia reduced-price school meal copay waivers by student and meal #10845 (Georgia copays) touches neither file.axiom: TheAxiomFoundation/rulespec-us#2937 queued
🤖 Generated with Claude Code