Skip to content

Conversation

@MImmesberger
Copy link
Collaborator

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.

Copy link
Collaborator

@hmgaudecker hmgaudecker left a 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).

subsistence_income_per_spouse_m: 500.0
subsistence_income_per_child: 200.0
max_number_of_children: 2
assistance_rate: 0.5
Copy link
Collaborator

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.

@MImmesberger
Copy link
Collaborator Author

Oh I thought this Middle-Earth thing was a joke! 😄

@hmgaudecker
Copy link
Collaborator

Sure, but we are here for the fun, no? 😂

@MImmesberger
Copy link
Collaborator Author

Some tests I deleted without replacing them:

  • test_decorator_for_all_functions_with_rounding_spec (will change infrastructure anyhow and can't load all functions with current infrastructure).

Some further questions:

  • I think test_import.py should be part of GETTSIM, correct?
  • Same for test_import_version.py
  • Not sure what we should do with test_docs.py. I think it should stay with TTSIM, and its imports are broken (but tests run through because everything is xfailed). Would leave it as is for now.

@MImmesberger
Copy link
Collaborator Author

Once #854 is merged, we should test that the loader catches all instances of TTSIMFunctions.

hmgaudecker and others added 2 commits April 9, 2025 10:35
Improve the handling of rounding.

---------

Co-authored-by: Marvin Immesberger <[email protected]>
Co-authored-by: Tim Mensinger <[email protected]>
@hmgaudecker hmgaudecker merged commit a947910 into collect-components-of-namespaces Apr 9, 2025
1 of 7 checks passed
@hmgaudecker hmgaudecker deleted the test-ttsim branch April 9, 2025 08:47
hmgaudecker added a commit that referenced this pull request Apr 12, 2025
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>
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.

3 participants