-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
…-canada into Alberta-Disablity
- Loading branch information
Showing
6 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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
11 changes: 11 additions & 0 deletions
11
policyengine_canada/parameters/gov/provinces/nb/benefits/pension_benefit/cap.yaml
This file contains 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,11 @@ | ||
description: New Brunswick provides this maximum pension benefit. | ||
values: | ||
2022-01-01: 1_000 | ||
metadata: | ||
unit: currency-CAD | ||
label: New Brunswick pension benefit max amount | ||
reference: | ||
- title: Government of Canada - Province of New Brunswick | ||
href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/new-brunswick/5004-pc/information-residents-new-brunswick.html#P64_5140 | ||
- title: New Brunswick Income Tax Act | ||
href: https://laws.gnb.ca/en/pdf/cs/N-6.001.pdf#page=31 |
16 changes: 16 additions & 0 deletions
16
policyengine_canada/tests/gov/provinces/nb/pension_benefits/nb_pension_benefit.yaml
This file contains 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,16 @@ | ||
- name: Max Pension Benefit | ||
period: 2023 | ||
input: | ||
province_code: NB | ||
pension_and_savings_plan_income: 20_000 | ||
output: | ||
nb_pension_benefit: 1_000 | ||
|
||
- name: Pension Benefit Below Maximum Amount | ||
period: 2023 | ||
input: | ||
province_code: NB | ||
pension_and_savings_plan_income: 800 | ||
output: | ||
nb_pension_benefit: 800 | ||
|
19 changes: 19 additions & 0 deletions
19
...cyengine_canada/variables/gov/provinces/nb/benefits/pension_benefit/nb_pension_benefit.py
This file contains 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,19 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class nb_pension_benefit(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "New Brunswick pension benefit" | ||
unit = CAD | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.NB | ||
|
||
def formula(person, period, parameters): | ||
age = person("age", period) | ||
pension_income = person("pension_and_savings_plan_income", period) | ||
max_amount = parameters( | ||
period | ||
).gov.provinces.nb.benefits.pension_benefit.cap | ||
# Capped at a certain amount | ||
return min_(max_amount, pension_income) |
This file contains 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 |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
|
||
setup( | ||
name="policyengine-canada", | ||
version="0.86.2", | ||
version="0.87.0", | ||
author="PolicyEngine", | ||
author_email="[email protected]", | ||
classifiers=[ | ||
|