policyengine-us 1.360.1__py3-none-any.whl → 1.361.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of policyengine-us might be problematic. Click here for more details.

@@ -0,0 +1,11 @@
1
+ description: The Department of Agriculture excludes earned income of a household member who is an elementary or secondary school student and younger than this age, under the Supplemental Nutrition Assistance Program.
2
+ values:
3
+ 2014-01-01: 17
4
+
5
+ metadata:
6
+ unit: year
7
+ period: year
8
+ label: SNAP child earned income exclusion age threshold
9
+ reference:
10
+ - title: 7 U.S. Code § 2014 - Eligible households (d)(7)
11
+ href: https://www.law.cornell.edu/uscode/text/7/2014#d_7
@@ -0,0 +1,29 @@
1
+ - name: Case 1, is income exclusion child, not a countable earner.
2
+ period: 2024-01
3
+ input:
4
+ age: 17
5
+ is_in_k12_school: true
6
+ output:
7
+ snap_countable_earner: false
8
+
9
+ - name: Case 2, not an income exclusion child due to age, is a countable earner.
10
+ period: 2024-01
11
+ input:
12
+ age: 18
13
+ is_in_k12_school: true
14
+ output:
15
+ snap_countable_earner: true
16
+
17
+ - name: Case 3, not an income exclusion child due to not in school, is a countable earner.
18
+ period: 2024-01
19
+ input:
20
+ age: 17
21
+ is_in_k12_school: false
22
+ output:
23
+ snap_countable_earner: true
24
+
25
+ - name: Case 4, default member's income should count.
26
+ period: 2024-01
27
+ input:
28
+ output:
29
+ snap_countable_earner: true
@@ -0,0 +1,29 @@
1
+ - name: Case 1, is income exclusion child.
2
+ period: 2024-01
3
+ input:
4
+ age: 17
5
+ is_in_k12_school: true
6
+ output:
7
+ snap_excluded_child_earner: true
8
+
9
+ - name: Case 2, not an income exclusion child due to age.
10
+ period: 2024-01
11
+ input:
12
+ age: 18
13
+ is_in_k12_school: true
14
+ output:
15
+ snap_excluded_child_earner: false
16
+
17
+ - name: Case 3, not an income exclusion child due to not in school.
18
+ period: 2024-01
19
+ input:
20
+ age: 17
21
+ is_in_k12_school: false
22
+ output:
23
+ snap_excluded_child_earner: false
24
+
25
+ - name: Case 4, default member is not an income exclusion child.
26
+ period: 2024-01
27
+ input:
28
+ output:
29
+ snap_excluded_child_earner: false
@@ -1,4 +1,4 @@
1
- - name: Family of 4, no member(s) with disabilities, income of 24k/year (Standard Test)
1
+ - name: Case 1, Family of 4, no member(s) with disabilities, income of 24k/year (Standard Test)
2
2
  period: 2022-01
3
3
  absolute_error_margin: 0.01 # Floating point issue.
4
4
  input:
@@ -97,3 +97,32 @@
97
97
  snap_max_allotment: 658
98
98
  # The family’s monthly SNAP benefit is $612.
99
99
  snap_normal_allotment: 612
