iza-institute-of-labor-economics / gettsim

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

ENH: Top-level module structure of `_gettsim` #532

Open lars-reimann opened 1 year ago

lars-reimann commented 1 year ago

Is your feature request related to a problem?

The top-level module structure of _gettsim mixes several concerns:

Problem: Because of this it is not immediately obvious, which files must be touched to add a new policy / synthetic data / core functionality. A PR will likely focus on one of the areas.

Other minor issue: config.py needs to describe the PATHS_TO_INTERNAL_FUNCTIONS, which are used by the function loader. It's not possible to simply point to one module that contains all built-in policy functions.


Describe the solution you would like to see

Introduce three modules directly beneath _gettsim:

Potentially add further modules below core (e.g. aggregation).

This helps developers find the code they need to adjust for a new feature.


Interface breaking implications

The public gettsim interface can stay unchanged. Any client code that directly depends on the internal _gettsim interface breaks, however.


Describe alternatives you've considered

hmgaudecker commented 1 year ago

Makes a lot of sense. Probably useful try to think about what is a general framework and what is specific to the German taxes/transfers system. Not that we have any ambition to expand to other countries, but it may make sense to have a very simple system with just a couple of functions for didactical purposes or in research projects where taxes/transfers play a minor role.