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

Implement Tax Calculator Feature with Error Handling and Unit Tests #15

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

Conversation

mozziebr
Copy link

Description:
This PR introduces the tax calculator feature to the application, allowing users to calculate total income tax based on salary and tax year. The implementation includes the following changes:

  1. Added a function calculate_tax(salary, tax_year) to calculate total tax, tax bands, and effective tax rate based on the provided salary and tax year.
  2. Created a new endpoint /tax-calculator/ in the Flask application to handle tax calculation requests.
  3. Implemented error handling for various scenarios, such as invalid tax years, negative salaries, and missing parameters, ensuring robustness and reliability of the API.
  4. Added comprehensive unit tests to validate the functionality and behavior of the tax calculator API under different input conditions.
  5. Enhanced code readability and maintainability by adding detailed docstrings to functions and test cases.

This feature enhances the application by providing users with a valuable tool to estimate their income tax liabilities accurately.

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.

1 participant