Fix Alameda County name string in in_ala#8594
Merged
Merged
Conversation
county_str returns the county enum name, which is ALAMEDA_COUNTY_CA (all caps). The formula compared against "Alameda_COUNTY_CA", which never matched. Correct the literal to match the enum name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8594 +/- ##
============================================
- Coverage 100.00% 77.77% -22.23%
============================================
Files 2 1 -1
Lines 34 9 -25
============================================
- Hits 34 7 -27
- Misses 0 2 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3 tasks
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.
Summary
in_alachecks whether a household is in Alameda County, CA. Its formula comparedcounty_stragainst the literal"Alameda_COUNTY_CA", butcounty_strreturns the county enum name — which isALAMEDA_COUNTY_CA(all caps), matching the convention used by every other county (LOS_ANGELES_COUNTY_CA,RIVERSIDE_COUNTY_CA, etc.). The mixed-case literal never matched, so the formula never identified Alameda County.This corrects the string to
"ALAMEDA_COUNTY_CA".Note on behavior
countydefaults tofirst_county_in_state, which is the alphabetically-first county in the state — for CA that is Alameda. So CA households that do not explicitly set a county/county_fipsnow resolve toin_ala == Trueand become eligible for Alameda General Assistance (defined_for = "in_ala") in microsimulation contexts. This is the intended correction of the string bug.Files
policyengine_us/variables/gov/local/ca/ala/in_ala.py🤖 Generated with Claude Code