Skip to content
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

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

SirMalamute
Copy link
Contributor

Fixes #3707

copilot:all

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.20%. Comparing base (05b2c02) to head (9206370).
Report is 25 commits behind head on master.

❗ Current head 9206370 differs from pull request most recent head ed8094c. Consider uploading reports for the commit ed8094c to get more accurate results

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@MaxGhenis MaxGhenis left a 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.

Copy link
Contributor

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

@PavelMakarchuk
Copy link
Collaborator

@MaxGhenis or @nikhilwoodruff do you know why the added tests give the following error message:
ValueError: Unexpected attributes in definition of variable "relative_income_change": 'requires_computation_after'

I am not familiar with the labor supply part

@MaxGhenis
Copy link
Contributor

@MaxGhenis or @nikhilwoodruff do you know why the added tests give the following error message: ValueError: Unexpected attributes in definition of variable "relative_income_change": 'requires_computation_after'

I am not familiar with the labor supply part

Seems like this is resolved?

@PavelMakarchuk PavelMakarchuk self-requested a review February 19, 2024 21:17
SirMalamute and others added 3 commits March 17, 2024 23:09
…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>
SirMalamute and others added 6 commits March 20, 2024 22:18
…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>
@PavelMakarchuk
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return max_(deep_poverty_threshold - income, 0)
return max_(deep_poverty_threshold - resources, 0)

Copy link
Collaborator

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

@PavelMakarchuk PavelMakarchuk requested a review from MaxGhenis April 1, 2024 20:23
@PavelMakarchuk
Copy link
Collaborator

@MaxGhenis we would need to make adjustments to the cps.py as well here right?

Copy link
Contributor

@MaxGhenis MaxGhenis left a 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename

Copy link
Contributor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename spm_unit_net_income to spm_resources
3 participants