-
Notifications
You must be signed in to change notification settings - Fork 201
Adjust SNAP student ineligibility formula #6735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
hua7450
wants to merge
13
commits into
PolicyEngine:master
Choose a base branch
from
hua7450:hua7450/issue6731
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+575
−21
Draft
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
93679d9
Convert .claude from submodule to regular files for experimental deve…
hua7450 eed41ec
Merge branch 'master' of https://github.com/PolicyEngine/policyengine-us
hua7450 65c8f3b
Merge branch 'master' of https://github.com/PolicyEngine/policyengine-us
hua7450 67973a4
Merge branch 'master' of https://github.com/PolicyEngine/policyengine-us
hua7450 2ebfd60
Merge branch 'master' of https://github.com/PolicyEngine/policyengine-us
hua7450 494cd56
Add child age requirements for SNAP student ineligibility
hua7450 6eb13b1
Add Federal Work Study SNAP eligibility and income exclusion
hua7450 19b17b9
Remove .claude folder changes from this PR
hua7450 4833bfb
Fix SNAP student parent parameter descriptions to match actual law
hua7450 e73e556
Merge upstream master and resolve conflicts
hua7450 35185b6
Restore .gitmodules to match upstream master
hua7450 ce066df
Update changelog entry for Federal Work Study implementation
hua7450 c38e5b3
adjust test cases
hua7450 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # fetch-pdf | ||
|
|
||
| Download and extract text from a PDF URL using curl and a PDF text extraction tool. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| # Download PDF | ||
| curl -L -o document.pdf "URL" | ||
|
|
||
| # Extract all text from PDF (requires pdftotext from poppler-utils) | ||
| pdftotext document.pdf output.txt | ||
|
|
||
| # Or use Python's pdfplumber for better text extraction | ||
| python3 -c "import pdfplumber; pdf = pdfplumber.open('document.pdf'); text = '\n\n'.join([page.extract_text() for page in pdf.pages]); print(text)" | ||
| ``` | ||
|
|
||
| ## Installation | ||
|
|
||
| ### macOS | ||
| ```bash | ||
| brew install poppler # for pdftotext | ||
| # or | ||
| pip install pdfplumber # for Python approach | ||
| ``` | ||
|
|
||
| ### Linux | ||
| ```bash | ||
| sudo apt-get install poppler-utils # for pdftotext | ||
| # or | ||
| pip install pdfplumber # for Python approach | ||
| ``` | ||
|
|
||
| ## Example | ||
|
|
||
| ```bash | ||
| # Download a PDF | ||
| curl -L -o document.pdf "https://example.gov/document.pdf" | ||
|
|
||
| # Extract all text | ||
| pdftotext document.pdf document.txt | ||
|
|
||
| # View the extracted text | ||
| cat document.txt | ||
| ``` |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| - bump: patch | ||
| changes: | ||
| changed: | ||
| - Refactor is_snap_ineligible_student formula to align with 7 USC 2015(e). |
12 changes: 12 additions & 0 deletions
12
policyengine_us/parameters/gov/usda/snap/student/young_child.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| description: The Department of Agriculture includes student in the Supplemental Nutrition Assistance Program unit if they are parents caring for a young child under this age. | ||
hua7450 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| values: | ||
| 2005-01-01: 6 | ||
|
|
||
| metadata: | ||
| unit: year | ||
| period: year | ||
| label: SNAP student parent young child age threshold | ||
| reference: | ||
| - title: 7 U.S. Code § 2015 - Eligibility disqualifications (e)(5) | ||
hua7450 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| href: https://www.law.cornell.edu/uscode/text/7/2015#e | ||
12 changes: 12 additions & 0 deletions
12
policyengine_us/parameters/gov/usda/snap/student/younger_child.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| description: The Department of Agriculture includes student in the Supplemental Nutrition Assistance Program unit if they are parent caring for a younger child under this age. | ||
hua7450 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| values: | ||
| 2005-01-01: 12 | ||
|
|
||
| metadata: | ||
| unit: year | ||
| period: year | ||
| label: SNAP student parent younger child age threshold | ||
| reference: | ||
| - title: 7 U.S. Code § 2015 - Eligibility disqualifications (e)(8) | ||
| href: https://www.law.cornell.edu/uscode/text/7/2015#e | ||
130 changes: 124 additions & 6 deletions
130
...s/tests/policy/baseline/gov/usda/snap/eligibility/student/is_snap_ineligible_student.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,139 @@ | ||
| - name: Student who does not meet any exemption criteria | ||
| - name: College student who does not meet any exemption criteria | ||
| period: 2022 | ||
| input: | ||
| is_full_time_student: true | ||
| is_full_time_college_student: true | ||
| age: 18 | ||
| is_disabled: false | ||
| weekly_hours_worked: false | ||
| weekly_hours_worked: 0 | ||
| is_parent: false | ||
| output: | ||
| is_snap_ineligible_student: true | ||
|
|
||
| - name: Student who is under the age limit | ||
| - name: College student who is under the age limit | ||
| period: 2022 | ||
| input: | ||
| is_full_time_student: true | ||
| is_full_time_college_student: true | ||
| age: 17 | ||
| is_disabled: false | ||
| weekly_hours_worked: false | ||
| weekly_hours_worked: 0 | ||
| is_parent: false | ||
| output: | ||
| is_snap_ineligible_student: false | ||
|
|
||
| - name: College student receiving TANF benefits | ||
| period: 2022 | ||
| input: | ||
| is_full_time_college_student: true | ||
| age: 20 | ||
| is_disabled: false | ||
| weekly_hours_worked: 0 | ||
| is_parent: false | ||
| tanf_person: 500 | ||
| output: | ||
| is_snap_ineligible_student: false | ||
|
|
||
| - name: K-12 student is not affected by student rule | ||
| period: 2022 | ||
| input: | ||
| is_full_time_college_student: false | ||
| is_in_k12_school: true | ||
| age: 16 | ||
| is_disabled: false | ||
| weekly_hours_worked: 0 | ||
| is_parent: false | ||
| output: | ||
| is_snap_ineligible_student: false | ||
|
|
||
| - name: Single parent college student with child under 12 is eligible | ||
| period: 2022 | ||
| input: | ||
| people: | ||
| parent: | ||
| is_full_time_college_student: true | ||
| age: 25 | ||
| is_disabled: false | ||
| weekly_hours_worked: 0 | ||
| tanf_person: 0 | ||
| child: | ||
| age: 8 | ||
| tanf_person: 0 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [parent, child] | ||
| spm_units: | ||
| spm_unit: | ||
| members: [parent, child] | ||
| output: | ||
| is_snap_ineligible_student: [false, false] | ||
|
|
||
| - name: Single parent college student with child over 12 is ineligible | ||
| period: 2022 | ||
| input: | ||
| people: | ||
| parent: | ||
| is_full_time_college_student: true | ||
| age: 35 | ||
| is_disabled: false | ||
| weekly_hours_worked: 0 | ||
| tanf_person: 0 | ||
| child: | ||
| age: 14 | ||
| tanf_person: 0 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [parent, child] | ||
| spm_units: | ||
| spm_unit: | ||
| members: [parent, child] | ||
| output: | ||
| is_snap_ineligible_student: [true, false] | ||
|
|
||
| - name: Two parent household with child under 6 is eligible | ||
| period: 2022 | ||
| input: | ||
| people: | ||
| parent1: | ||
| is_full_time_college_student: true | ||
| age: 28 | ||
| is_disabled: false | ||
| weekly_hours_worked: 0 | ||
| tanf_person: 0 | ||
| parent2: | ||
| age: 30 | ||
| tanf_person: 0 | ||
| child: | ||
| age: 4 | ||
| tanf_person: 0 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [parent1, parent2, child] | ||
| spm_units: | ||
| spm_unit: | ||
| members: [parent1, parent2, child] | ||
| output: | ||
| is_snap_ineligible_student: [false, false, false] | ||
|
|
||
| - name: Two parent household with child age 6-12 is ineligible | ||
| period: 2022 | ||
| input: | ||
| people: | ||
| parent1: | ||
| is_full_time_college_student: true | ||
| age: 32 | ||
| is_disabled: false | ||
| weekly_hours_worked: 0 | ||
| tanf_person: 0 | ||
| parent2: | ||
| age: 34 | ||
| tanf_person: 0 | ||
| child: | ||
| age: 8 | ||
| tanf_person: 0 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [parent1, parent2, child] | ||
| spm_units: | ||
| spm_unit: | ||
| members: [parent1, parent2, child] | ||
| output: | ||
| is_snap_ineligible_student: [true, false, false] |
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
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.
Uh oh!
There was an error while loading. Please reload this page.