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

Apply dates_active decorator on abgelt_st. #618

Closed hmgaudecker closed 1 year ago

hmgaudecker commented 1 year ago

What problem do you want to solve?

Abgeltungssteuer did not exist before 2008; make sure it is active in GETTSIM only after that date.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.10% :tada:

Comparison is base (ca39c28) 94.29% compared to head (6c197ba) 94.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #618 +/- ## ========================================== + Coverage 94.29% 94.40% +0.10% ========================================== Files 49 49 Lines 3033 3037 +4 ========================================== + Hits 2860 2867 +7 + Misses 173 170 -3 ``` | [Files Changed](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/618?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics) | Coverage Δ | | |---|---|---| | [...sim/social\_insurance\_contributions/eink\_grenzen.py](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/618?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics#diff-c3JjL19nZXR0c2ltL3NvY2lhbF9pbnN1cmFuY2VfY29udHJpYnV0aW9ucy9laW5rX2dyZW56ZW4ucHk=) | `100.00% <100.00%> (ø)` | | | [...sim/social\_insurance\_contributions/ges\_krankenv.py](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/618?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics#diff-c3JjL19nZXR0c2ltL3NvY2lhbF9pbnN1cmFuY2VfY29udHJpYnV0aW9ucy9nZXNfa3JhbmtlbnYucHk=) | `100.00% <100.00%> (ø)` | | | [src/\_gettsim/taxes/abgelt\_st.py](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/618?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics#diff-c3JjL19nZXR0c2ltL3RheGVzL2FiZ2VsdF9zdC5weQ==) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/iza-institute-of-labor-economics/gettsim/pull/618/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iza-institute-of-labor-economics)

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

hmgaudecker commented 1 year ago

Should be fine now, @mjbloemer and me did check that until 2008, contribution rates differed across health insurers in all years.

I re-ordered the functions in ges_krankenv.py so that the jahresanfang version (made spelling consistent across parameters/functions, too) always comes right below the function.

ChristianZimpelmann commented 1 year ago

Should be fine now, @mjbloemer and me did check that until 2008, contribution rates differed across health insurers in all years.

Great! That simplifies things.

I just encountered another problem, see #626.

Since abgelt_st_y_tu is actually part of DEFAULT_TARGETS (which is not yet time dependend), with this PR and #626 being fixed, we can no longer run GETTSIM with default arguments before 2009.

Possible solution:

hmgaudecker commented 1 year ago

Great catch!

change this line targets = DEFAULT_TARGETS if targets is None else targets such that DEFAULT_TARGETS without respective function to calculate them are ignored.

I'd be fine with throwing an error for the time being. I don't think we should make a release before the interface is updated, anyhow. #627 can easily be incorporated in the process, then.