-
Notifications
You must be signed in to change notification settings - Fork 31
Test TTSIM instance of taxes and transfers #856
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
Conversation
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.
Had a brief look, excellent! Some preliminary comments in the code.
Most importantly, however, the whole thing should live in
tests/ttsim/mettsim
i.e., "Middle Earth Taxes and Transfers Simulator". Feel free to add a sentence that if any aficionado wants to adjust the names at some point, he/she should feel free to do so. Asking my favourite LLM "What are possible taxes and transfers in middle earth?" was a nice starting point, for example. (to be sure: don't do that now, except for the global name things are great as they are)
Then get rid of the functions / parameters directory layer, just put the yaml files directly into housing_benefits etc. (as per GEP 6, we'll have that structure in GETTSIM very soon, too).
tests/ttsim/example_tt_structure/functions/housing_benefits/eligibility/eligibility.py
Outdated
Show resolved
Hide resolved
tests/ttsim/example_tt_structure/functions/housing_benefits/eligibility/eligibility.py
Outdated
Show resolved
Hide resolved
tests/ttsim/example_tt_structure/functions/housing_benefits/eligibility/eligibility.py
Outdated
Show resolved
Hide resolved
| subsistence_income_per_spouse_m: 500.0 | ||
| subsistence_income_per_child: 200.0 | ||
| max_number_of_children: 2 | ||
| assistance_rate: 0.5 |
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.
I hope this is disallowed by GEP-03, we need dates.
tests/ttsim/example_tt_structure/functions/housing_benefits/amount.py
Outdated
Show resolved
Hide resolved
|
Oh I thought this Middle-Earth thing was a joke! 😄 |
|
Sure, but we are here for the fun, no? 😂 |
|
Some tests I deleted without replacing them:
Some further questions:
|
|
Once #854 is merged, we should test that the loader catches all instances of TTSIMFunctions. |
Improve the handling of rounding. --------- Co-authored-by: Marvin Immesberger <[email protected]> Co-authored-by: Tim Mensinger <[email protected]>
a947910
into
collect-components-of-namespaces
This is a huge PR, which started innocently as a fix to #833. In the end, it turned out to be very difficult to change things locally, so in the process of the intense sprint during the week 7-12 April 2025, this ended up including the following: - Updated type hierarchy (`TTSIMObject` as basic building block, `PolicyInput` and `TTSIMFunction` inheriting from that, `TTSIMFunction` has further subclasses for policy, aggregation, ...). - Further separation of tests in ttsim / _gettsim. Including Middle Earth Taxes an Transfers SIMulator METTSIM as tiny example for the ttsim-side of tests (#856) and sensible structure for `_gettsim_tests` (#858) - Sensible treatment of Einnahmen / Einkünfte (#862) - Specify rounding in a dataclass to be provided in the decorators rather than referencing the yaml files from there (#859) - Improve structure for AggregationSpecs, including an Enum for the type of Aggregations (#860) --------- Co-authored-by: Hans-Martin von Gaudecker <[email protected]> Co-authored-by: Marvin Immesberger <[email protected]> Co-authored-by: Marvin Immesberger <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
What problem do you want to solve?
This PR makes a step towards separating TTSIM and GETTSIM by testing the TTSIM infrastructure with its own instance of a fictitious taxes and transfers system that makes use of all features.