policyengine-us 1.398.1__py3-none-any.whl → 1.399.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.

Files changed (29) hide show
  1. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/age_threshold/older.yaml +14 -0
  2. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/age_threshold/student.yaml +14 -0
  3. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/age_threshold/younger.yaml +14 -0
  4. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/income_limit/nonstudent.yaml +12 -0
  5. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/income_limit/student.yaml +12 -0
  6. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/personal.yaml +23 -0
  7. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/veteran.yaml +12 -0
  8. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml +1 -4
  9. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/integration.yaml +32 -0
  10. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_dependents_exemption.yaml +60 -0
  11. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_eligible_dependent_for_exemption.yaml +26 -0
  12. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_nonstudent.yaml +26 -0
  13. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_student.yaml +54 -0
  14. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/pr_personal_exemption.yaml +15 -0
  15. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/pr_veteran_exemption.yaml +37 -0
  16. policyengine_us/tests/policy/baseline/gov/territories/pr/tax_unit_dependent/integration.yaml +34 -0
  17. policyengine_us/tests/policy/baseline/gov/territories/pr/tax_unit_dependent/pr_is_tax_unit_dependent.yaml +65 -0
  18. policyengine_us/variables/gov/territories/pr/pr_is_tax_unit_dependent.py +42 -0
  19. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_dependents_exemption.py +27 -0
  20. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_eligible_dependent_for_exemption.py +18 -0
  21. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_nonstudent.py +21 -0
  22. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_student.py +24 -0
  23. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/pr_personal_exemption.py +19 -0
  24. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/pr_veteran_exemption.py +19 -0
  25. {policyengine_us-1.398.1.dist-info → policyengine_us-1.399.0.dist-info}/METADATA +1 -1
  26. {policyengine_us-1.398.1.dist-info → policyengine_us-1.399.0.dist-info}/RECORD +29 -6
  27. {policyengine_us-1.398.1.dist-info → policyengine_us-1.399.0.dist-info}/WHEEL +0 -0
  28. {policyengine_us-1.398.1.dist-info → policyengine_us-1.399.0.dist-info}/entry_points.txt +0 -0
  29. {policyengine_us-1.398.1.dist-info → policyengine_us-1.399.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,14 @@
1
+ description: Puerto Rico provides a dependent exemption amount for eligible dependents at or above this age.
2
+
3
+ values:
4
+ 2023-01-01: 65
5
+
6
+ metadata:
7
+ unit: year
8
+ period: year
9
+ label: Puerto Rico dependent older age limit
10
+ reference:
11
+ - title: P.R. Laws tit. 13, § 30138 (c)
12
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
13
+ - title: Gov. of Puerto Rico Individual Income Tax Return Instructions 2023
14
+ href: https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28
@@ -0,0 +1,14 @@
1
+ description: Puerto Rico provides a dependent exemption amount for eligible student dependents below this age.
2
+
3
+ values:
4
+ 2023-01-01: 26
5
+
6
+ metadata:
7
+ unit: year
8
+ period: year
9
+ label: Puerto Rico full time student dependent age limit
10
+ reference:
11
+ - title: P.R. Laws tit. 13, § 30138 (c)
12
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
13
+ - title: Gov. of Puerto Rico Individual Income Tax Return Instructions 2023
14
+ href: https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28
@@ -0,0 +1,14 @@
1
+ description: Puerto Rico provides a dependent exemption amount for eligible dependents below this age.
2
+
3
+ values:
4
+ 2023-01-01: 21
5
+
6
+ metadata:
7
+ unit: year
8
+ period: year
9
+ label: Puerto Rico dependent younger age limit
10
+ reference:
11
+ - title: P.R. Laws tit. 13, § 30138 (c)
12
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
13
+ - title: Gov. of Puerto Rico Individual Income Tax Return Instructions 2023
14
+ href: https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28
@@ -0,0 +1,12 @@
1
+ description: Puerto Rico limits the dependent exemption to non-students with gross income below this amount.
2
+ values:
3
+ 2023-01-01: 2_500
4
+ metadata:
5
+ unit: currency-USD
6
+ period: year
7
+ label: Puerto Rico dependent exemption income limit for non-students
8
+ reference:
9
+ - title: Gov. of Puerto Rico Individual Income Tax Return Instructions 2023
10
+ href: https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28
11
+ - title: P.R. Laws tit. 13, § 30138 (b)(1)(i)
12
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
@@ -0,0 +1,12 @@
1
+ description: Puerto Rico limits the dependent exemption to students with gross income below this amount.
2
+ values:
3
+ 2023-01-01: 7_500
4
+ metadata:
5
+ unit: currency-USD
6
+ period: year
7
+ label: Puerto Rico dependent exemption income limit for students
8
+ reference:
9
+ - title: Gov. of Puerto Rico Individual Income Tax Return Instructions 2023
10
+ href: https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28
11
+ - title: P.R. Laws tit. 13, § 30138 (b)(1)(ii)
12
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
@@ -0,0 +1,23 @@
1
+ description: Puerto Rico provides the following personal exemption amount, based on filing status.
2
+ SINGLE:
3
+ 2023-01-01: 3_500
4
+ JOINT:
5
+ 2023-01-01: 7_000
6
+ SEPARATE:
7
+ 2023-01-01: 3_500
8
+ SURVIVING_SPOUSE:
9
+ 2023-01-01: 7_000
10
+ HEAD_OF_HOUSEHOLD:
11
+ 2023-01-01: 3_500
12
+ ## Legal code only specifies values for joint, single, and separate filing statuses
13
+ metadata:
14
+ unit: currency-USD
15
+ period: year
16
+ breakdown:
17
+ - filing_status
18
+ label: Puerto Rico personal exemption amount
19
+ reference:
20
+ - title: Gov. of Puerto Rico Form 482.0 2024
21
+ href: https://hacienda.pr.gov/sites/default/files/individuals_2024_rev._jul_12_24_9-30-24_informative.pdf#page=2
22
+ - title: P.R. Laws tit. 13, § 30138 (a)
23
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
@@ -0,0 +1,12 @@
1
+ description: Puerto Rico provides the following exemption amount for each veteran in the household.
2
+ values:
3
+ 2023-01-01: 1_500
4
+ metadata:
5
+ unit: currency-USD
6
+ period: year
7
+ label: Puerto Rico veteran exemption amount
8
+ reference:
9
+ - title: Gov. of Puerto Rico Form 482.0 2024
10
+ href: https://hacienda.pr.gov/sites/default/files/individuals_2024_rev._jul_12_24_9-30-24_informative.pdf#page=2
11
+ - title: P.R. Laws tit. 13, § 30138 (a)(2)
12
+ href: https://law.justia.com/codes/puerto-rico/title-thirteen/subtitle-17/part-ii/chapter-1005/subchapter-c/30138/
@@ -17,7 +17,6 @@
17
17
  state_code: PR
18
18
  output:
19
19
  pr_low_income_credit_eligible: true
20
-
21
20
  - name: Two ineligible people
22
21
  absolute_error_margin: 0.01
23
22
  period: 2024
@@ -37,7 +36,6 @@
37
36
  state_code: PR
38
37
  output:
39
38
  pr_low_income_credit_eligible: false
40
-
41
39
  - name: One person eligible
42
40
  absolute_error_margin: 0.01
43
41
  period: 2024
@@ -57,7 +55,6 @@
57
55
  state_code: PR
58
56
  output:
59
57
  pr_low_income_credit_eligible: true
60
-
61
58
  - name: One person age eligible but income ineligible
62
59
  absolute_error_margin: 0.01
63
60
  period: 2024
@@ -76,4 +73,4 @@
76
73
  household:
77
74
  state_code: PR
78
75
  output:
79
- pr_low_income_credit_eligible: false
76
+ pr_low_income_credit_eligible: false
@@ -0,0 +1,32 @@
1
+ - name: 1 eligible dependent, 1 noneligible dependent
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person1:
6
+ pr_gross_income_person: 7_000
7
+ is_full_time_college_student: true
8
+ pr_is_tax_unit_dependent: true
9
+ age: 20
10
+ person2:
11
+ pr_gross_income_person: 2_500
12
+ is_full_time_college_student: false
13
+ pr_is_tax_unit_dependent: true
14
+ age: 27
15
+ person3:
16
+ pr_gross_income_person: 10_000
17
+ is_full_time_college_student: false
18
+ pr_is_tax_unit_dependent: false
19
+ age: 30
20
+ tax_units:
21
+ tax_unit:
22
+ members: [person1, person2, person3]
23
+ filing_status: SEPARATE
24
+ households:
25
+ household:
26
+ members: [person1, person2, person3]
27
+ state_code: PR
28
+ output:
29
+ pr_exemptions_is_eligible_nonstudent: [false, false, false]
30
+ pr_exemptions_is_eligible_student: [true, false, false]
31
+ pr_eligible_dependent_for_exemption: [true, false, false]
32
+ pr_dependents_exemption: 1_250
@@ -0,0 +1,60 @@
1
+ - name: No eligible dependents
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person1:
6
+ pr_eligible_dependent_for_exemption: false
7
+ person2:
8
+ pr_eligible_dependent_for_exemption: false
9
+ tax_units:
10
+ tax_unit:
11
+ members: [person1, person2]
12
+ filing_status: JOINT
13
+ households:
14
+ household:
15
+ members: [person1, person2]
16
+ state_code: PR
17
+ output:
18
+ pr_dependents_exemption: 0
19
+
20
+ - name: Eligible dependents in married filing separate household
21
+ period: 2024
22
+ input:
23
+ people:
24
+ person1:
25
+ pr_eligible_dependent_for_exemption: true
26
+ person2:
27
+ pr_eligible_dependent_for_exemption: false
28
+ tax_units:
29
+ tax_unit:
30
+ members: [person1, person2]
31
+ filing_status: SEPARATE
32
+ households:
33
+ household:
34
+ members: [person1, person2]
35
+ state_code: PR
36
+ output:
37
+ pr_dependents_exemption: 1_250
38
+
39
+ - name: Eligible dependents in joint household
40
+ period: 2024
41
+ input:
42
+ people:
43
+ person1:
44
+ pr_eligible_dependent_for_exemption: true
45
+ person2:
46
+ pr_eligible_dependent_for_exemption: false
47
+ person3:
48
+ pr_eligible_dependent_for_exemption: true
49
+ person4:
50
+ pr_eligible_dependent_for_exemption: false
51
+ tax_units:
52
+ tax_unit:
53
+ members: [person1, person2, person3, person4]
54
+ filing_status: JOINT
55
+ households:
56
+ household:
57
+ members: [person1, person2, person3, person4]
58
+ state_code: PR
59
+ output:
60
+ pr_dependents_exemption: 5_000
@@ -0,0 +1,26 @@
1
+ - name: Eligible student dependent
2
+ period: 2024
3
+ input:
4
+ pr_exemptions_is_eligible_student: true
5
+ pr_exemptions_is_eligible_nonstudent: false
6
+ state_code: PR
7
+ output:
8
+ pr_eligible_dependent_for_exemption: true
9
+
10
+ - name: Eligible nonstudent dependent
11
+ period: 2024
12
+ input:
13
+ pr_exemptions_is_eligible_student: false
14
+ pr_exemptions_is_eligible_nonstudent: true
15
+ state_code: PR
16
+ output:
17
+ pr_eligible_dependent_for_exemption: true
18
+
19
+ - name: Noneligible person
20
+ period: 2024
21
+ input:
22
+ pr_exemptions_is_eligible_student: false
23
+ pr_exemptions_is_eligible_nonstudent: false
24
+ state_code: PR
25
+ output:
26
+ pr_eligible_dependent_for_exemption: false
@@ -0,0 +1,26 @@
1
+ - name: Eligible dependent
2
+ period: 2024
3
+ input:
4
+ pr_is_tax_unit_dependent: true
5
+ pr_gross_income_person: 2_499
6
+ state_code: PR
7
+ output:
8
+ pr_exemptions_is_eligible_nonstudent: true
9
+
10
+ - name: Noneligible dependent
11
+ period: 2024
12
+ input:
13
+ pr_is_tax_unit_dependent: true
14
+ pr_gross_income_person: 2_501
15
+ state_code: PR
16
+ output:
17
+ pr_exemptions_is_eligible_nonstudent: false
18
+
19
+ - name: Noneligible person
20
+ period: 2024
21
+ input:
22
+ pr_is_tax_unit_dependent: false
23
+ pr_gross_income_person: 2_000
24
+ state_code: PR
25
+ output:
26
+ pr_exemptions_is_eligible_nonstudent: false
@@ -0,0 +1,54 @@
1
+ - name: Eligible student dependent
2
+ period: 2024
3
+ input:
4
+ pr_is_tax_unit_dependent: true
5
+ is_full_time_college_student: true
6
+ pr_gross_income_person: 7_499
7
+ age: 25
8
+ state_code: PR
9
+ output:
10
+ pr_exemptions_is_eligible_student: true
11
+
12
+ - name: Noneligible student dependent, too high income
13
+ period: 2024
14
+ input:
15
+ pr_is_tax_unit_dependent: true
16
+ is_full_time_college_student: true
17
+ pr_gross_income_person: 7_501
18
+ age: 20
19
+ state_code: PR
20
+ output:
21
+ pr_exemptions_is_eligible_student: false
22
+
23
+ - name: Noneligible student dependent, too high income
24
+ period: 2024
25
+ input:
26
+ pr_is_tax_unit_dependent: true
27
+ is_full_time_college_student: true
28
+ pr_gross_income_person: 7_499
29
+ age: 26
30
+ state_code: PR
31
+ output:
32
+ pr_exemptions_is_eligible_student: false
33
+
34
+ - name: Noneligible, not a student dependent
35
+ period: 2024
36
+ input:
37
+ pr_is_tax_unit_dependent: true
38
+ is_full_time_college_student: false
39
+ pr_gross_income_person: 5_000
40
+ age: 18
41
+ state_code: PR
42
+ output:
43
+ pr_exemptions_is_eligible_student: false
44
+
45
+ - name: Noneligible, not a student, not a dependent
46
+ period: 2024
47
+ input:
48
+ pr_is_tax_unit_dependent: false
49
+ is_full_time_college_student: false
50
+ pr_gross_income_person: 5_000
51
+ age: 30
52
+ state_code: PR
53
+ output:
54
+ pr_exemptions_is_eligible_student: false
@@ -0,0 +1,15 @@
1
+ - name: Married household
2
+ period: 2024
3
+ input:
4
+ state_code: PR
5
+ filing_status: JOINT
6
+ output:
7
+ pr_personal_exemption: 7_000
8
+
9
+ - name: Single person
10
+ period: 2024
11
+ input:
12
+ state_code: PR
13
+ filing_status: SINGLE
14
+ output:
15
+ pr_personal_exemption: 3_500
@@ -0,0 +1,37 @@
1
+ - name: Two eligible veterans filing jointly
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person1:
6
+ is_veteran: true
7
+ person2:
8
+ is_veteran: true
9
+ tax_units:
10
+ tax_unit:
11
+ members: [person1, person2]
12
+ filing_status: JOINT
13
+ households:
14
+ household:
15
+ state_code: PR
16
+ members: [person1, person2]
17
+ output:
18
+ pr_veteran_exemption: [1_500, 1_500]
19
+
20
+ - name: One eligible veteran and one ineligible veteran filing jointly
21
+ period: 2024
22
+ input:
23
+ people:
24
+ person1:
25
+ is_veteran: true
26
+ person2:
27
+ is_veteran: false
28
+ tax_units:
29
+ tax_unit:
30
+ members: [person1, person2]
31
+ filing_status: JOINT
32
+ households:
33
+ household:
34
+ state_code: PR
35
+ members: [person1, person2]
36
+ output:
37
+ pr_veteran_exemption: [1_500, 0]
@@ -0,0 +1,34 @@
1
+ - name: 1 head of household, 3 dependents
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person1:
6
+ is_parent_of_filer_or_spouse: false
7
+ is_incapable_of_self_care: false
8
+ is_full_time_student: false
9
+ age: 40
10
+ person2:
11
+ is_parent_of_filer_or_spouse: true
12
+ is_incapable_of_self_care: false
13
+ is_full_time_student: true
14
+ age: 60
15
+ person3:
16
+ is_parent_of_filer_or_spouse: false
17
+ is_incapable_of_self_care: true
18
+ is_full_time_student: false
19
+ age: 25
20
+ person4:
21
+ is_parent_of_filer_or_spouse: false
22
+ is_incapable_of_self_care: false
23
+ is_full_time_student: false
24
+ age: 20
25
+ tax_units:
26
+ tax_unit:
27
+ members: [person1, person2, person3, person4]
28
+ filing_status: SINGLE
29
+ households:
30
+ household:
31
+ members: [person1, person2, person3, person4]
32
+ state_code: PR
33
+ output:
34
+ pr_is_tax_unit_dependent: [false, true, true, true]
@@ -0,0 +1,65 @@
1
+ - name: Eligible student dependent
2
+ period: 2024
3
+ input:
4
+ state_code: PR
5
+ age: 25
6
+ is_parent_of_filer_or_spouse: false
7
+ is_incapable_of_self_care: false
8
+ is_full_time_college_student: true
9
+ output:
10
+ pr_is_tax_unit_dependent: true
11
+
12
+ - name: Eligible dependent incapable of self-care
13
+ period: 2024
14
+ input:
15
+ state_code: PR
16
+ age: 26
17
+ is_parent_of_filer_or_spouse: false
18
+ is_incapable_of_self_care: true
19
+ is_full_time_college_student: false
20
+ output:
21
+ pr_is_tax_unit_dependent: true
22
+
23
+ - name: Eligible parent of the filer dependent
24
+ period: 2024
25
+ input:
26
+ state_code: PR
27
+ age: 55
28
+ is_parent_of_filer_or_spouse: true
29
+ is_incapable_of_self_care: false
30
+ is_full_time_college_student: false
31
+ output:
32
+ pr_is_tax_unit_dependent: true
33
+
34
+ - name: Eligible young dependent
35
+ period: 2024
36
+ input:
37
+ state_code: PR
38
+ age: 20
39
+ is_parent_of_filer_or_spouse: false
40
+ is_incapable_of_self_care: false
41
+ is_full_time_college_student: false
42
+ output:
43
+ pr_is_tax_unit_dependent: true
44
+
45
+ - name: Eligible older dependent
46
+ period: 2024
47
+ input:
48
+ state_code: PR
49
+ age: 65
50
+ is_parent_of_filer_or_spouse: false
51
+ is_incapable_of_self_care: false
52
+ is_full_time_college_student: false
53
+ output:
54
+ pr_is_tax_unit_dependent: true
55
+
56
+ - name: Ineligible dependent by age
57
+ period: 2024
58
+ input:
59
+ state_code: PR
60
+ age: 21
61
+ is_parent_of_filer_or_spouse: false
62
+ is_incapable_of_self_care: false
63
+ is_full_time_college_student: false
64
+ output:
65
+ pr_is_tax_unit_dependent: false
@@ -0,0 +1,42 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_is_tax_unit_dependent(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Puerto Rico tax unit dependent"
8
+ definition_period = YEAR
9
+ defined_for = StateCode.PR
10
+ reference = "https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28"
11
+
12
+ def formula(person, period, parameters):
13
+ # dependent definition in Puerto Rico:
14
+ p = parameters(
15
+ period
16
+ ).gov.territories.pr.tax.income.taxable_income.exemptions.dependent.age_threshold
17
+ age = person("age", period)
18
+
19
+ # taxpayer is <21 years old OR >= 65 years old
20
+ age_eligible = (age < p.younger) | (age >= p.older)
21
+
22
+ # OR the taxpayer's mother or father
23
+ parent_eligible = person("is_parent_of_filer_or_spouse", period)
24
+
25
+ # OR a person over 21 that is incapable of self-support because of a physical or mental condition
26
+ incapable_of_self_support_eligible = person(
27
+ "is_incapable_of_self_care", period
28
+ )
29
+
30
+ is_blind = person("is_blind", period)
31
+
32
+ # OR a university student <26 years old that attended at least 1 years of an accredited uni
33
+ student_eligible = (person("is_full_time_college_student", period)) & (
34
+ age < p.student
35
+ )
36
+ return (
37
+ student_eligible
38
+ | parent_eligible
39
+ | incapable_of_self_support_eligible
40
+ | is_blind
41
+ | age_eligible
42
+ )
@@ -0,0 +1,27 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_dependents_exemption(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ label = "Puerto Rico dependents exemption"
8
+ reference = "https://hacienda.pr.gov/sites/default/files/individuals_2024_rev._jul_12_24_9-30-24_informative.pdf#page=2"
9
+ unit = USD
10
+ definition_period = YEAR
11
+ defined_for = StateCode.PR
12
+
13
+ def formula(tax_unit, period, parameters):
14
+ # line 8
15
+ dependents = add(
16
+ tax_unit, period, ["pr_eligible_dependent_for_exemption"]
17
+ )
18
+ filing_status = tax_unit("filing_status", period)
19
+ p = parameters(
20
+ period
21
+ ).gov.territories.pr.tax.income.taxable_income.exemptions.dependent.amount
22
+ amount = where(
23
+ filing_status == filing_status.possible_values.SEPARATE,
24
+ p.separate,
25
+ p.non_separate,
26
+ )
27
+ return dependents * amount
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_eligible_dependent_for_exemption(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Puerto Rico eligible dependent for dependent exemption"
8
+ reference = "https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28"
9
+ unit = USD
10
+ definition_period = YEAR
11
+ defined_for = StateCode.PR
12
+
13
+ def formula(person, period, parameters):
14
+ student_eligible = person("pr_exemptions_is_eligible_student", period)
15
+ non_student_eligible = person(
16
+ "pr_exemptions_is_eligible_nonstudent", period
17
+ )
18
+ return student_eligible | non_student_eligible
@@ -0,0 +1,21 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_exemptions_is_eligible_nonstudent(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Puerto Rico dependent exemption eligible nonstudent"
8
+ reference = "https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28"
9
+ unit = USD
10
+ definition_period = YEAR
11
+ defined_for = StateCode.PR
12
+
13
+ def formula(person, period, parameters):
14
+ # if dependent is a student, can earn gross income up to 7500 to be eligible for exemption
15
+ p = parameters(
16
+ period
17
+ ).gov.territories.pr.tax.income.taxable_income.exemptions.dependent.income_limit
18
+ is_dependent = person("pr_is_tax_unit_dependent", period)
19
+ gross_income = person("pr_gross_income_person", period)
20
+ income_eligibility = gross_income < p.nonstudent
21
+ return is_dependent & income_eligibility
@@ -0,0 +1,24 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_exemptions_is_eligible_student(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Puerto Rico dependent exemption eligible student"
8
+ reference = "https://hacienda.pr.gov/sites/default/files/inst_individuals_2023.pdf#page=28"
9
+ unit = USD
10
+ definition_period = YEAR
11
+ defined_for = StateCode.PR
12
+
13
+ def formula(person, period, parameters):
14
+ # Gross income limit is $7500 for a student dependent
15
+ p = parameters(
16
+ period
17
+ ).gov.territories.pr.tax.income.taxable_income.exemptions.dependent
18
+ is_dependent = person("pr_is_tax_unit_dependent", period)
19
+ is_student = person("is_full_time_college_student", period)
20
+ gross_income = person("pr_gross_income_person", period)
21
+ age = person("age", period)
22
+ age_eligibility = age < p.age_threshold.student
23
+ income_eligibility = gross_income < p.income_limit.student
24
+ return is_dependent & is_student & income_eligibility & age_eligibility
@@ -0,0 +1,19 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_personal_exemption(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ label = "Puerto Rico personal exemption"
8
+ reference = "https://hacienda.pr.gov/sites/default/files/individuals_2024_rev._jul_12_24_9-30-24_informative.pdf#page=2"
9
+ unit = USD
10
+ definition_period = YEAR
11
+ defined_for = StateCode.PR
12
+
13
+ def formula(tax_unit, period, parameters):
14
+ # line 7
15
+ p = parameters(
16
+ period
17
+ ).gov.territories.pr.tax.income.taxable_income.exemptions
18
+ filing_status = tax_unit("filing_status", period)
19
+ return p.personal[filing_status]
@@ -0,0 +1,19 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_veteran_exemption(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ label = "Puerto Rico veteran exemption"
8
+ reference = "https://hacienda.pr.gov/sites/default/files/individuals_2024_rev._jul_12_24_9-30-24_informative.pdf#page=2"
9
+ unit = USD
10
+ definition_period = YEAR
11
+ defined_for = StateCode.PR
12
+
13
+ def formula(person, period, parameters):
14
+ # line 9
15
+ p = parameters(
16
+ period
17
+ ).gov.territories.pr.tax.income.taxable_income.exemptions
18
+ vet_status = person("is_veteran", period)
19
+ return vet_status * p.veteran
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine-us
3
- Version: 1.398.1
3
+ Version: 1.399.0
4
4
  Summary: Add your description here.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License-File: LICENSE
@@ -3023,8 +3023,15 @@ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/deductio
3023
3023
  policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/deductions/mortgage/max.yaml,sha256=4S7u4QMAq8EeYRcAu-QnNYawA4clCro7sc20g458gWU,752
3024
3024
  policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/deductions/retirement/age_threshold.yaml,sha256=zJ8Q3XZrh2INvKvW2xx5h1DhXuEtJGjnK-Gv2an4Ijo,559
3025
3025
  policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/deductions/retirement/max.yaml,sha256=D3uhpibDaJlhRXDOEu7PyBP-mqENdayWn9k-Y3Oab-g,560
3026
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/personal.yaml,sha256=b7O3FuEUwKi9OQkojznnZ71kbsgSb8pBcHqv1lnA-5o,818
3027
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/veteran.yaml,sha256=pozPiLv6zrgv4FmDHpHfuoo6FMmNu8FvSqP9r4k0qsc,571
3028
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/age_threshold/older.yaml,sha256=74MhyAjkxXsKxmOyNbmIIiDS9UnXbHP5bKcYhFBb3Nw,572
3029
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/age_threshold/student.yaml,sha256=gIxpF0jKVYuFyETD0L0XuWIrNYEYfSan4Lo8X-VO8iQ,586
3030
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/age_threshold/younger.yaml,sha256=mr1kAWgjfkAUGNd7QhZCXuvLC3qinmUoHMppxYsOnxk,567
3026
3031
  policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/amount/non_separate.yaml,sha256=2TicjKXnfrnckN6BLxV9Bj7jMo1QLWAjzAXLjojKixk,594
3027
3032
  policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/amount/separate.yaml,sha256=5Eq25MdBPsT6qmKme7T6Bee60E8pKoEVBcJEZPJLyvE,586
3033
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/income_limit/nonstudent.yaml,sha256=DaQWvmK5Y1e-aLyABPiccHrmtxjak-8lhDdhMuroIFI,609
3034
+ policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/income_limit/student.yaml,sha256=6tn8LXnhMKK3h8PiOgp76BYDZfdKdeEgGXNKFEsiUI0,602
3028
3035
  policyengine_us/parameters/gov/usda/README.md,sha256=s1RL8S1-YDdtkeqmTRCjuRImSijVZAmBTkgmUs052jE,38
3029
3036
  policyengine_us/parameters/gov/usda/disabled_programs.yaml,sha256=Yva8iFoiwhqYAmmyt308QlJGMuJXKAzzCCsmqmySXm4,487
3030
3037
  policyengine_us/parameters/gov/usda/elderly_age_threshold.yaml,sha256=lArg_DYlYv3dhdEDbUui2K7zazmIirAwBQIt1742Ohw,289
@@ -5031,7 +5038,7 @@ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/earn
5031
5038
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/earned_income/pr_earned_income_credit_eligible_person.yaml,sha256=05_kLBxBq9we-w72eJj9fq_1fEeFnqv7P_mG0dl3e84,1196
5032
5039
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_compensatory_low_income_credit.yaml,sha256=h0MMBykqkifI6yQ_L0PLJePbWockE_6DI9U36mTWa8E,587
5033
5040
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.yaml,sha256=pNbfl-WLMHos8cKr-J50F2ZqOZt-ovYCdY30lyEKBrU,1984
5034
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml,sha256=WyIHPu6ZH0xYYJeCNsQnDktz0ywJWDfAj3FMbyRMFJg,1950
5041
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml,sha256=AM-okNG0CKpj-ePAGJl0VgvG3XONHOJexamh8Hf6tiM,1946
5035
5042
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.yaml,sha256=EAipNZfTMVye2BdYodTgAtJtWjzR7UTaGK-R8k3qvB0,813
5036
5043
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/refundable_ctc/pr_refundable_ctc.yaml,sha256=uH6Rb2TLLIrAJSkX5zS9eUaeLgLDmUzYXg9Ws79eTyE,434
5037
5044
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/pr_casualty_loss_deduction.yaml,sha256=FteN_CqJcr_hjNt0BPagZ5bI9i4PwpHa4vCvphQ-FkY,333
@@ -5042,6 +5049,15 @@ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_inco
5042
5049
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/education/pr_education_deduction_beneficiary_count.yaml,sha256=56yQJ77Qs7SaR23DwCRPrPy6HsazxW5_VLBB7RlPWEw,449
5043
5050
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/retirement/pr_retirement_deduction.yaml,sha256=3p1CdadJZB-qpaT3pGehtO-sJ2Oas-0-3leQ0Keaj9I,936
5044
5051
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/retirement/pr_retirement_deduction_eligibility.yaml,sha256=vnaMaSKukOdGtkytrLIzLAKGY2alcqrTelP-Ub9w1pk,262
5052
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/pr_personal_exemption.yaml,sha256=Q4JqGPWIca2ZTeCIx5lDfjDwGWzz0uPRVdLorj8BJM4,271
5053
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/pr_veteran_exemption.yaml,sha256=cBhlzaFuoK1jKTtjwXq8TZe_i6sX85Dho77SC39SQn8,827
5054
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/integration.yaml,sha256=fzks2iBim6haRr-P5HEPRJPOXGRP5crGSgE5T2tb4L0,988
5055
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_dependents_exemption.yaml,sha256=kZEiW5abBtTumS-QUfN5hd-gleFxz6iGXotny45XfVQ,1515
5056
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_eligible_dependent_for_exemption.yaml,sha256=75jv4Ezb76Br3x1Cc06M8Nr1PZIiNk8YZIv7yJ1EIfo,679
5057
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_nonstudent.yaml,sha256=zPPhTx82W0KWWfGFYsxC7EGhRsRP5QM4HyU1jP2NalI,597
5058
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_student.yaml,sha256=uusbN0mQNgn0z2xueb2lh0xel3wgENIB6VtJTxnV_84,1342
5059
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax_unit_dependent/integration.yaml,sha256=WZkbNxdpGOGI1fnMUXur8PM47CrGJi4X1HnXXj87rV0,975
5060
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax_unit_dependent/pr_is_tax_unit_dependent.yaml,sha256=-w3jQCVG3bbkNf2uv-yRC6oqw7F8Mwx1mJL2kqfwvhQ,1538
5045
5061
  policyengine_us/tests/policy/baseline/gov/usda/has_all_usda_elderly_disabled.yaml,sha256=2YpJcy_GKkH1VJvSpFCaNZY058Mm-y-lVavK12QMexU,596
5046
5062
  policyengine_us/tests/policy/baseline/gov/usda/has_usda_elderly_disabled.yaml,sha256=Jp3UJf52YXDlIOlwBSjNVnyDt8f1RqH6sf4Pg_uUJGQ,1284
5047
5063
  policyengine_us/tests/policy/baseline/gov/usda/is_usda_disabled.yaml,sha256=Vv4qYW3Q7daGgCG913RpQ_BPBd0dkWhbXy0BaCQTJzU,420
@@ -7807,6 +7823,7 @@ policyengine_us/variables/gov/states/wv/tax/income/subtractions/senior_citizen_d
7807
7823
  policyengine_us/variables/gov/states/wv/tax/income/subtractions/social_security/wv_social_security_benefits_subtraction.py,sha256=7NNaJm79du2Jq2mHi9S7ZoGpmwBrSeAiZ2a6Hh75BPc,991
7808
7824
  policyengine_us/variables/gov/states/wv/tax/income/subtractions/social_security/wv_social_security_benefits_subtraction_eligible.py,sha256=LXBlZQyL9U8pozDaKQ32vBhfijNjhezsobwPxN3aLPc,1272
7809
7825
  policyengine_us/variables/gov/states/wv/tax/income/subtractions/social_security/wv_social_security_benefits_subtraction_person.py,sha256=tqjqCyI36lbExGp0vjhMd6wEB0iMwj_p1MaqV-cBJUI,1952
7826
+ policyengine_us/variables/gov/territories/pr/pr_is_tax_unit_dependent.py,sha256=gRsYnnDuDbrM-9CIUWFvAsHEj5sK5_HA7GJgOdcQTWM,1493
7810
7827
  policyengine_us/variables/gov/territories/pr/tax/income/pr_agi.py,sha256=yqLyP6w4mvABXqLIKECZ4lHI9OetLpgqN-0hbvYl51s,360
7811
7828
  policyengine_us/variables/gov/territories/pr/tax/income/pr_agi_person.py,sha256=gveEdwFLkTFd_76v_mHGK47tXrozNwtoNTS4bNif_h0,379
7812
7829
  policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income.py,sha256=P2Mn2tUhrnP2LsIx4P0OFz67oo6t9NKZKpKCzqb1RLc,399
@@ -7831,6 +7848,12 @@ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deduction
7831
7848
  policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/education/pr_education_deduction_beneficiary_count.py,sha256=jo7mVDo5u4XLdiXTFRmrhhOwRKocD8N66IxaeFaeNh4,814
7832
7849
  policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/retirement/pr_retirement_deduction.py,sha256=BCKO29x6T0wphnIA3ev7vk2xVAMGF33oYQL__yqZemc,876
7833
7850
  policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/retirement/pr_retirement_deduction_eligibility.py,sha256=g1CTdvG4XyJbSHHevvmJRZwE_OIKvtYnmPLpSlXqO5o,743
7851
+ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/pr_personal_exemption.py,sha256=If_KjaQ5thOcK8A1rdq9aZXCtCogCrMVL3Wd1xx7GJs,643
7852
+ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/pr_veteran_exemption.py,sha256=0IHer0XKp3aaZPSMwh2brXOZhs_EMwW2hzi1pbzEqns,627
7853
+ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_dependents_exemption.py,sha256=BWHFOfSxxRWqP07fTRyqgp3G72nNkPoz9sA5bdm5O6g,919
7854
+ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_eligible_dependent_for_exemption.py,sha256=RUm03EY3ZX-KXIpXJWMMRz-I2zZ_QCWI7CYkgnWYFYQ,665
7855
+ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_nonstudent.py,sha256=W6u9LaJ8jn_MUN0woxe33p2Gwr-Vr6UcJzRU2ojFdyY,888
7856
+ policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_student.py,sha256=v2wRsnsjDqi_tudndpYcTU1tPplj90jxnOINbKW6iuk,1033
7834
7857
  policyengine_us/variables/gov/usda/has_all_usda_elderly_disabled.py,sha256=V8faSGkVnsiIbehh0QYo2hGWlFjzp3LwgWj-I2o_G0U,629
7835
7858
  policyengine_us/variables/gov/usda/has_usda_elderly_disabled.py,sha256=TGoDY1RW1rUA4BTH2IN3TpnKTozuRP9E1LdD-MCE1wo,549
7836
7859
  policyengine_us/variables/gov/usda/is_usda_disabled.py,sha256=FAHSzfpYJ7gSHdMi2G9NpaymB9fib9swAAY8a4ajC38,424
@@ -8397,8 +8420,8 @@ policyengine_us/variables/input/farm_income.py,sha256=BEKxYmHNNnWJAAvULl5qZJigy5
8397
8420
  policyengine_us/variables/input/geography.py,sha256=Ux0ueAf0rhZaflyEqz81UuXP3xKCKBDvoO3CrKhiQEc,5421
8398
8421
  policyengine_us/variables/input/self_employment_income.py,sha256=PwsGz8R4lRikKWUYOhsC0qosNNLXq4f5SQmfw4S3mk8,511
8399
8422
  policyengine_us/variables/input/self_employment_income_before_lsr.py,sha256=E8fcX9Nlyqz8dziHhQv_euutdmoIwFMMWePUwbbwv_w,379
8400
- policyengine_us-1.398.1.dist-info/METADATA,sha256=eOuhWMBL-iVq-hS7VbSeRcMTy1qcRIPvQo3cPQIaZ_w,1649
8401
- policyengine_us-1.398.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8402
- policyengine_us-1.398.1.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8403
- policyengine_us-1.398.1.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8404
- policyengine_us-1.398.1.dist-info/RECORD,,
8423
+ policyengine_us-1.399.0.dist-info/METADATA,sha256=C56JoQAWHvt2n0sLwSOq0xoUydi32Niom9zSbixQHQg,1649
8424
+ policyengine_us-1.399.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8425
+ policyengine_us-1.399.0.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8426
+ policyengine_us-1.399.0.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8427
+ policyengine_us-1.399.0.dist-info/RECORD,,