100
+
101
+ - name: Test for exclude child income, same as case 1 but adding income to one child.
102
+ period: 2022-01
103
+ absolute_error_margin: 0.01 # Floating point issue.
104
+ input:
105
+ people:
106
+ person_1:
107
+ age: 30
108
+ employment_income:
109
+ 2022: 2_000 * 12
110
+ person_2:
111
+ age: 35
112
+ person_3:
113
+ age: 17
114
+ is_in_k12_school: true
115
+ employment_income: 2_000 * 12
116
+ person_4:
117
+ age: 15
118
+ spm_units:
119
+ spm_unit:
120
+ members: [person_1, person_2, person_3, person_4]
121
+ households:
122
+ household:
123
+ state_code_str: CA
124
+ output:
125
+ snap_earned_income_deduction: 2_000 * 0.2 # Flat 20% rate.
126
+ snap_standard_deduction: 184 #(parameter for family of 4 in contiguous US)
127
+ snap_excess_shelter_expense_deduction: 0 # No shelter costs reported.
128
+ snap_max_allotment: 835 # (parameter for family of 4 in contiguous US).
@@ -0,0 +1,13 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class snap_countable_earner(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Countable income earner"
8
+ documentation = "Whether this person's earned income is counted for SNAP"
9
+ definition_period = MONTH
10
+ reference = "https://www.law.cornell.edu/uscode/text/7/2014"
11
+
12
+ def formula(person, period, parameters):
13
+ return ~person("snap_excluded_child_earner", period)
@@ -12,4 +12,4 @@ class snap_earned_income(Variable):
12
12
  reference = "https://www.law.cornell.edu/cfr/text/7/273.9#b_1"
13
13
  unit = USD
14
14
 
15
- adds = "gov.usda.snap.income.sources.earned"
15
+ adds = ["snap_earned_income_person"]
@@ -0,0 +1,14 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class snap_earned_income_person(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ definition_period = MONTH
8
+ label = "SNAP earned income person"
9
+ documentation = "Earned income per person for calculating the SNAP earned income deduction"
10
+ reference = "https://www.law.cornell.edu/cfr/text/7/273.9#b_1"
11
+ unit = USD
12
+ defined_for = "snap_countable_earner"
13
+
14
+ adds = "gov.usda.snap.income.sources.earned"
@@ -0,0 +1,17 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class snap_excluded_child_earner(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Excluded child earner"
8
+ documentation = "Whether this person is a child whose earned income is excluded from SNAP "
9
+ definition_period = MONTH
10
+ reference = "https://www.law.cornell.edu/uscode/text/7/2014#d_7"
11
+
12
+ def formula(person, period, parameters):
13
+ p = p = parameters(period).gov.usda.snap.income
14
+ age = person("monthly_age", period)
15
+ is_in_k12_school = person("is_in_k12_school", period)
16
+ age_eligible = age <= p.child_income_exclusion_age
17
+ return is_in_k12_school & age_eligible
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine-us
3
- Version: 1.360.1
3
+ Version: 1.361.0
4
4
  Summary: Add your description here.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License-File: LICENSE
@@ -2985,6 +2985,7 @@ policyengine_us/parameters/gov/usda/snap/asset_test/limit.yaml,sha256=_50BAmu84R
2985
2985
  policyengine_us/parameters/gov/usda/snap/emergency_allotment/allowed.yaml,sha256=F3wNVVVYi7YZ6R0i73854Dco26REbhMEfpy9HzpdYpw,631
2986
2986
  policyengine_us/parameters/gov/usda/snap/emergency_allotment/in_effect.yaml,sha256=scGNcKkui593vmvpQtKr7X6rR1r7QeZTQvIHLvmfByo,2155
2987
2987
  policyengine_us/parameters/gov/usda/snap/emergency_allotment/minimum.yaml,sha256=6F7w3rbd93uee68sC_Ao7abJN4PvbOgG_SC95mk0SG8,438
2988
+ policyengine_us/parameters/gov/usda/snap/income/child_income_exclusion_age.yaml,sha256=_WZz7hR4BXl6ilpUmLf55A0fgVJMGvoDjGc6-EwabVc,479
2988
2989
  policyengine_us/parameters/gov/usda/snap/income/deductions/allowed.yaml,sha256=NHambVNl5AHdSd7ctX2xhHJvu-K5is5wheBZd5QWWdM,552
2989
2990
  policyengine_us/parameters/gov/usda/snap/income/deductions/child_support.yaml,sha256=83hYi6xVBycFGgB0D3WV_qyE3G5K-I5yM1kQWyi80Gk,2932
2990
2991
  policyengine_us/parameters/gov/usda/snap/income/deductions/earned_income.yaml,sha256=qpTvdH3qYrgp6DjuC01YD0QzTMuSHt7AQvmnJKcyjVY,289
@@ -4943,7 +4944,7 @@ policyengine_us/tests/policy/baseline/gov/usda/school_meals/school_meal_fpg_rati
4943
4944
  policyengine_us/tests/policy/baseline/gov/usda/school_meals/school_meal_net_subsidy.yaml,sha256=tG0qyY9FMP9xzrqCDeM11ERzepd0vziKIaQTmE_Q7JI,330
4944
4945
  policyengine_us/tests/policy/baseline/gov/usda/school_meals/school_meal_paid_daily_subsidy.yaml,sha256=6bUsc4xFDAvT7cK1vNB1SSkermTd5gb-qECZHOcOsPk,138
4945
4946
  policyengine_us/tests/policy/baseline/gov/usda/school_meals/school_meal_tier.yaml,sha256=xCRm9JQd5H1VKTvaOWr6EM4v7SZg2HASoasjlTggYSg,833
4946
- policyengine_us/tests/policy/baseline/gov/usda/snap/integration.yaml,sha256=ZPMJIN8ajzp9wqDS-KSucltjlhkRqauLjcMwKOSPwpM,3651
4947
+ policyengine_us/tests/policy/baseline/gov/usda/snap/integration.yaml,sha256=-ypJgph27nJXFOMI7fRJQt1rQ8mQIw74DTpEtzC8ptI,4542
4947
4948
  policyengine_us/tests/policy/baseline/gov/usda/snap/snap.yaml,sha256=8CsJootLiJmI-rEiFW48qmwbjZnd40XZDDaQLbQm-BU,1341
4948
4949
  policyengine_us/tests/policy/baseline/gov/usda/snap/snap_emergency_allotment.yaml,sha256=2psS38VMAU-_UdBmKwI6OtaMTiQ2gTuUSzT8aEhAY2U,1233
4949
4950
  policyengine_us/tests/policy/baseline/gov/usda/snap/snap_expected_contribution.yaml,sha256=UoJF9UxonhMco0w6ic5BK9eDzFJiop9W6KOeAM8K2uc,1868
@@ -4964,6 +4965,8 @@ policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/student/is_snap_
4964
4965
  policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/work_requirements/meets_snap_abawd_work_requirements.yaml,sha256=gW2zRWpVvS75V_wIomvNjWIy68bhVdwHaP4Wjm3Dlak,4370
4965
4966
  policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/work_requirements/meets_snap_general_work_requirements.yaml,sha256=_XHqMZQeOADvG09gW1aaayals9whGUBDoP6mmpQesxc,1907
4966
4967
  policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/work_requirements/meets_snap_work_requirements.yaml,sha256=wLLpqUlDcwnKSC9CYxe7Uts_UWnl_-wl_L3tdTRgeus,1157
4968
+ policyengine_us/tests/policy/baseline/gov/usda/snap/income/snap_countable_earner.yaml,sha256=H4fN1CLtjcCRMkJFbHbWMSRrH950F01YxSWIFPaLE-0,691
4969
+ policyengine_us/tests/policy/baseline/gov/usda/snap/income/snap_excluded_child_earner.yaml,sha256=mjJfUBqDRK5yuqYS51ol6b1ndEkNH9K00sDxhdEcHvs,654
4967
4970
  policyengine_us/tests/policy/baseline/gov/usda/snap/income/snap_fpg.yaml,sha256=kO_teYeT10oJigzqNcSnM-Z6Yx6vjmrwlyTUQwXDoyM,501
4968
4971
  policyengine_us/tests/policy/baseline/gov/usda/snap/income/snap_net_income.yaml,sha256=vZIxjCNE4T-_jsjpPo2gW0ThF8cGZXaLsApt_aUWlUs,150
4969
4972
  policyengine_us/tests/policy/baseline/gov/usda/snap/income/snap_net_income_fpg_ratio.yaml,sha256=8-I5fim9FVpL42RatL8TXx1TXZKFegCokNVIvLaIeqI,184
@@ -7698,7 +7701,10 @@ policyengine_us/variables/gov/usda/snap/eligibility/student/is_snap_ineligible_s
7698
7701
  policyengine_us/variables/gov/usda/snap/eligibility/work_requirements/meets_snap_abawd_work_requirements.py,sha256=OWgHQxb5ogKSYbUFS6kH_CFO3WfcQPk_8KAnX3laPvk,3145
7699
7702
  policyengine_us/variables/gov/usda/snap/eligibility/work_requirements/meets_snap_general_work_requirements.py,sha256=EBS5zHXyoEjsyqirNsQaGg04eecJoLmHXwzDJvjmXAc,1475
7700
7703
  policyengine_us/variables/gov/usda/snap/eligibility/work_requirements/meets_snap_work_requirements.py,sha256=gtkZDYyTzQcsSISn15Os-AxA4fbihUOUerBkMyM786Q,1289
7701
- policyengine_us/variables/gov/usda/snap/income/snap_earned_income.py,sha256=PsA6Fj5c5Cxdday55YXyTK_FPPg725Yh-dglGGITw4c,418
7704
+ policyengine_us/variables/gov/usda/snap/income/snap_countable_earner.py,sha256=cLIXE-hTApfoZDmZ2bYAoZurIMKteftK58RRk3I_TLE,441
7705
+ policyengine_us/variables/gov/usda/snap/income/snap_earned_income.py,sha256=d7kTWA6UZEOTFEzM1E97EcPanu1bRy0FLmnvn_2oG00,410
7706
+ policyengine_us/variables/gov/usda/snap/income/snap_earned_income_person.py,sha256=ye8ySzZDiK-ceW_YwA7UwRcDirhl3rTopgN1CBkASsk,469
7707
+ policyengine_us/variables/gov/usda/snap/income/snap_excluded_child_earner.py,sha256=yEzUmRZXDUBj81lFIl-Ot8GSQX8q-AAjnlcamoGDh38,673
7702
7708
  policyengine_us/variables/gov/usda/snap/income/snap_fpg.py,sha256=d70aevKytv9K9pAkwcxqo6lKZZt6kg2dtmIf-gZzgYY,897
7703
7709
  policyengine_us/variables/gov/usda/snap/income/snap_net_income.py,sha256=mXtUI04iFfTHuVIVwf6fyIprwqqLRivmIGenxJZCPsk,524
7704
7710
  policyengine_us/variables/gov/usda/snap/income/snap_net_income_fpg_ratio.py,sha256=AfcQiQR0Y0NTp0Sc-swxve8uZJGD2a9b6bOM8XM2ckA,476
@@ -8220,8 +8226,8 @@ policyengine_us/variables/input/farm_income.py,sha256=BEKxYmHNNnWJAAvULl5qZJigy5
8220
8226
  policyengine_us/variables/input/geography.py,sha256=XmBlgXhzBoLRKk6R8taVZHqUw1eU8MbNeGS9iJ7_l44,4506
8221
8227
  policyengine_us/variables/input/self_employment_income.py,sha256=PwsGz8R4lRikKWUYOhsC0qosNNLXq4f5SQmfw4S3mk8,511
8222
8228
  policyengine_us/variables/input/self_employment_income_before_lsr.py,sha256=E8fcX9Nlyqz8dziHhQv_euutdmoIwFMMWePUwbbwv_w,379
8223
- policyengine_us-1.360.1.dist-info/METADATA,sha256=xw-zdFonef5VLjv1jyuv5PtMLmi_5vXK2ibeLQqqyOI,1693
8224
- policyengine_us-1.360.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8225
- policyengine_us-1.360.1.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8226
- policyengine_us-1.360.1.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8227
- policyengine_us-1.360.1.dist-info/RECORD,,
8229
+ policyengine_us-1.361.0.dist-info/METADATA,sha256=0y4m7brVTNFpXGnjHnC4Qj5wK0aeQ5SpWyVIgfOOfAw,1693
8230
+ policyengine_us-1.361.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8231
+ policyengine_us-1.361.0.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8232
+ policyengine_us-1.361.0.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8233
+ policyengine_us-1.361.0.dist-info/RECORD,,