-
Notifications
You must be signed in to change notification settings - Fork 34
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
Wohngeld on individual / BG level #753
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #753 +/- ##
==========================================
+ Coverage 89.53% 89.57% +0.03%
==========================================
Files 52 52
Lines 3688 3711 +23
==========================================
+ Hits 3302 3324 +22
- Misses 386 387 +1 ☔ View full report in Codecov by Sentry. |
I adjusted the title because the individual-level calculation of things is the core from my perspective, even though the main outputs may be at the bg level then. |
Not to argue against the renaming but to make sure we're on the same page: I'd say that at the core, it's a BG-level calculation because the Vorrangprüfung happens at the BG level (to do it on the individual level, we would have to split up Regelbedarf or ALG2 on individual level). |
All good — nur to my mind that's just one of many calculations, other important ones happen at the level of the individual! |
The Kinderwohngeld implementation now relies on the If we ever make
|
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.
Thanks! Two quick comments.
src/_gettsim/transfers/wohngeld.py
Outdated
@@ -657,3 +657,40 @@ def wohngeld_vor_vermög_check_m_hh( | |||
) | |||
|
|||
return out | |||
|
|||
|
|||
def kinderwohngeld_m( |
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.
Should again probably contain vor_vorrang_check
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.
If anything, it's nach_vorrang_check
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.
Why? it uses the input wohngeld_vor_vorrang_check_m
? And it represents potential Kinderwohngeld not the Kindergeld that is indeed paid out, right?
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.
Because of eigenbedarf_gedeckt
the outcome of the Vorrangprüfung is already specified. But given your comment above, we might get rid of this function anyway.
Sure, I am sorry that this did not become clear all along. Do you see any issue with it? |
You probably made it clear, but I didn't thought about it deep enough :)
I think this goes along the lines of the discussion we had yesterday on Zoom (trying out different constellations of BGs to arrive at the actual BG/wohngeldrechtl. Teilhaushalt combination). We have to call the current version of GETTSIM several times to achieve correct results. |
That is true.
To the extent that Wohngeld is linear in the number of people in the entire household (by Wohngeld def), we do not need to try out too many different combinations, right?
Probably not complete yet and my model of how this could work was definitely not complete! I think the upshot is there really is no way of representing it in one DAG when the functions have the same names. If that makes sense, then to achieve the above 6 steps, we can either create a little helper script somewhere or document this. The planned interface change should make this sort of thing very natural. |
Yes that's true, I'm just very pessimistic regarding that actually being true. |
We'll know soonish, I hope. But in any case, I am not super-worried anymore, in the above thing it would mean doing lots of permutations on children in step 2.iii, which presumably will be a small set of people in most applications (colleagues at IAB might form an exception). And you won't have to run steps 1 and 2 many times in any given application. Will be very natural with a revamped interface. |
… Priority check still left to do.
for more information, see https://pre-commit.ci
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.
Just needed for the rain to stop -- looks great! Mostly stylistic comments.
FYI: I'm still writing some tests that cover Mischhaushalte. Currently facing some bugs where GETTSIM and the calculator by BMWSB disagree but will fix that asap. |
I noticed that the calculation of Mietkosten was wrong. This should be done on I added Mischhaushalte to test the module, we get the same results as the BMWSB with its Wohngeld calculator. I didn't implement #713 but I think we can do this in a different PR because this isn't central to what you're trying to do with the Wohngeld module, correct @ChristianZimpelmann ? (Will add a test for the two remaining uncovered lines tomorrow) |
Looks great! I will try it out today.
Yes, this shouldn't be relevant for now. |
As discussed I added Wohngeld to the relevant income of the child to calculate Kindergeldübertrag. (We don't have official data or calculators for Kindergeldübertrag, that's why didn't catch this one before.) |
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.
Looks great to me -- will be away from the machine for a bit, so this is to signal I am very happy with this. Great work!
^ Or did I miss anything in #710 that you don't tackle here? |
No, we can close that one. But I'd suggest to leave #752 open (because we are not 100% sure that our implementation is correct) |
No. If new things come up, it is important to go through the process of explaining what is wrong. Better open a new issue for that then. There isn't a whole lot of information in that issue, either. |
Closes #752
Also, this PR fixes a bug through which Kindergeldübertrag was too high (because Kindergeld was already counted as income when calculating the difference between Regelbedarf and income).