-
Notifications
You must be signed in to change notification settings - Fork 35
Nova Scotia Age Amount Supplement #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
okeyiii
wants to merge
12
commits into
PolicyEngine:master
Choose a base branch
from
okeyiii:okeyiii/issue455
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a0e6b39
Nova Scotia Age amount supplement
okeyiii aa0c91a
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
okeyiii 8414dde
Nova Scotia Age Amount Supplement
okeyiii eb44ae5
Nova Scotia Age Amount Supplement
okeyiii 6623b84
Nova Scotia Age amount supplement
okeyiii cf091d2
Nova Scotia Age Amount Supplement
okeyiii e73b3c0
Issue458
okeyiii 8dfc00c
Nova Scotia Age Amount Supplement
okeyiii cfbca80
PR #458
okeyiii bd27e96
PR #458
okeyiii 53d2cfe
Fixes #455
okeyiii 3021046
Change name of eligibility var
okeyiii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| - bump: minor | ||
| changes: | ||
| added: | ||
| - Nova Scotia age amount supplement. |
14 changes: 14 additions & 0 deletions
14
policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/age/supplement/base.yaml
This file contains hidden or 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,14 @@ | ||
| description: Nova Scotia provides this supplement amount credit base amount. | ||
| values: | ||
| 2022-01-01: 1_465 | ||
| metadata: | ||
| unit: currency-CAD | ||
| period: year | ||
| label: Nova Scotia age amount supplement base | ||
| reference: | ||
| - title: 2022 Nova Scotia Personal Tax Credits Return | ||
| href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1 | ||
| - title: Worksheet for the 2023 Nova Scotia TD1NS-WS Personal Tax Credits Return -- Age Amount Supplement | ||
| href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ns-ws/td1ns-ws-23e.pdf#page=1 | ||
| - title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada - 10G | ||
| href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=28 | ||
25 changes: 25 additions & 0 deletions
25
...ngine_canada/parameters/gov/provinces/ns/tax/income/credits/age/supplement/reduction.yaml
This file contains hidden or 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,25 @@ | ||
| description: Nova Scotia phases its age amount supplement out at this rate, based on taxable income. | ||
| brackets: | ||
| - threshold: | ||
| 2022-01-01: 0 | ||
| rate: | ||
| 2022-01-01: 0 | ||
| - threshold: | ||
| 2022-01-01: 25_000 | ||
| rate: | ||
| 2022-01-01: 0.0293 | ||
|
|
||
| metadata: | ||
| type: marginal_rate | ||
| rate_unit: /1 | ||
| threshold_unit: currency-CAD | ||
| period: year | ||
| label: Nova Scotia age amount supplement phase out rate | ||
| reference: | ||
| - title: 2022 Nova Scotia Personal Tax Credits Return | ||
| href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1 | ||
| - title: Worksheet for the 2023 Nova Scotia TD1NS-WS Personal Tax Credits Return -- Age Amount Supplement | ||
| href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ns-ws/td1ns-ws-23e.pdf#page=1 | ||
| - title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada | ||
| href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=28 | ||
|
|
39 changes: 39 additions & 0 deletions
39
...engine_canada/tests/gov/provinces/ns/tax/income/credits/age/ns_age_amount_supplement.yaml
This file contains hidden or 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,39 @@ | ||
| - name: Nova Scotia Age amonut supplement; eligible age with eligible taxable income below 25_000 | ||
| period: 2023 | ||
| input: | ||
| ns_taxable_income: 24_999 | ||
okeyiii marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ns_age_amount_eligible: true | ||
| output: | ||
| ns_age_amount_supplement: 1_465 | ||
|
|
||
| - name: Nova Scotia Age amonut supplement; eligible age with eligible taxable income between 25_000 and 75_000 | ||
| period: 2023 | ||
| input: | ||
| ns_taxable_income: 65_000 | ||
| ns_age_amount_eligible: true | ||
| output: | ||
| ns_age_amount_supplement: 293 | ||
|
|
||
| - name: Nova Scotia Age tax credit; eligible age with ineligible taxable income more than 75_000 | ||
| period: 2023 | ||
| input: | ||
| ns_taxable_income: 75_001 | ||
| ns_age_amount_eligible: true | ||
| output: | ||
| ns_age_amount_supplement: 0 | ||
|
|
||
| - name: Nova Scotia Age tax credit; ineligible age with eligible taxable income | ||
| period: 2023 | ||
| input: | ||
| ns_taxable_income: 24_999 | ||
| ns_age_amount_eligible: false | ||
| output: | ||
| ns_age_amount_supplement: 0 | ||
|
|
||
| - name: Nova Scotia Age tax credit; ineligible age with ineligible taxable income | ||
| period: 2023 | ||
| input: | ||
| ns_taxable_income: 75_001 | ||
| ns_age_amount_eligible: false | ||
| output: | ||
| ns_age_amount_supplement: 0 | ||
40 changes: 40 additions & 0 deletions
40
...nada/tests/gov/provinces/ns/tax/income/credits/age/ns_age_amount_supplement_eligible.yaml
This file contains hidden or 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,40 @@ | ||
| - name: Nova Scotia Age amount supplement; 65 is eligible age | ||
| period: 2023 | ||
| input: | ||
| province_code: NS | ||
| age: 65 | ||
| output: | ||
| ns_age_amount_eligible: true | ||
|
|
||
|
|
||
| - name: Nova Scotia Age amonut supplement; lower than 65 is not an eligible age | ||
| period: 2023 | ||
| input: | ||
| province_code: NS | ||
| age: 64 | ||
| output: | ||
| ns_age_amount_eligible: false | ||
|
|
||
| - name: Nova Scotia Age amonut supplement; lower than 65 is not an eligible age | ||
| period: 2023 | ||
| input: | ||
| province_code: NS | ||
| age: 50 | ||
| output: | ||
| ns_age_amount_eligible: false | ||
|
|
||
| - name: Nova Scotia Age amonut supplement; higher than 65 is eligible age | ||
| period: 2023 | ||
| input: | ||
| province_code: NS | ||
| age: 67 | ||
| output: | ||
| ns_age_amount_eligible: true | ||
|
|
||
| - name: Nova Scotia Age amonut supplement; higher than 65 is eligible age | ||
| period: 2023 | ||
| input: | ||
| province_code: NS | ||
| age: 70 | ||
| output: | ||
| ns_age_amount_eligible: true |
26 changes: 26 additions & 0 deletions
26
...gine_canada/variables/gov/provinces/ns/tax/income/credits/age/ns_age_amount_supplement.py
okeyiii marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,26 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class ns_age_amount_supplement(Variable): | ||
| value_type = float | ||
| entity = Person | ||
| label = "Nova Scotia age amount supplement" | ||
| unit = CAD | ||
| definition_period = YEAR | ||
| defined_for = "ns_age_amount_eligible" | ||
| reference = ( | ||
| "https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1", | ||
| "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ns-ws/td1ns-ws-23e.pdf#page=1", | ||
| "https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=28", | ||
| ) | ||
|
|
||
| def formula(person, period, parameters): | ||
| p = parameters( | ||
| period | ||
| ).gov.provinces.ns.tax.income.credits.age.supplement | ||
| taxable_income = person("ns_taxable_income", period) | ||
|
|
||
| # Calculate additional amount added to base amount | ||
| reduction = p.reduction.calc(taxable_income) | ||
|
|
||
| return max_(p.base - reduction, 0) |
21 changes: 21 additions & 0 deletions
21
...da/variables/gov/provinces/ns/tax/income/credits/age/ns_age_amount_supplement_eligible.py
okeyiii marked this conversation as resolved.
Show resolved
Hide resolved
okeyiii marked this conversation as resolved.
Show resolved
Hide resolved
okeyiii marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,21 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class ns_age_amount_eligible(Variable): | ||
| value_type = bool | ||
| entity = Person | ||
| label = "Eligible for the Nova Scotia age amount and age amount supplement" | ||
| definition_period = YEAR | ||
| defined_for = ProvinceCode.NS | ||
| reference = ( | ||
| "https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1", | ||
| "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ns-ws/td1ns-ws-23e.pdf#page=1", | ||
| "https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=28", | ||
| ) | ||
|
|
||
| def formula(person, period, parameters): | ||
| p = parameters(period).gov.provinces.ns.tax.income.credits.age | ||
| age = person("age", period) | ||
|
|
||
| # is eligible for age amount supplement | ||
| return age >= p.age_eligibility |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cerate a variable |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.