-
Notifications
You must be signed in to change notification settings - Fork 201
Add default parameters to select statements #6286
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
Changes from all commits
19290fb
d3b07f4
18b5591
dc76432
70cb096
335e082
2805445
55deaae
f11d0be
09f26f8
9971453
e8f8a22
7c07f7e
89e91fa
81e1676
4f4735e
3426734
7df38fe
4536e38
3acd6ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| - bump: patch | ||
| changes: | ||
| fixed: | ||
| - Added default parameters to select statements for better performance and clarity (issue #1176) | ||
| - Updated select statements with dummy True conditions to use default parameter instead | ||
| - Set SINGLE as default for filing status select statements per issue #3334 | ||
| changed: | ||
| - Consolidated Pell Grant calculation method variables by replacing pell_grant_calculation_method and pell_grant_uses_efc with pell_grant_uses_sai |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Test that select_filing_status_value works correctly with MD income tax | ||
| - name: Test filing status utility with MD tax - single filer | ||
| period: 2024 | ||
| input: | ||
| people: | ||
| person: | ||
| age: 30 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [person] | ||
| md_taxable_income: 50_000 | ||
| households: | ||
| household: | ||
| members: [person] | ||
| state_code: MD | ||
| output: | ||
| md_income_tax_before_credits: 2_322.50 | ||
|
|
||
| - name: Test filing status utility with MD tax - joint filers | ||
| period: 2024 | ||
| input: | ||
| people: | ||
| head: | ||
| age: 30 | ||
| spouse: | ||
| age: 28 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [head, spouse] | ||
| md_taxable_income: 100_000 | ||
| households: | ||
| household: | ||
| members: [head, spouse] | ||
| state_code: MD | ||
| output: | ||
| md_income_tax_before_credits: 4_697.50 | ||
|
|
||
| - name: Test filing status utility with MD tax - head of household | ||
| period: 2024 | ||
| input: | ||
| people: | ||
| head: | ||
| age: 35 | ||
| child: | ||
| age: 10 | ||
| tax_units: | ||
| tax_unit: | ||
| members: [head, child] | ||
| md_taxable_income: 75_000 | ||
| households: | ||
| household: | ||
| members: [head, child] | ||
| state_code: MD | ||
| output: | ||
| md_income_tax_before_credits: 3_510.00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,4 +25,5 @@ def formula(tax_unit, period, parameters): | |
| 6, | ||
| 8, | ||
| ], | ||
| default=1, # SINGLE | ||
| ) | ||
This file was deleted.
This file was deleted.
|
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. Can we add a unit test, just to sanity test years such as 2022 and 2025 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,4 +34,5 @@ def formula(person, period, parameters): | |
| CCDFAgeGroup.PRESCHOOLER, | ||
| CCDFAgeGroup.SCHOOL_AGE, | ||
| ], | ||
| default=CCDFAgeGroup.SCHOOL_AGE, | ||
|
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. Should it not default to infant to match the default value on line 14? |
||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,5 +30,6 @@ def formula(person, period, parameters): | |
| duration_of_care == durations_of_care.HOURLY, | ||
| ], | ||
| [1, days_per_week, days_per_week, hours_per_week], | ||
| default=0, | ||
|
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. Nit, should this not default to 1 if the default value of |
||
| ) | ||
| return rate_per_period * periods_per_week * WEEKS_IN_YEAR | ||
|
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. We also haven't unit tested this -- can we add while in here? |
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 we confirm that the unit test passes? Don't see the execution in the testing logs
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.
Not blocking but it would be nice to see unit tests with the same
md_taxable_incomeamount but differentmd_income_tax_before_creditsbased on household composition