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

South Carolina Tuition Tax Credits #2634

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

Conversation

hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Jul 18, 2023

🤖 Generated by Copilot at 57c10f2

Summary

✨📄✅

This pull request adds a new feature to the policy engine for the South Carolina Tuition Tax Credit, which is a state income tax credit for eligible college tuition expenses. It introduces new parameters, variables, and tests for the credit, and updates the changelog entry accordingly. The new files are located in policyengine_us/parameters/gov/states/sc/tax/income/credits/college_tuition/ and policyengine_us/variables/gov/states/sc/tax/income/credits/college_tuition/.

TaxCreditSC added
Parameters, variables, tests
Winter of coding

Walkthrough

  • Add South Carolina Tuition Tax Credit feature (link)
  • Create new parameter files for the credit rate, limit, tuition limit, and annual hour requirement, with values and metadata for 2022 (link, link, link, link)
  • Create new input variables for the qualified tuition and total hours completed by the tax unit, with metadata and units (link, link)
  • Create new output variable for the credit amount, with metadata, units, and formula that uses the parameters and input variables (link)
  • Create new test file for the credit variable, with three test cases and expected outputs (link)

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9058620) 99.11% compared to head (3d28986) 99.11%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2634   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files        2296     2299    +3     
  Lines       33349    33387   +38     
  Branches      165      165           
=======================================
+ Hits        33053    33091   +38     
  Misses        263      263           
  Partials       33       33           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review July 19, 2023 15:31
@PavelMakarchuk PavelMakarchuk marked this pull request as draft July 19, 2023 15:32
@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review July 26, 2023 15:39
- title: SC I-319 2021
href: https://dor.sc.gov/forms-site/Forms/I319_2021.pdf#page=2
- title: SC I-319 2022
href: https://dor.sc.gov/forms-site/Forms/I319_2022.pdf#page=2
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is two in the references? I see spring and fall in one part, plus summer in another

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not in the references, two is more like a default value for the maximum number of semesters a student can attend for each year.

@hua7450 hua7450 requested a review from MaxGhenis October 3, 2023 23:58
@pxu12 pxu12 added the states/sc South Carolina label Oct 4, 2023
@PavelMakarchuk PavelMakarchuk removed the request for review from MaxGhenis November 4, 2023 00:35
Merge branch 'master' of https://github.com/PolicyEngine/policyengine-us into hua7450/issue2633
Copy link
Contributor

Choose a reason for hiding this comment

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

Schools on the semester system can still have three terms, including summer. Schools on the quarter system have four terms. So I think this is policy-specific.

total_college_hours = person("total_college_hours", period)
semesters_attended = person("college_semesters_attended", period)
required_hours = p.semester_hour_requirement * semesters_attended
meets_hours_requirement = total_college_hours >= required_hours
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this imply semesters_attended > 0?

Suggested change
meets_hours_requirement = total_college_hours >= required_hours
return total_college_hours >= required_hours

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need this to pass the test case where a student is ineligible for attending 0 semester and have 0 credit.

Copy link
Contributor

Choose a reason for hiding this comment

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

How could they have (total_college_hours > 0) & (college_semesters_attended == 0)? Is it that they need to have completed a semester? If so let's rename the variable to college_semesters_completed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If a student has 0 credit hour, 0 semester attended/complete, then obviously this student is not eligible for this credit. If I use your code: return total_college_hours >= required_hours
Then required_hours = 15*0 = 0, total_college_hours = 0 which is >= 0, the function returns true. What's why I add the semester's restriction to make sure that such student is ineligible.

hua7450 and others added 4 commits November 15, 2023 17:07
@hua7450 hua7450 requested a review from MaxGhenis November 16, 2023 15:18
@PavelMakarchuk PavelMakarchuk requested review from MaxGhenis and removed request for MaxGhenis February 8, 2024 15:12
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the number 2 in the SC legal code or tax form? If not it should not be here.

total_college_hours = person("total_college_hours", period)
semesters_attended = person("college_semesters_attended", period)
required_hours = p.semester_hour_requirement * semesters_attended
meets_hours_requirement = total_college_hours >= required_hours
Copy link
Contributor

Choose a reason for hiding this comment

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

How could they have (total_college_hours > 0) & (college_semesters_attended == 0)? Is it that they need to have completed a semester? If so let's rename the variable to college_semesters_completed.

from policyengine_us.model_api import *


class total_college_hours(Variable):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I may have to create a sc_semesters_hours, according to the tax form instruction,
image
but the money you spend on summer hours could count into the credit.
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Summer credit hours do not count toward the semester requirement for credit hours.
You may claim tuition paid for non-semester credit hours only if the student is seeking a degree from the school offering the course and if the student graduated from high school before the course began. A student seeking a degree at one college or university may transfer to another college or university in order to seek a degree and qualify at both schools.
The images were broken, here is the link.

@hua7450 hua7450 requested a review from MaxGhenis February 19, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
states/sc South Carolina
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants