Repository: PolicyEngine/policyengine-us (language: python)

Issue:
Delaware 2022 income tax rebate
[Reference](https://legis.delaware.gov/BillDetail?LegislationId=99311)


Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb2d..f9d19decae3 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - Delaware 2022 relief rebate.
diff --git a/policyengine_us/parameters/gov/states/de/tax/income/credits/refundable.yaml b/policyengine_us/parameters/gov/states/de/tax/income/credits/refundable.yaml
index f7af6870456..b9cb6cdcb2e 100644
--- a/policyengine_us/parameters/gov/states/de/tax/income/credits/refundable.yaml
+++ b/policyengine_us/parameters/gov/states/de/tax/income/credits/refundable.yaml
@@ -2,6 +2,12 @@ description: Delaware refundable tax credits.
 values:
   2019-01-01:
     - de_refundable_eitc
+  2022-01-01:
+    - de_refundable_eitc
+    - de_relief_rebate
+  2023-01-01:
+    - de_refundable_eitc
 metadata:
   unit: list
+  period: year
   label: Delaware refundable tax credits
diff --git a/policyengine_us/parameters/gov/states/de/tax/income/credits/relief_rebate/amount.yaml b/policyengine_us/parameters/gov/states/de/tax/income/credits/relief_rebate/amount.yaml
new file mode 100644
index 00000000000..fcaef5d642a
--- /dev/null
+++ b/policyengine_us/parameters/gov/states/de/tax/income/credits/relief_rebate/amount.yaml
@@ -0,0 +1,11 @@
+description: Delaware provides a relief rebate of this amount to each adult in the household.
+values:
+  2022-01-01: 300
+metadata:
+  reference:
+    - title: Delaware General Assembly - House Bill 360 
+      href: https://legis.delaware.gov/BillDetail?LegislationId=99311
+
+  label: Delaware relief rebate amount
+  unit: currency-USD
+  period: year
diff --git a/policyengine_us/variables/gov/states/de/tax/income/credits/relief_rebate/de_relief_rebate.py b/policyengine_us/variables/gov/states/de/tax/income/credits/relief_rebate/de_relief_rebate.py
new file mode 100644
index 00000000000..65900e009b7
--- /dev/null
+++ b/policyengine_us/variables/gov/states/de/tax/income/credits/relief_rebate/de_relief_rebate.py
@@ -0,0 +1,18 @@
+from policyengine_us.model_api import *
+
+
+class de_relief_rebate(Variable):
+    value_type = float
+    entity = TaxUnit
+    label = "Delaware relief rebate"
+    unit = USD
+    definition_period = YEAR
+    reference = "https://legis.delaware.gov/BillDetail?LegislationId=99311"
+    defined_for = StateCode.DE
+
+    # Assuming that each adult in Delaware has filed a 2020
+    # income tax return
+    def formula(tax_unit, period, parameters):
+        head_spouse_count = tax_unit("head_spouse_count", period)
+        p = parameters(period).gov.states.de.tax.income.credits.relief_rebate
+        return head_spouse_count * p.amount


Test patch:
diff --git a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_non_refundable_eitc.yaml b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_non_refundable_eitc.yaml
index 498a113cdf5..432f388fbdd 100644
--- a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_non_refundable_eitc.yaml
+++ b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_non_refundable_eitc.yaml
@@ -2,6 +2,7 @@
   period: 2022
   input:
     state_code: DE
+    de_relief_rebate: 0
   output:
     de_income_tax_if_claiming_non_refundable_eitc: 0
   
@@ -10,6 +11,7 @@
   input:
     state_code: DE
     de_non_refundable_eitc: 100
+    de_relief_rebate: 0
   output:
     de_income_tax_if_claiming_non_refundable_eitc: 0
 
@@ -22,5 +24,6 @@
     de_personal_credit: 0
     de_aged_personal_credit: 0
     de_non_refundable_eitc: 100
+    de_relief_rebate: 0
   output:
     de_income_tax_if_claiming_non_refundable_eitc: 50
diff --git a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_refundable_eitc.yaml b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_refundable_eitc.yaml
index 71f4300a16c..219acd99c58 100644
--- a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_refundable_eitc.yaml
+++ b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/eitc/refundability_calculation/de_income_tax_if_claiming_refundable_eitc.yaml
@@ -2,6 +2,7 @@
   period: 2022
   input:
     state_code: DE
+    de_relief_rebate: 0
   output:
     de_income_tax_if_claiming_refundable_eitc: 0
   
@@ -10,5 +11,6 @@
   input:
     state_code: DE
     de_refundable_eitc: 100
+    de_relief_rebate: 0
   output:
     de_income_tax_if_claiming_refundable_eitc: -100
diff --git a/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/relief_rebate/de_relief_rebate.yaml b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/relief_rebate/de_relief_rebate.yaml
new file mode 100644
index 00000000000..350b9d59ed8
--- /dev/null
+++ b/policyengine_us/tests/policy/baseline/gov/states/de/tax/income/credits/relief_rebate/de_relief_rebate.yaml
@@ -0,0 +1,15 @@
+- name: One head and one spouse
+  period: 2022
+  input:
+    state_code: DE
+    head_spouse_count: 2
+  output:
+    de_relief_rebate: 600
+
+- name: Only one head
+  period: 2022
+  input:
+    state_code: DE
+    head_spouse_count: 1
+  output:
+    de_relief_rebate: 300