-
Notifications
You must be signed in to change notification settings - Fork 178
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
Rename spm_unit_net_income
to spm_resources
#3722
base: master
Are you sure you want to change the base?
Rename spm_unit_net_income
to spm_resources
#3722
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3722 +/- ##
==========================================
+ Coverage 99.16% 99.20% +0.03%
==========================================
Files 2405 2405
Lines 34803 34803
Branches 163 163
==========================================
+ Hits 34514 34526 +12
+ Misses 259 247 -12
Partials 30 30 ☔ View full report in Codecov by Sentry. |
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.
thanks! could you please also add unit tests for the files this PR changes? i know it's not central to this issue's purpose, but it'd be good to pass and enhance codecov.
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.
rename this file and spm_unit_net_income_reported.py
@MaxGhenis or @nikhilwoodruff do you know why the added tests give the following error message: I am not familiar with the labor supply part |
Seems like this is resolved? |
policyengine_us/variables/household/income/spm_unit/spm_unit_oecd_equivalised_net_income.py
Outdated
Show resolved
Hide resolved
policyengine_us/variables/household/income/spm_unit/spm_unit_is_in_spm_poverty.py
Outdated
Show resolved
Hide resolved
…ecd_equivalised_net_income.py Co-authored-by: Max Ghenis <mghenis@gmail.com>
…s_in_spm_poverty.py Co-authored-by: Max Ghenis <mghenis@gmail.com>
policyengine_us/variables/household/income/spm_unit/spm_unit_is_in_spm_poverty.py
Outdated
Show resolved
Hide resolved
policyengine_us/variables/household/income/spm_unit/spm_unit_is_in_deep_spm_poverty.py
Outdated
Show resolved
Hide resolved
policyengine_us/variables/household/income/spm_unit/poverty_gap.py
Outdated
Show resolved
Hide resolved
policyengine_us/variables/household/income/spm_unit/deep_poverty_gap.py
Outdated
Show resolved
Hide resolved
…ty_gap.py Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com>
…p.py Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com>
…s_in_deep_spm_poverty.py Co-authored-by: Pavel Makarchuk <110687043+PavelMakarchuk@users.noreply.github.com>
…e/policyengine-us into SirMalamute/issue3707
tests still failing |
@@ -12,6 +12,6 @@ class deep_poverty_gap(Variable): | |||
definition_period = YEAR | |||
|
|||
def formula(spm_unit, period, parameters): | |||
income = spm_unit("spm_unit_net_income", period) | |||
resources = spm_unit("spm_resources", period) | |||
deep_poverty_threshold = spm_unit("deep_poverty_line", period) | |||
return max_(deep_poverty_threshold - income, 0) |
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.
return max_(deep_poverty_threshold - income, 0) | |
return max_(deep_poverty_threshold - resources, 0) |
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.
the same change is needed everywhere, please go through all the formulas that you changed and check whether the variables that you are using still exist
If you rename income to resources then you will have to change it in other places of the formula
@MaxGhenis we would need to make adjustments to the cps.py as well here right? |
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.
yes please change cps.py where it says spm_unit_net_income_reported
policyengine_us/variables/household/income/spm_unit/spm_unit_oecd_equivalised_net_income.py
Outdated
Show resolved
Hide resolved
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.
rename
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.
rename
…ecd_equivalised_net_income.py Co-authored-by: Max Ghenis <mghenis@gmail.com>
Fixes #3707
copilot:all