-
Notifications
You must be signed in to change notification settings - Fork 33
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
Guaranteed Income Supplement + Spousal Allowance #102
base: master
Are you sure you want to change the base?
Conversation
policyengine_canada/variables/gov/cra/benefits/gis_spa/spouse_oas_eligible.py
Outdated
Show resolved
Hide resolved
…-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
…cyengine-canada into alex-rand/issue98
6bc88e5
to
94d680a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phenomenal, Alex, this is quite the program. No obvious errors here, just some cosmetic suggestions, and in some cases I suggested in one places but it applies to several. Otherwise given the complexity some more comments could help understand it, but I expect I'll learn most from this going through it in the web app and/or with you walking me through it. So I can merge after these with the changelog.
definition_period = YEAR | ||
|
||
def formula(person, period, parameters): | ||
p = parameters(period).gov.cra.benefits.gis_spa.gis_exemption |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
p = parameters(period).gov.cra.benefits.gis_spa.gis_exemption |
class gis_income(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Employment income" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label = "Employment income" | |
label = "GIS income" |
) | ||
& ( | ||
gis_base > 0 | ||
), # the gis_base > 0 makes sure this person is the eligible one in the couple, since both people in the couple will have the same category. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split this across lines to stay within 79 characters?
gis_spa_categories = gis_spa_category.possible_values | ||
oas_eligible = person("oas_eligible", period) | ||
p = parameters(period).gov.cra.benefits.gis_spa.topup_cap | ||
return select( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you simplify this with an |
(or) statement, since many of the outcomes are the same? If the default isn't activated, it could be a where
.
Same goes for the reduction
|
||
return ( | ||
( | ||
(2 * p_gis_spa.gis_cap.two_pensioners) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove the 2
- name: Not a total reduction | ||
period: 2022 | ||
input: | ||
spa_oas_portion: 2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spa_oas_portion: 2000 | |
spa_oas_portion: 2_000 |
period: 2022 | ||
absolute_error_margin: 0.01 | ||
input: | ||
gis_spa_category: "SINGLE_WITH_OAS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gis_spa_category: "SINGLE_WITH_OAS" | |
gis_spa_category: SINGLE_WITH_OAS |
@@ -0,0 +1,9 @@ | |||
description: Reduction rate for the GIS portion of the SPA. | |||
values: | |||
1999-12-31: .25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1999-12-31: .25 | |
1999-12-31: 0.25 |
@@ -0,0 +1,9 @@ | |||
description: Reduction rate for the GIS portion of the SPA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Reduction rate for the GIS portion of the SPA. | |
description: Canada reduces the GIS portion of the SPA at this rate. |
period: year | ||
documentation: Corresponds to GISEMPEXP and GISEMPEXM | ||
label: Percentage of income exempt from inclusion in calculating the GIS reduction. | ||
name: gis_basic_income_exemption_rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: gis_basic_income_exemption_rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need changelog
make format && make documentation
has been run.New variable
What's changed
Description of the changes here.
Bug fix
What this fixes and how it's fixed
Description of how this fix works goes here. Link any issues this PR fixes.