iza-institute-of-labor-economics / gettsim

The GErman Taxes and Transfers SIMulator
https://gettsim.readthedocs.io/
GNU Affero General Public License v3.0
56 stars 33 forks source link

Rounding of Taxes and Transfers #659

Closed MImmesberger closed 1 year ago

MImmesberger commented 1 year ago

Closes #88

Todo

codecov[bot] commented 1 year ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d2c717d) 90.96% compared to head (d4b8091) 91.01%.

Files Patch % Lines
src/_gettsim/interface.py 60.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #659 +/- ## ========================================== + Coverage 90.96% 91.01% +0.05% ========================================== Files 48 48 Lines 3131 3140 +9 ========================================== + Hits 2848 2858 +10 + Misses 283 282 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MImmesberger commented 1 year ago

The PR is ready for review.

  1. I couldn't find the legal basis for Wohngeld being payed out in 5€ steps, so I did not implement it. See discussion in #88
  2. The rounding of zu versteuerndes Einkommen includes an additive part (e.g. round down to a number divisible by 54 and then add 18€). A summary is here. Because this wasn't possible with the current machinery, I added an "add" key to the rounding specification that adds a float after the rounding step.
hmgaudecker commented 1 year ago

I couldn't find the legal basis for Wohngeld being payed out in 5€ steps, so I did not implement it. See discussion in

Yes, let's leave it at the nearest Euro!

MImmesberger commented 1 year ago

Thank you for the comments! I hope I addressed all your concerns.

MImmesberger commented 1 year ago

Sorry, I still have trouble interpreting codecov outputs:

From the output I figured that _add_rounding_to_one_function is not properly covered by a test (only implicitly because it is used in the wrapper _add_rounding_to_functions which is tested). But testing directly via test_rounding_callable doesn't help.

Maybe @lars-reimann knows whats going on?

hmgaudecker commented 1 year ago

Oh, codecov happens to be off every now and then. If you are sure it is being run, that's fine!