policyengine-us 1.372.0__py3-none-any.whl → 1.373.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,21 @@
1
+ - name: Basic case
2
+ period: 2024
3
+ input:
4
+ eitc: 2_000
5
+ uncapped_ssi: 1_000
6
+ pr_refundable_ctc_social_security_tax: 6_600
7
+ refundable_ctc: 2_800
8
+ ctc: 3_000
9
+ output:
10
+ pr_refundable_ctc: 3_000
11
+
12
+ - name: Uncapped SSI below 0
13
+ period: 2024
14
+ input:
15
+ eitc: 1_000
16
+ uncapped_ssi: -1_000
17
+ pr_refundable_ctc_social_security_tax: 500
18
+ refundable_ctc: 2_000
19
+ ctc: 1_000
20
+ output:
21
+ pr_refundable_ctc: 1_000
@@ -14,6 +14,6 @@ class pr_low_income_credit_eligible(Variable):
14
14
  eligible_people = tax_unit(
15
15
  "pr_low_income_credit_eligible_people", period
16
16
  )
17
- income = tax_unit("pr_gross_income", period)
17
+ income = tax_unit("pr_gross_income_person", period)
18
18
  income_limit = p.income_limit.calc(eligible_people)
19
19
  return income <= income_limit
@@ -0,0 +1,34 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_refundable_ctc(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ label = "Puerto Rico refundable Child Tax Credit"
8
+ unit = USD
9
+ definition_period = YEAR
10
+ reference = (
11
+ "https://www.irs.gov/pub/irs-pdf/f1040s8.pdf"
12
+ "https://www.law.cornell.edu/uscode/text/26/24#h_4_A"
13
+ )
14
+
15
+ # This provision is part of the federal CTC legal code
16
+ # will will merge the logic with the federal CTC once the puerto income tax structure is completed
17
+ def formula(tax_unit, period, parameters):
18
+ # line 24
19
+ # uncapped_ssi can be below 0
20
+ ssi = max_(0, add(tax_unit, period, ["uncapped_ssi"]))
21
+ sum_eitc_ssi = add(tax_unit, period, ["eitc"]) + ssi
22
+
23
+ # line 25
24
+ reduced_ss_tax = max_(
25
+ 0,
26
+ tax_unit("pr_refundable_ctc_social_security_tax", period)
27
+ - sum_eitc_ssi,
28
+ )
29
+
30
+ # line 26
31
+ base_credit = max_(tax_unit("refundable_ctc", period), reduced_ss_tax)
32
+
33
+ # line 27
34
+ return min_(base_credit, tax_unit("ctc", period))
@@ -0,0 +1,16 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class pr_refundable_ctc_social_security_tax(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ label = "Puerto Rico social security and medicare taxes for refundable Child Tax Credit"
8
+ unit = USD
9
+ definition_period = YEAR
10
+ reference = (
11
+ "https://www.irs.gov/pub/irs-pdf/f1040s8.pdf"
12
+ "https://www.law.cornell.edu/uscode/text/26/24#h_4_A"
13
+ )
14
+
15
+ # line 23
16
+ adds = "gov.irs.credits.ctc.refundable.social_security.add"
@@ -4,7 +4,7 @@ from policyengine_us.model_api import *
4
4
  class pr_gross_income_person(Variable):
5
5
  value_type = float
6
6
  entity = Person
7
- label = "Puerto Rico gross income person"
7
+ label = "Puerto Rico gross income"
8
8
  unit = USD
9
9
  definition_period = YEAR
10
10
  defined_for = StateCode.PR
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine-us
3
- Version: 1.372.0
3
+ Version: 1.373.0
4
4
  Summary: Add your description here.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License-File: LICENSE
@@ -4945,6 +4945,7 @@ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_
4945
4945
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.yaml,sha256=pNbfl-WLMHos8cKr-J50F2ZqOZt-ovYCdY30lyEKBrU,1984
4946
4946
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml,sha256=WyIHPu6ZH0xYYJeCNsQnDktz0ywJWDfAj3FMbyRMFJg,1950
4947
4947
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.yaml,sha256=EAipNZfTMVye2BdYodTgAtJtWjzR7UTaGK-R8k3qvB0,813
4948
+ policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/refundable_ctc/pr_refundable_ctc.yaml,sha256=DMuJebsPv9PASlRSV3iq3ZTyAZZlO78XBsOYrXTaVog,433
4948
4949
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/pr_casualty_loss_deduction.yaml,sha256=FteN_CqJcr_hjNt0BPagZ5bI9i4PwpHa4vCvphQ-FkY,333
4949
4950
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/pr_charitable_deduction.yaml,sha256=W6N5RCKT6iKoV6qr_UbdrVmsy8c7NZkIRR-GqDV_oiM,470
4950
4951
  policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/deductions/pr_medical_expense_deduction.yaml,sha256=0swPOBL6tTh5Q2ScDziSdgFBQHmd2m8yutElgjfDHss,897
@@ -7672,7 +7673,7 @@ policyengine_us/variables/gov/states/wv/tax/income/subtractions/social_security/
7672
7673
  policyengine_us/variables/gov/territories/pr/tax/income/pr_agi.py,sha256=yqLyP6w4mvABXqLIKECZ4lHI9OetLpgqN-0hbvYl51s,360
7673
7674
  policyengine_us/variables/gov/territories/pr/tax/income/pr_agi_person.py,sha256=gveEdwFLkTFd_76v_mHGK47tXrozNwtoNTS4bNif_h0,379
7674
7675
  policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income.py,sha256=P2Mn2tUhrnP2LsIx4P0OFz67oo6t9NKZKpKCzqb1RLc,399
7675
- policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income_person.py,sha256=OOPk4gvnNKClaS8TAAZbGOqHSS8Z31to1m8rj9ALdb0,438
7676
+ policyengine_us/variables/gov/territories/pr/tax/income/pr_gross_income_person.py,sha256=SFZtLDY2V-a1qH8p_EvIvOYhUsH_cjhHJBWYnmBB3jU,431
7676
7677
  policyengine_us/variables/gov/territories/pr/tax/income/credits/pr_refundable_credits.py,sha256=-Vxk6bPiB9tSwDOIE46Q3LNLBMKL-3atTYPBD3SfC_Y,308
7677
7678
  policyengine_us/variables/gov/territories/pr/tax/income/credits/earned_income/pr_earned_income_credit.py,sha256=-magFQVK47xuu0D3PleHiy_ihbx4RdJW-Jg_ELQO0Ks,1851
7678
7679
  policyengine_us/variables/gov/territories/pr/tax/income/credits/earned_income/pr_earned_income_credit_eligible.py,sha256=ilQSYlQ6cEQuf4oHHnhHWRGywxkzN5Y6GOhu9_FwmqI,630
@@ -7680,9 +7681,11 @@ policyengine_us/variables/gov/territories/pr/tax/income/credits/earned_income/pr
7680
7681
  policyengine_us/variables/gov/territories/pr/tax/income/credits/earned_income/pr_earned_income_credit_unearned_income.py,sha256=_9ms1IMxdZyhOUv9fJ0VG0tCGosl0n-YYxkpiU-h0d0,597
7681
7682
  policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_compensatory_low_income_credit.py,sha256=x-qB-_buWpRMY_YzINM7dhkm37AUY5M4-8-KWHFecKA,869
7682
7683
  policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit.py,sha256=oJvrGUz1SeOVYpFBlyNr6SHCtuPCGEyKvs02gCsBjXA,873
7683
- policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.py,sha256=PDHESn5D7AzJLcwJ6_hQOOANqWHygRsYenJVtY5JPEU,977
7684
+ policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.py,sha256=4Z_1zqwupW-5vdIsUGxswGp58xdqzwsym70-JiHKWPk,984
7684
7685
  policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_people.py,sha256=RgzLpArMyaF5UDGwETViRUku4FHCAfnez_zMWi5g_ek,628
7685
7686
  policyengine_us/variables/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible_person.py,sha256=AyYkgYDtaroJZuAi-uO9hXarBKhgMMXvmsMGf2Nqp5Q,1107
7687
+ policyengine_us/variables/gov/territories/pr/tax/income/credits/refundable_ctc/pr_refundable_ctc.py,sha256=XyjYvfdudRP3DMfCsmhmpqUaRH00gQpjTy86xrhoW1U,1097
7688
+ policyengine_us/variables/gov/territories/pr/tax/income/credits/refundable_ctc/pr_refundable_ctc_social_security_tax.py,sha256=pVjsUPcD-QUXWTniQgla4e7rSfkTztuOHgxR42DHmD8,497
7686
7689
  policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/pr_casualty_loss_deduction.py,sha256=g2QRdt75GmxRZSuzU_9c_uvAjCKXSXQMEACzarVPrAU,886
7687
7690
  policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/pr_charitable_deduction.py,sha256=2u9YAoBduN8NKKKSzpWy06wVk5QbAbxj6Tp9bOCtn2o,848
7688
7691
  policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/pr_medical_expense_deduction.py,sha256=5U77mChDcF3XOpHujLInWcdboU_JDy7wN64_p33eZRA,743
@@ -8258,8 +8261,8 @@ policyengine_us/variables/input/farm_income.py,sha256=BEKxYmHNNnWJAAvULl5qZJigy5
8258
8261
  policyengine_us/variables/input/geography.py,sha256=XmBlgXhzBoLRKk6R8taVZHqUw1eU8MbNeGS9iJ7_l44,4506
8259
8262
  policyengine_us/variables/input/self_employment_income.py,sha256=PwsGz8R4lRikKWUYOhsC0qosNNLXq4f5SQmfw4S3mk8,511
8260
8263
  policyengine_us/variables/input/self_employment_income_before_lsr.py,sha256=E8fcX9Nlyqz8dziHhQv_euutdmoIwFMMWePUwbbwv_w,379
8261
- policyengine_us-1.372.0.dist-info/METADATA,sha256=BMPMRc82wu6bbPBTxSkq_UmAGfvWH7jxlRdsNQ-weuk,1649
8262
- policyengine_us-1.372.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8263
- policyengine_us-1.372.0.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8264
- policyengine_us-1.372.0.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8265
- policyengine_us-1.372.0.dist-info/RECORD,,
8264
+ policyengine_us-1.373.0.dist-info/METADATA,sha256=KPzfVghqHrLGG0miQZufkw5GLa1jZOifq9iwV3w9ljY,1649
8265
+ policyengine_us-1.373.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8266
+ policyengine_us-1.373.0.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8267
+ policyengine_us-1.373.0.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8268
+ policyengine_us-1.373.0.dist-info/RECORD,,