diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7d959fb6b..cdfe919291 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,7 +89,7 @@ repos: # ty pin in sync with the `ty-pre-commit` rev above. language: python additional_dependencies: - - ty==0.0.49 + - ty==0.0.52 entry: ty check --python .pixi/envs/py314-jax pass_filenames: false always_run: true diff --git a/AGENTS.md b/AGENTS.md index 88ebd37af5..5e9eb3bf25 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,8 +27,8 @@ pixi run -e py314-jax tests src/gettsim/tests_germany/test_policy_cases.py pixi run -e py314-jax tests -k "kindergeld" # Type checking (runs as the ty / ty-jax pre-commit hooks) -prek run ty --all-files -prek run ty-jax --all-files +pixi run prek run ty --all-files +pixi run prek run ty-jax --all-files # Quality checks (linting, formatting) pixi run prek run --all-files diff --git a/CHANGES.md b/CHANGES.md index 614e2371e9..00b59393cc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,19 @@ All releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ge ## Unreleased +- {gh}`1212` GEP 10 Rollout and some related column renamings: Most gain the suffix of + the period they are measured over: `basistarif`, `splittingtarif`, + `tarif_klassen_5_und_6` (and their `_mit_kinderfreibetrag` variants), + `einkommensgrenze_ohne_geschwisterbonus` (and its two age variants), + `vorsorge_arbeitslosenversicherungsbeiträge`, + `vorsorge_krankenversicherungsbeiträge_option_a` and `_option_b` all gain `_y`; + `betrag_versicherter_regulärer_beitragssatz`, + `lohnersatzanteil_einkommen_untere_grenze` and `_obere_grenze`, + `mean_entgeltpunkte_zuschlag`, `minijobgrenze`, `rentenwert` and the Kinderzuschlag + `satz` all gain `_m`. Two lose a suffix they should never have had, being shares + rather than flows: `anteil_steuerfälliger_einnahmen_y` and + `mehrbedarfsanteil_alleinerziehend_m`. `gesamteinkommen_y` becomes + `gesamteinkommen_y_sn`, naming the level it is aggregated to. ({ghuser}`MImmesberger`) - {gh}`1206` Update Rentenwert 2025, 2026. ({ghuser}`cmdr-majus`) - {gh}`1156` Collection of all Grundsicherung im Alter / Wohngeld PRs ({gh}`1163`, {gh}`1167`, {gh}`1164`, {gh}`1159`, {gh}`1154`, {gh}`1155`, {gh}`1178`). diff --git a/docs/geps/params-schema.json b/docs/geps/params-schema.json index db8220d4f9..3a8be91332 100644 --- a/docs/geps/params-schema.json +++ b/docs/geps/params-schema.json @@ -1,6 +1,25 @@ { - "$comment": "If you change this file, always change it in both locations: 1. ttsim/src/ttsim/params-schema.json 2. gettsim/docs/geps/params-schema.json", + "$comment": "Keep in sync with ttsim/src/ttsim/params-schema.json, except unitToken: this GETTSIM copy pins the grouping levels to Germany's, ttsim leaves them open.", "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "unitToken": { + "$comment": "Bases stay open (currencies register per package); the grouping level, if present, must be one of Germany's.", + "type": "string", + "pattern": "^[A-Z][A-Z0-9]*(?:_(?!PER_)[A-Z0-9]+)*(?:_PER_(?:SQUARE_METER|HOURS))?(?:_PER_(?:YEAR|QUARTER|MONTH|WEEK|DAY))?(?:_PER_(?:HH|EHE|FG|BG|EG|WTHH|SN))?$" + }, + "unitDeclaration": { + "oneOf": [ + { "$ref": "#/definitions/unitToken" }, + { + "type": "object", + "additionalProperties": { "$ref": "#/definitions/unitDeclaration" } + } + ] + }, + "axisUnitDeclaration": { + "$ref": "#/definitions/unitToken" + } + }, "type": "object", "patternProperties": { "^[a-zA-Z0-9äöüßÄÖÜ_]+$": { @@ -25,19 +44,13 @@ "additionalProperties": false }, "unit": { - "type": ["string", "null"], - "enum": [ - "Euros", - "DM", - "Share", - "Percent", - "Years", - "Months", - "Hours", - "Square Meters", - "Euros / Square Meter", - null - ] + "$ref": "#/definitions/unitDeclaration" + }, + "input_unit": { + "$ref": "#/definitions/axisUnitDeclaration" + }, + "output_unit": { + "$ref": "#/definitions/axisUnitDeclaration" }, "type": { "type": "string", @@ -55,10 +68,6 @@ "require_converter" ] }, - "reference_period": { - "type": ["string", "null"], - "enum": ["Year", "Quarter", "Month", "Week", "Day", "Hour", null] - }, "add_jahresanfang": {"type": "boolean"} }, "patternProperties": { @@ -71,9 +80,30 @@ { "type": "string", "enum": ["inf", "-inf"] } ] }, + "intervals": { + "type": "array", + "items": { + "type": "object", + "properties": { + "interval": { "type": "string" } + }, + "required": ["interval"], + "additionalProperties": true + } + }, + "unit": { + "$ref": "#/definitions/unitDeclaration" + }, + "input_unit": { + "$ref": "#/definitions/axisUnitDeclaration" + }, + "output_unit": { + "$ref": "#/definitions/axisUnitDeclaration" + }, "reference": { "type": "string" }, "note": { "type": "string" }, - "deviation_from": { "type": "string" } + "deviation_from": { "type": "string" }, + "updates_previous": { "type": "boolean" } }, "additionalProperties": true } @@ -83,11 +113,68 @@ { "required": [ "name", "description", - "unit", - "reference_period", "type" ] }, + { + "if": { + "properties": { + "type": { + "enum": [ + "piecewise_constant", + "piecewise_linear", + "piecewise_quadratic", + "piecewise_cubic", + "consecutive_int_lookup_table", + "sparse_to_consecutive_int_lookup_table", + "month_based_phase_inout_of_age_thresholds", + "year_based_phase_inout_of_age_thresholds" + ] + } + } + }, + "then": { + "required": ["input_unit", "output_unit"], + "not": { "required": ["unit"] } + }, + "else": { + "if": { + "properties": { "type": { "const": "require_converter" } } + }, + "then": { + "oneOf": [ + { + "required": ["unit"], + "allOf": [ + { "not": { "required": ["input_unit"] } }, + { "not": { "required": ["output_unit"] } } + ] + }, + { + "required": ["input_unit", "output_unit"], + "not": { "required": ["unit"] } + } + ] + }, + "else": { + "allOf": [ + { "not": { "required": ["input_unit"] } }, + { "not": { "required": ["output_unit"] } } + ] + } + } + }, + { + "if": { + "properties": { "type": { "const": "scalar" } }, + "required": ["type"] + }, + "then": { + "properties": { + "unit": { "$ref": "#/definitions/unitToken" } + } + } + }, { "minProperties": 1, "patternProperties": { diff --git a/docs/how_to_guides/modifications_of_policy_environments.ipynb b/docs/how_to_guides/modifications_of_policy_environments.ipynb index 003533bdbd..3d708be9d2 100644 --- a/docs/how_to_guides/modifications_of_policy_environments.ipynb +++ b/docs/how_to_guides/modifications_of_policy_environments.ipynb @@ -222,15 +222,16 @@ "- `leaf_name`: The leaf name of the parameter in GETTSIM's policy environment.\n", "- `start_date`: The date from which the parameter is valid (if applicable).\n", "- `end_date`: The date until which the parameter is valid (if applicable).\n", - "- `unit`: The unit of the parameter (if applicable).\n", - "- `reference_period`: The period over which the parameter is valid (if applicable).\n", + "- `unit`: The unit of the parameter (GEP 10).\n", "- `name`: The name of the parameter.\n", "- `description`: A more elaborate description of the parameter.\n", "- `value`: The value of the parameter.\n", "- `note`: Some notes (if applicable).\n", "- `reference`: A legal reference.\n", "\n", - "When modifying parameters, you will mostly care about the `value` attribute.\n", + "When modifying parameters, you will mostly care about the `value` attribute. Every\n", + "parameter must declare a `unit` (GEP 10). Parameters state a concrete currency, e.g.\n", + "`TTSIMUnit.EUR.PER_YEAR`.\n", "\n", "### Scalar Parameters\n", "\n", @@ -301,8 +302,9 @@ "Create a new `ScalarParam` object. To do this, we first import the `ScalarParam` class\n", "from GETTSIM and then instantiate it with the new value.\n", "\n", - "**Note**: You don't have to specify all attributes of the `ScalarParam` class. Only the\n", - "value attribute is required." + "**Note**: You don't have to specify all attributes of the `ScalarParam` class. The\n", + "`value` and the `unit` are required; here the unit is the one the original parameter\n", + "declares (GEP 10)." ] }, { @@ -312,9 +314,9 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import ScalarParam\n", + "from gettsim.tt import ScalarParam, TTSIMUnit\n", "\n", - "higher_arbeitnehmerpauschbetrag = ScalarParam(value=1600)" + "higher_arbeitnehmerpauschbetrag = ScalarParam(value=1600, unit=TTSIMUnit.EUR.PER_YEAR)" ] }, { @@ -416,7 +418,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import DictParam\n", + "from gettsim.tt import DictParam, TTSIMUnit\n", "\n", "# Step 1: Create a copy of the status quo policy environment.\n", "higher_kinderfreibetrag_pe = copy_environment(status_quo_environment)\n", @@ -427,6 +429,7 @@ " \"betreuung_erziehung_ausbildung\": 1464,\n", " \"sächliches_existenzminimum\": 4000,\n", " },\n", + " unit=TTSIMUnit.EUR.PER_YEAR,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -553,6 +556,7 @@ "source": [ "from gettsim.tt import (\n", " ConsecutiveIntLookupTableParam,\n", + " TTSIMUnit,\n", " get_consecutive_int_lookup_table_param_value,\n", ")\n", "\n", @@ -576,6 +580,8 @@ " },\n", " xnp=np,\n", " ),\n", + " input_unit=TTSIMUnit.CALENDAR_YEAR,\n", + " output_unit=TTSIMUnit.YEARS,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -680,7 +686,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import PiecewisePolynomialParam, get_piecewise_parameters\n", + "from gettsim.tt import PiecewisePolynomialParam, TTSIMUnit, get_piecewise_parameters\n", "\n", "increased_behindertenpauschbetrag = PiecewisePolynomialParam(\n", " value=get_piecewise_parameters(\n", @@ -697,7 +703,9 @@ " ],\n", " leaf_name=\"parameter_behindertenpauschbetrag\",\n", " xnp=np,\n", - " )\n", + " ),\n", + " input_unit=TTSIMUnit.DIMENSIONLESS,\n", + " output_unit=TTSIMUnit.EUR.PER_YEAR,\n", ")\n", "\n", "increased_behindertenpauschbetrag_pe = copy_environment(status_quo_environment)\n", @@ -770,7 +778,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import RawParam\n", + "from gettsim.tt import RawParam, TTSIMUnit\n", "\n", "# Step 1: Create a copy of the status quo policy environment.\n", "increased_tax_exemption_pe = copy_environment(status_quo_environment)\n", @@ -790,7 +798,9 @@ " {\"interval\": \"[68480, 277825)\", \"slope\": 0.42, \"quadratic\": 0},\n", " {\"interval\": \"[277825, inf)\", \"slope\": 0.45, \"quadratic\": 0},\n", " ],\n", - " }\n", + " },\n", + " input_unit=TTSIMUnit.EUR.PER_YEAR,\n", + " output_unit=TTSIMUnit.EUR.PER_YEAR,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -825,7 +835,7 @@ "dictionary.\n", "\n", "```python\n", - "@param_function()\n", + "@param_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_pro_kind_y(parameter_kinderfreibetrag: dict[str, float]) -> float:\n", " return sum(parameter_kinderfreibetrag.values())\n", "```" @@ -857,7 +867,7 @@ "The original function looks like this:\n", "\n", "```python\n", - "@param_function()\n", + "@param_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_pro_kind_y(\n", " parameter_kinderfreibetrag: dict[str, float],\n", ") -> float:\n", @@ -874,10 +884,10 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import param_function\n", + "from gettsim.tt import TTSIMUnit, param_function\n", "\n", "\n", - "@param_function()\n", + "@param_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_pro_kind_y(\n", " parameter_kinderfreibetrag: dict[str, float],\n", " kinderzuschlag__parameter_existenzminimum: dict[str, dict[str, float]],\n", @@ -955,6 +965,10 @@ "`PolicyFunction`s are usually written to operate on rows of the input data. They can\n", "take any parameter or other `ColumnObject` as inputs.\n", "\n", + "Like parameters, every `ColumnObject` declares a `unit` (GEP 10), so a function you\n", + "add or replace must declare one too. Functions are typically currency-agnostic —\n", + "they use `TTSIMUnit.CURRENCY.PER_YEAR`, not a concrete currency like `TTSIMUnit.EUR.PER_YEAR`.\n", + "\n", "**Note**: Some `PolicyFunction`s operate on columns of input data. Their decorator will\n", "contain the term `vectorization_strategy=\"not_required\"`.\n", "\n", @@ -964,7 +978,7 @@ "This is the original function:\n", "\n", "```python\n", - "@policy_function()\n", + "@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_y(\n", " anzahl_kinderfreibeträge: int,\n", " kinderfreibetrag_pro_kind_y: float,\n", @@ -994,16 +1008,21 @@ ")\n", "\n", "# Step 2: Create a new parameter `min_anzahl_kinder_für_kinderfreibetrag`\n", - "from gettsim.tt import ScalarParam\n", + "from gettsim.tt import ScalarParam, TTSIMUnit\n", "\n", - "min_anzahl_kinder_für_kinderfreibetrag = ScalarParam(value=2)\n", + "# The threshold is compared against `familie__anzahl_kinder_fg`, a child count at the\n", + "# Familiengemeinschaft level, so it carries the same per-fg unit (GEP 10): a comparison\n", + "# is only meaningful between operands in identical units.\n", + "min_anzahl_kinder_für_kinderfreibetrag = ScalarParam(\n", + " value=2, unit=TTSIMUnit.PERSON_COUNT.PER_FG\n", + ")\n", "\n", "# Step 3: Create a new `PolicyFunction` that modifies the tax deduction for children\n", "# based on the new parameter\n", "from gettsim.tt import policy_function\n", "\n", "\n", - "@policy_function()\n", + "@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_y(\n", " anzahl_kinderfreibeträge: int,\n", " kinderfreibetrag_pro_kind_y: float,\n", diff --git a/docs/tt_explanations/childrens_income_grundsicherung_im_alter.md b/docs/tt_explanations/childrens_income_grundsicherung_im_alter.md index 5e5699c1bf..d13b42832a 100644 --- a/docs/tt_explanations/childrens_income_grundsicherung_im_alter.md +++ b/docs/tt_explanations/childrens_income_grundsicherung_im_alter.md @@ -18,7 +18,7 @@ SGB XII). GETTSIM sets `grundsicherung__im_alter__betrag_m` to zero for persons for whom `grundsicherung__im_alter__hat_kind_mit_einkommen_über_einkommensgrenze` is true. A child's income is compared against the threshold parameter -`grundsicherung__im_alter__einkommensgrenze_kinder` (100,000 Euro per year). Children +`grundsicherung__im_alter__einkommensgrenze_kinder_y` (100,000 Euro per year). Children are linked to their parents via `familie__p_id_elternteil_1` and `familie__p_id_elternteil_2`; the threshold applies to each child individually, not to the sum of all children's incomes. diff --git a/docs/tt_explanations/gemischte_bedarfsgemeinschaften_and_mischhaushalte.md b/docs/tt_explanations/gemischte_bedarfsgemeinschaften_and_mischhaushalte.md index b989efefa3..d67cffe4dc 100644 --- a/docs/tt_explanations/gemischte_bedarfsgemeinschaften_and_mischhaushalte.md +++ b/docs/tt_explanations/gemischte_bedarfsgemeinschaften_and_mischhaushalte.md @@ -100,7 +100,7 @@ income: - **SGB II → SGB XII**: If the SGB II BG members' total distributable income exceeds their total Bedarf, the surplus enters the SGB XII Einsatzgemeinschaft (BSG B 14 AS - 89/20 R). In GETTSIM: `bürgergeld__überschusseinkommen_m`. + 89/20 R). In GETTSIM: `bürgergeld__überschusseinkommen_m_bg`. - **SGB XII → SGB II**: Conversely, if the Einsatzgemeinschaft's income exceeds its Bedarf, the surplus enters the SGB II BG. In GETTSIM: `grundsicherung__im_alter__überschusseinkommen_m_eg` and diff --git a/docs/tutorials/simple_example.ipynb b/docs/tutorials/simple_example.ipynb index 947083b14f..f86a546796 100644 --- a/docs/tutorials/simple_example.ipynb +++ b/docs/tutorials/simple_example.ipynb @@ -394,7 +394,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We get the current `value` of the `ScalarParam` out. We then inject a new `ScalarParam` object into the same place of `policy_environment`:" + "We get the current `value` of the `ScalarParam` out. We then inject a new `ScalarParam`\n", + "object into the same place of `policy_environment`, carrying over the unit of the\n", + "parameter we replace — every parameter must declare one (GEP 10)." ] }, { @@ -405,7 +407,7 @@ "source": [ "old_beitragssatz = status_quo[\"sozialversicherung\"][\"rente\"][\"beitrag\"][\"beitragssatz\"]\n", "increased_rate[\"sozialversicherung\"][\"rente\"][\"beitrag\"][\"beitragssatz\"] = (\n", - " tt.ScalarParam(value=old_beitragssatz.value + 0.01)\n", + " tt.ScalarParam(value=old_beitragssatz.value + 0.01, unit=old_beitragssatz.unit)\n", ")" ] }, diff --git a/pixi.lock b/pixi.lock index 6072cca632..fcc91a3e55 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,8 +261,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/widgetsnbextension-4.0.15-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -283,6 +285,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -497,10 +500,12 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zeromq-4.3.5-h84953be_11.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda - pypi: . - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/07/f4/84d160e9fa8cada1e0a9381cae4fa81eecd573577a5b34366d8ced59bdf7/simplejson-4.1.1-cp314-cp314-macosx_10_15_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/f6/a7bf5d75a6481038bbb61846d87d43124d63741385796ef7b37d326f46bd/optree-0.19.1-cp314-cp314-macosx_10_15_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -519,6 +524,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -733,8 +739,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zeromq-4.3.5-h10816f8_11.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/49/cc/14dd93887295859457e507fc46a847b68ae8f20c42b2fde4d8a749c94bbc/optree-0.19.1-cp314-cp314-macosx_11_0_arm64.whl @@ -755,6 +763,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -974,9 +983,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zeromq-4.3.5-h3a581c9_11.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/18/72/ec1b5cbdcb140c132e6c7bdf99bd73e4f675439e77126c88f472fcffa09c/simplejson-4.1.1-cp314-cp314-win_amd64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -997,6 +1008,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/f3/c3/0c6798456bade745c75c452342dabacce5798196483e77e643be1f53877d/orjson-3.11.9-cp314-cp314-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl docs: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -1266,8 +1278,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/38/2e/21a3ede87f0bf82d6c7bcb90480d50a6490eb974c6ab20881188e440957c/simplejson-4.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -1288,6 +1302,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/accessible-pygments-0.0.5-pyhd8ed1ab_1.conda @@ -1515,8 +1530,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/33/93fcc25907235c344ae73122f8a4e01d2d393ef062b4af7d2e2487a32c37/orjson-3.11.9-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -1537,6 +1554,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/accessible-pygments-0.0.5-pyhd8ed1ab_1.conda @@ -1764,8 +1782,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/33/93fcc25907235c344ae73122f8a4e01d2d393ef062b4af7d2e2487a32c37/orjson-3.11.9-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -1786,6 +1806,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/accessible-pygments-0.0.5-pyhd8ed1ab_1.conda @@ -2018,8 +2039,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/50/52/49b8a8d9e94c57c6fa5008953f84a1c36a4119a3b90dcb7df745f1f05a00/optree-0.19.1-cp313-cp313-win_amd64.whl @@ -2040,6 +2063,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/fe/a5/c7a0a47883a9015b54c9d8a4b62f2aba17bd4335b1787b9b8a0fc2fa6d52/simplejson-4.1.1-cp313-cp313-win_amd64.whl py311: channels: @@ -2296,9 +2320,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/09/b9/f668bc51129c0fec7728ae8b43180417fe1c1fe99f71d302739f6cc50944/optree-0.19.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/39/7f/117dd2ec65e4140576f8ef991d88220f9b806769f7a8c20e0550c0f924e2/coverage-7.14.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -2324,6 +2350,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -2535,9 +2562,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/1e/51/3fb9e65ae76ee97bd611869a503fa3fc0a6e81dd8b737cf3003f682df7ff/orjson-3.11.9-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -2563,6 +2592,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/f1/24/efb17eb94018dd3415d0e8a76a4786a866e8964aa9c50f033399d23939c2/coverage-7.14.3-cp311-cp311-macosx_10_9_x86_64.whl - pypi: https://files.pythonhosted.org/packages/f2/ae/2c272971c8a87e2539c54a98eb6ff037bee1e2e93943c3986cf7500a4f3a/simplejson-4.1.1-cp311-cp311-macosx_10_9_x86_64.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -2774,9 +2804,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/1e/51/3fb9e65ae76ee97bd611869a503fa3fc0a6e81dd8b737cf3003f682df7ff/orjson-3.11.9-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/4e/a2/6eebfb99dedc139f549200f61ade6d1890ac5707c5d427bdfa6fe39c9313/simplejson-4.1.1-cp311-cp311-macosx_11_0_arm64.whl @@ -2802,6 +2834,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/d6/93/7decea24656f416d61fa57b7113b1fbdbc042b7ab421399a84e1755676a1/optree-0.19.1-cp311-cp311-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/anyio-4.14.0-pyhcf101f3_0.conda @@ -3018,9 +3051,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/22/64/3cc7b08cb1c0f1949895f9490217ca8db6ced7f3bf75c65a5bf31c07bf1e/optree-0.19.1-cp311-cp311-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/38/04/df9b37aedbd524dca20840d25ebe01d6ae486b89792aeff5d15b9c4114f7/simplejson-4.1.1-cp311-cp311-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/3f/17/1a1a228183d62d1b77e2c30d210f47dd4768b310ebe1607c63e3c0e3a71e/orjson-3.11.9-cp311-cp311-win_amd64.whl @@ -3047,6 +3082,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl py312: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -3305,11 +3341,13 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/06/c2/05b8c890097c61a7f4406b35396b997a635200ded0339eda83dfbe526c5f/coverage-7.14.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl - pypi: https://files.pythonhosted.org/packages/0c/b6/156a8de1e1b47694f0e7de6675866936608d45dc68388fd017d36f8693be/simplejson-4.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl - pypi: https://files.pythonhosted.org/packages/0e/a4/82b7a2fe5d8a67a59ed831b24d59a3d46ea7d207b66e1602d376541d94a6/orjson-3.11.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -3333,6 +3371,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e2/6a/54e4c47e61a51504a5224c933722e0c8a69925aacec4c08175e9675aeb81/optree-0.19.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -3547,9 +3586,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/16/6d/11867a3ffa3a3608d84a4de51ef4dd0896d6b5cc9132fbe1daf593e677bc/orjson-3.11.9-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -3575,6 +3616,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -3789,9 +3831,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/16/6d/11867a3ffa3a3608d84a4de51ef4dd0896d6b5cc9132fbe1daf593e677bc/orjson-3.11.9-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/36/16/0fc0cb52538783dbbae0934b834f5a58fd5354380ee6cad4a07b15dc845d/coverage-7.14.3-cp312-cp312-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -3817,6 +3861,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -4036,8 +4081,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/31/97/d7e3ec79dcdde81f785a0446acf75fea77723f5ca4b98556350d7877986f/optree-0.19.1-cp312-cp312-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -4065,6 +4112,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl py313: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -4322,8 +4370,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/38/2e/21a3ede87f0bf82d6c7bcb90480d50a6490eb974c6ab20881188e440957c/simplejson-4.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -4350,6 +4400,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -4565,8 +4616,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/33/93fcc25907235c344ae73122f8a4e01d2d393ef062b4af7d2e2487a32c37/orjson-3.11.9-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl @@ -4593,6 +4646,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -4808,8 +4862,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/31/e6/38c3653ff6d56d704b29241362387ca824e38e15b76fdcb7096538195790/coverage-7.14.3-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/32/33/93fcc25907235c344ae73122f8a4e01d2d393ef062b4af7d2e2487a32c37/orjson-3.11.9-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl @@ -4836,6 +4892,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -5056,8 +5113,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/50/52/49b8a8d9e94c57c6fa5008953f84a1c36a4119a3b90dcb7df745f1f05a00/optree-0.19.1-cp313-cp313-win_amd64.whl @@ -5084,6 +5143,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/fe/a5/c7a0a47883a9015b54c9d8a4b62f2aba17bd4335b1787b9b8a0fc2fa6d52/simplejson-4.1.1-cp313-cp313-win_amd64.whl py314: channels: @@ -5342,9 +5402,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/27/ca/59ea35fb99743549ec8b37eff141ece4431fea590c89e536ed8032ef45cf/coverage-7.14.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -5370,6 +5432,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -5585,10 +5648,12 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/07/f4/84d160e9fa8cada1e0a9381cae4fa81eecd573577a5b34366d8ced59bdf7/simplejson-4.1.1-cp314-cp314-macosx_10_15_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/f6/a7bf5d75a6481038bbb61846d87d43124d63741385796ef7b37d326f46bd/optree-0.19.1-cp314-cp314-macosx_10_15_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -5613,6 +5678,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -5828,9 +5894,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/12/1d/db378b5cca433b90b893f26dab728b280ddd89f272a1fdfed4aeaa05c686/coverage-7.14.3-cp314-cp314-macosx_11_0_arm64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/49/cc/14dd93887295859457e507fc46a847b68ae8f20c42b2fde4d8a749c94bbc/optree-0.19.1-cp314-cp314-macosx_11_0_arm64.whl @@ -5856,6 +5924,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -6076,9 +6145,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/18/72/ec1b5cbdcb140c132e6c7bdf99bd73e4f675439e77126c88f472fcffa09c/simplejson-4.1.1-cp314-cp314-win_amd64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -6105,6 +6176,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/f3/c3/0c6798456bade745c75c452342dabacce5798196483e77e643be1f53877d/orjson-3.11.9-cp314-cp314-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl py314-cuda: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -6362,13 +6434,15 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/01/8a/f767031dcd0d24c2bbab4b696dbcf004da4f3284e5e4649fc47bc0e2bb78/nvidia_nvvm-13.3.33-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl - pypi: https://files.pythonhosted.org/packages/0a/a7/b63e19b0cfb1ef4d2a6053aad1b1cc7344d1f14548c4dffd28b8416fc178/nvidia_cusparse-12.8.1.7-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl - pypi: https://files.pythonhosted.org/packages/13/4a/02a64ee1f4708ad28f49ffa92735cb1a8325f617cb59f33951a07a8c4cca/nvidia_cusolver-12.2.2.18-py3-none-manylinux_2_27_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/27/ca/59ea35fb99743549ec8b37eff141ece4431fea590c89e536ed8032ef45cf/coverage-7.14.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/3f/34/c500f90c7ae641b8e0f98965b36b8a7ac79cc8b296e8d251fe3eb592ee54/nvidia_nccl_cu13-2.30.7-py3-none-manylinux_2_18_x86_64.whl - pypi: https://files.pythonhosted.org/packages/3f/af/e1b107f034f7c133255c162b922bbad3da5be20ebf76df17662ae4bd31f6/nvidia_cuda_nvcc-13.3.33-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl @@ -6411,6 +6485,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e7/00/fab4a29fa1d7eb43bc6b94de4e86312c5e425d5582e58b9641300b9dffc7/nvidia_cufft-12.3.0.29-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl - pypi: https://files.pythonhosted.org/packages/f0/ee/580ca6f29dcab0221db8706badca1bbbb084f1975c4d4e83329c3a7e31f0/nvidia_nvjitlink-13.3.33-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/fe/fb/195d50d25ab68a76b817ffc68c45b1fb828598ce35a8e5c1736060628dab/nvidia_cuda_cccl-13.3.3.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl py314-jax: channels: @@ -6669,10 +6744,12 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/27/ca/59ea35fb99743549ec8b37eff141ece4431fea590c89e536ed8032ef45cf/coverage-7.14.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -6702,6 +6779,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/cb/fc/8c82be70b8f96d09943360f34cfb2ecdd3035294c51bce4131eeabe56645/tabcompleter-1.4.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl osx-arm64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda @@ -6917,10 +6995,12 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/12/1d/db378b5cca433b90b893f26dab728b280ddd89f272a1fdfed4aeaa05c686/coverage-7.14.3-cp314-cp314-macosx_11_0_arm64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/49/cc/14dd93887295859457e507fc46a847b68ae8f20c42b2fde4d8a749c94bbc/optree-0.19.1-cp314-cp314-macosx_11_0_arm64.whl @@ -6950,6 +7030,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f2/0d/27471ec9f1d04674f6e62de809412371e097aed3eca7d9483e677c54c214/jaxlib-0.10.2-cp314-cp314-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl win-64: - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/alabaster-1.0.0-pyhd8ed1ab_1.conda @@ -7170,11 +7251,13 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/0d/7d/c592d1fa69c210be0d2743fffc598dfc2f54efa9671c5f6f5d1e151c6f4a/jaxlib-0.10.2-cp314-cp314-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/18/72/ec1b5cbdcb140c132e6c7bdf99bd73e4f675439e77126c88f472fcffa09c/simplejson-4.1.1-cp314-cp314-win_amd64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl @@ -7204,6 +7287,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/f3/c3/0c6798456bade745c75c452342dabacce5798196483e77e643be1f53877d/orjson-3.11.9-cp314-cp314-win_amd64.whl - pypi: https://files.pythonhosted.org/packages/f7/5e/35c856e186b74678c24927847ad9895a51f1bc02a0c6126477a6c6040064/pyreadline3-3.5.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl py314-metal: channels: - url: https://conda.anaconda.org/conda-forge/ @@ -7425,11 +7509,13 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - pypi: . - pypi: git+https://github.com/ttsim-dev/gettsim-personas.git?branch=main#6d8d9e9966b4fa8f8a5923c78fb31323c60980d9 - - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 - pypi: https://files.pythonhosted.org/packages/09/dc/6d8fbfc29d902251cf333414cf7dcfaf4b252a9920c881354584ed36270d/jax_metal-0.1.1-py3-none-macosx_13_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/12/1d/db378b5cca433b90b893f26dab728b280ddd89f272a1fdfed4aeaa05c686/coverage-7.14.3-cp314-cp314-macosx_11_0_arm64.whl + - pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/49/cc/14dd93887295859457e507fc46a847b68ae8f20c42b2fde4d8a749c94bbc/optree-0.19.1-cp314-cp314-macosx_11_0_arm64.whl @@ -7460,6 +7546,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/e3/ac/c428c66241a144617a8af7a28e2e055e1438d23b949b62ac4b401a69fb79/pytest_profiling-1.8.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f2/0d/27471ec9f1d04674f6e62de809412371e097aed3eca7d9483e677c54c214/jaxlib-0.10.2-cp314-cp314-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/f9/14/abe5ce876ab5b66ee3c691bf537fcd43d037aea55d447aacf74630a8f31e/plotly-6.8.0-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl packages: - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda build_number: 20 @@ -19734,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=main#b86b0d6e66d7ffaf1002b093fa8ea70f0a0e862e +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 name: ttsim-backend - version: 1.2.2.dev15+gb86b0d6e6 + version: 1.2.2.dev52+g46b6b439a requires_dist: - beartype>=0.18 - dags>=0.6 @@ -19749,6 +19836,7 @@ packages: - openpyxl - optree>=0.16 - pandas>=3 + - pint>=0.24 - plotly>=6.5 - portion - pygments @@ -19876,6 +19964,68 @@ packages: version: 4.1.1 sha256: cc0442dea71cd9cbf30a0b8b9929ab5aa6c02c0443a3d977351e6ec5bada4388 requires_python: '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*' +- pypi: https://files.pythonhosted.org/packages/1b/dd/a9fe6a0a09512da23951c68bf36466aeecd89def3183dc095edbc807ddc5/pint-0.25.3-py3-none-any.whl + name: pint + version: 0.25.3 + sha256: 27eb25143bd5de9fcc4d5a4b484f16faf6b4615aa93ece6b3373a8c1a3c1b97d + requires_dist: + - flexcache>=0.3 + - flexparser>=0.4 + - platformdirs>=2.1.0 + - typing-extensions>=4.0.0 + - babel<=2.8 ; extra == 'all' + - dask<2025.3.0 ; extra == 'all' + - matplotlib ; extra == 'all' + - numpy>=1.23 ; extra == 'all' + - pint-pandas>=0.3 ; extra == 'all' + - scipy ; extra == 'all' + - uncertainties>=3.1.6 ; extra == 'all' + - xarray ; extra == 'all' + - babel<=2.8 ; extra == 'babel' + - pytest ; extra == 'codspeed' + - pytest-benchmark ; extra == 'codspeed' + - pytest-codspeed ; extra == 'codspeed' + - pytest-cov ; extra == 'codspeed' + - pytest-mpl ; extra == 'codspeed' + - pytest-subtests ; extra == 'codspeed' + - dask<2025.3.0 ; extra == 'dask' + - babel ; extra == 'docs' + - commonmark==0.8.1 ; extra == 'docs' + - currencyconverter ; extra == 'docs' + - docutils ; extra == 'docs' + - graphviz ; extra == 'docs' + - ipykernel ; extra == 'docs' + - ipython<=8.12 ; extra == 'docs' + - jupyter-client ; extra == 'docs' + - nbsphinx ; extra == 'docs' + - pooch ; extra == 'docs' + - pygments>=2.4 ; extra == 'docs' + - recommonmark==0.5.0 ; extra == 'docs' + - sciform ; extra == 'docs' + - scipy ; extra == 'docs' + - serialize ; extra == 'docs' + - sparse ; extra == 'docs' + - sphinx-book-theme>=1.1.0 ; extra == 'docs' + - sphinx-copybutton ; extra == 'docs' + - sphinx-design ; extra == 'docs' + - sphinx>=6,<8.2 ; extra == 'docs' + - matplotlib ; extra == 'matplotlib' + - numpy>=1.23 ; extra == 'numpy' + - pint-pandas>=0.3 ; extra == 'pandas' + - scipy ; extra == 'scipy' + - pytest ; extra == 'test' + - pytest-benchmark ; extra == 'test' + - pytest-cov ; extra == 'test' + - pytest-subtests ; extra == 'test' + - pytest ; extra == 'test-all' + - pytest-benchmark ; extra == 'test-all' + - pytest-cov ; extra == 'test-all' + - pytest-mpl ; extra == 'test-all' + - pytest-subtests ; extra == 'test-all' + - pytest-mpl ; extra == 'test-mpl' + - uncertainties>=3.1.6 ; extra == 'uncertainties' + - xarray ; extra == 'xarray' + requires_python: '>=3.11' - pypi: https://files.pythonhosted.org/packages/1e/51/3fb9e65ae76ee97bd611869a503fa3fc0a6e81dd8b737cf3003f682df7ff/orjson-3.11.9-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl name: orjson version: 3.11.9 @@ -19997,6 +20147,17 @@ packages: requires_dist: - tomli ; python_full_version <= '3.11' and extra == 'toml' requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/27/cd/c883e1a7c447479d6e13985565080e3fea88ab5a107c21684c813dba1875/flexcache-0.3-py3-none-any.whl + name: flexcache + version: '0.3' + sha256: d43c9fea82336af6e0115e308d9d33a185390b8346a017564611f1466dcd2e32 + requires_dist: + - typing-extensions + - pytest ; extra == 'test' + - pytest-mpl ; extra == 'test' + - pytest-cov ; extra == 'test' + - pytest-subtests ; extra == 'test' + requires_python: '>=3.9' - pypi: https://files.pythonhosted.org/packages/31/97/d7e3ec79dcdde81f785a0446acf75fea77723f5ca4b98556350d7877986f/optree-0.19.1-cp312-cp312-win_amd64.whl name: optree version: 0.19.1 @@ -21479,6 +21640,17 @@ packages: - numpy>=1.22 ; extra == 'express' - kaleido>=1.3.0 ; extra == 'kaleido' requires_python: '>=3.8' +- pypi: https://files.pythonhosted.org/packages/fe/5e/3be305568fe5f34448807976dc82fc151d76c3e0e03958f34770286278c1/flexparser-0.4-py3-none-any.whl + name: flexparser + version: '0.4' + sha256: 3738b456192dcb3e15620f324c447721023c0293f6af9955b481e91d00179846 + requires_dist: + - typing-extensions + - pytest ; extra == 'test' + - pytest-mpl ; extra == 'test' + - pytest-cov ; extra == 'test' + - pytest-subtests ; extra == 'test' + requires_python: '>=3.9' - pypi: https://files.pythonhosted.org/packages/fe/a5/c7a0a47883a9015b54c9d8a4b62f2aba17bd4335b1787b9b8a0fc2fa6d52/simplejson-4.1.1-cp313-cp313-win_amd64.whl name: simplejson version: 4.1.1 diff --git a/pyproject.toml b/pyproject.toml index ba08344316..861f611ab8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,7 +168,7 @@ jaxtyping = ">=0.3.2" kaleido = ">=1.0.0" pdbp = ">=1.7.1" dags = ">=0.6.0" -ttsim-backend = { git = "https://github.com/ttsim-dev/ttsim.git", branch = "main" } +ttsim-backend = { git = "https://github.com/ttsim-dev/ttsim.git", branch = "gep10-annotate-mettsim" } [tool.pixi.workspace] channels = [ "conda-forge" ] platforms = [ "linux-64", "osx-64", "osx-arm64", "win-64" ] diff --git a/src/gettsim/__init__.py b/src/gettsim/__init__.py index 025708bb73..f77ab5f714 100644 --- a/src/gettsim/__init__.py +++ b/src/gettsim/__init__.py @@ -65,6 +65,7 @@ ) from ttsim.main_args import MainArg from ttsim.main_args import OrigPolicyObjects as TTSimOrigPolicyObjects +from ttsim.tt import UnitSystem from gettsim import germany @@ -116,6 +117,7 @@ def main( tt_targets: TTTargets | None = None, rounding: bool = True, backend: Literal["numpy", "jax"] = "numpy", + data_currency: str | None = None, evaluation_date_str: DashedISOString | None = None, include_fail_nodes: bool = True, include_warn_nodes: bool = True, @@ -123,6 +125,7 @@ def main( policy_date: datetime.date | None = None, evaluation_date: datetime.date | None = None, orig_policy_objects: OrigPolicyObjects | None = None, + unit_system: UnitSystem | None = None, policy_environment: PolicyEnvironment | None = None, processed_data: QNameData | None = None, labels: Labels | None = None, @@ -137,6 +140,8 @@ def main( orig_policy_objects = cast( "OrigPolicyObjects", TTSimOrigPolicyObjects.root(germany.ROOT_PATH) ) + if unit_system is None: + unit_system = germany.UNIT_SYSTEM return _ttsim.main(**locals()) diff --git a/src/gettsim/germany/__init__.py b/src/gettsim/germany/__init__.py index 643332ef06..a8f3834926 100644 --- a/src/gettsim/germany/__init__.py +++ b/src/gettsim/germany/__init__.py @@ -2,9 +2,19 @@ from pathlib import Path +from ttsim.tt import UnitSystem + ROOT_PATH = Path(__file__).parent +UNIT_SYSTEM = UnitSystem( + base_currency="EUR", + other_currencies={"DM": "EUR / 1.95583"}, + statutory_currencies={"0001-01-01": "DM", "2002-01-01": "EUR"}, + grouping_levels=["hh", "ehe", "fg", "bg", "eg", "wthh", "sn"], +) + + WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC = """ You requested (at least one of) diff --git a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py index aab1e52316..20556a6022 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py +++ b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py @@ -9,10 +9,12 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def betrag_m( anspruchshöhe_m: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -27,7 +29,9 @@ def betrag_m( return anspruchshöhe_m -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def anspruchshöhe_m( ungedeckter_bedarf_m: float, ungedeckter_bedarf_m_bg: float, @@ -43,9 +47,11 @@ def anspruchshöhe_m( Reference: §9 Abs. 2 Satz 3 SGB II """ - total_income_m_bg = ( - einkommen_zur_verteilung_m_bg - + grundsicherung__im_alter__überschusseinkommen_m_eg + # Deliberate cross-level summation: the EG's Überschusseinkommen is transferred + # into the BG's income pool, so re-tag it from the EG to the BG level. + total_income_m_bg = einkommen_zur_verteilung_m_bg + cast_unit( + grundsicherung__im_alter__überschusseinkommen_m_eg, + TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) anspruch_m_bg = max(0.0, ungedeckter_bedarf_m_bg - total_income_m_bg) @@ -55,7 +61,9 @@ def anspruchshöhe_m( return (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def ungedeckter_bedarf_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -79,7 +87,9 @@ def ungedeckter_bedarf_m( return regelbedarf_m -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def einkommen_zur_verteilung_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -104,8 +114,10 @@ def einkommen_zur_verteilung_m( return anzurechnendes_einkommen_m -@policy_function(start_date="2005-01-01", end_date="2022-12-31") -def überschusseinkommen_m( +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) +def überschusseinkommen_m_bg( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, ) -> float: diff --git a/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml b/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml index 05811baf5a..fa6f0a9782 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml +++ b/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml @@ -8,8 +8,23 @@ parameter_regelsatz_anteilsbasiert: § 20 V SGB II, siehe Bekanntmachungen zu § 20. en: >- § 20 V SGB II, see regulations for § 20. - unit: null - reference_period: Month + unit: + basissatz: EUR_PER_MONTH + anteil_vom_basissatz_bei_zwei_erwachsenen: DIMENSIONLESS + anteil_vom_basissatz_bei_weiteren_erwachsenen: DIMENSIONLESS + anteil_vom_basissatz_für_kinder: + jugendliche_und_junge_erwachsene: + min_alter: YEARS + max_alter: YEARS + anteil: DIMENSIONLESS + schulkind: + min_alter: YEARS + max_alter: YEARS + anteil: DIMENSIONLESS + kleinkind: + min_alter: YEARS + max_alter: YEARS + anteil: DIMENSIONLESS type: require_converter 2005-01-01: basissatz: 338 @@ -96,14 +111,13 @@ kindersofortzuschlag: Children, adolescents and young adults who are entitled to unemployment benefits or social benefits (Regelbedarfsstufen 3, 4, 5, 6) receive an instant surcharge of 20 Euro. - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2022-07-01: value: 20 2023-01-01: note: Bürgergeld replaces Arbeitslosengeld II. -parameter_mehrbedarf_alleinerziehend: +parameter_mehrbedarfsanteil_alleinerziehend: name: de: Parameter zur Berechnung des Mehrbedarfs von Alleinerziehenden en: Parameter for calculating the additional need of single parents @@ -124,8 +138,7 @@ parameter_mehrbedarf_alleinerziehend: when the resulting claim is greater than the claim through ``kind_bis_6_oder_2_3_kinder_bis_15``. ``max`` gives the maximum share of the Regelbedarf that is considered as an additional need for single parents. - unit: Share - reference_period: Month + unit: DIMENSIONLESS type: dict 2005-01-01: basis_je_kind_bis_17: 0.12 diff --git a/src/gettsim/germany/arbeitslosengeld_2/einkommen.py b/src/gettsim/germany/arbeitslosengeld_2/einkommen.py index d6c5056573..bea12fda9f 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/einkommen.py +++ b/src/gettsim/germany/arbeitslosengeld_2/einkommen.py @@ -6,6 +6,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -14,7 +15,9 @@ from types import ModuleType -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def anzurechnendes_einkommen_m( nettoeinkommen_nach_abzug_freibetrag_m: float, unterhalt__tatsächlich_erhaltener_betrag_m: float, @@ -40,7 +43,9 @@ def anzurechnendes_einkommen_m( ) -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def nettoeinkommen_nach_abzug_freibetrag_m( nettoeinkommen_vor_abzug_freibetrag_m: float, anrechnungsfreies_einkommen_m: float, @@ -49,7 +54,9 @@ def nettoeinkommen_nach_abzug_freibetrag_m( return nettoeinkommen_vor_abzug_freibetrag_m - anrechnungsfreies_einkommen_m -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def nettoeinkommen_vor_abzug_freibetrag_m( bruttoeinkommen_m: float, einkommensteuer__betrag_m_sn: float, @@ -66,7 +73,9 @@ def nettoeinkommen_vor_abzug_freibetrag_m( ) -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def bruttoeinkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -90,7 +99,9 @@ def bruttoeinkommen_m( ) -@policy_function(start_date="2005-01-01", end_date="2005-09-30") +@policy_function( + start_date="2005-01-01", end_date="2005-09-30", unit=TTSIMUnit.DIMENSIONLESS +) def nettoquote( einnahmen__bruttolohn_m: float, einkommensteuer__betrag_m_sn: float, @@ -113,7 +124,7 @@ def nettoquote( - abzugsfähige_pauschalen["werbung"] - abzugsfähige_pauschalen["versicherung"] ), - 0, + 0.0, ) return alg2_2005_bne / einnahmen__bruttolohn_m @@ -123,6 +134,7 @@ def nettoquote( start_date="2005-01-01", end_date="2005-09-30", leaf_name="anrechnungsfreies_einkommen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anrechnungsfreies_einkommen_m_basierend_auf_nettoquote( einnahmen__bruttolohn_m: float, @@ -138,7 +150,9 @@ def anrechnungsfreies_einkommen_m_basierend_auf_nettoquote( ) -@policy_function(start_date="2005-10-01", end_date="2022-12-31") +@policy_function( + start_date="2005-10-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def anrechnungsfreies_einkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, diff --git "a/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge.yaml" "b/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge.yaml" index 56a224f7f4..f3e6cebdaa 100644 --- "a/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge.yaml" +++ "b/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge.yaml" @@ -8,8 +8,8 @@ obergrenze_vermögensgrundfreibetrag: § 12 (2) Satz 1 Nr. 1 SGB II. Ausnahmeregelung für Personen, die vor 1948 geboren wurden. en: Differs by birth year. - unit: Euros - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: EUR type: sparse_to_consecutive_int_lookup_table 2005-01-01: 1947: 33800 @@ -43,8 +43,8 @@ vermögensgrundfreibetrag_je_lebensjahr: description: de: § 12 (2) Satz 1 Nr. 1 SGB II. Gestaffelt nach Geburtsjahr en: Differs by year of birth. - unit: Euros - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: EUR_PER_YEAR type: sparse_to_consecutive_int_lookup_table 2005-01-01: 1947: 520 @@ -67,8 +67,7 @@ vermögensfreibetrag_austattung: description: de: § 12 (2) Satz 1 Nr. 4 SGB II. en: null - unit: Euros - reference_period: null + unit: EUR type: scalar 2005-01-01: value: 750 @@ -83,8 +82,7 @@ vermögensgrundfreibetrag_je_kind: description: de: § 12 (2) Satz 1 Nr. 1 SGB II. en: null - unit: Euros - reference_period: null + unit: EUR type: scalar 2005-01-01: value: 4100 @@ -105,8 +103,7 @@ abzugsfähige_pauschalen: .2016 BGBl. I S. 1858 entfallen. Wie entfallen? § 3 Alg II-V. Seit 01.01.2008 in § 6 Alg II-V. en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: dict 2005-01-01: versicherung: 30 @@ -134,8 +131,8 @@ parameter_anrechnungsfreies_einkommen_ohne_kinder_in_bg: defined by exemption in § 11 SGB II, see § 67 SGB II. Since 01.04.2011 § 11b (2) SGB II (amended by B. v. 13.05.2011 BGBl. I S. 850. Artikel 2 G. v. 24.03.2011 BGBl. I S. 453). - unit: Euros - reference_period: Month + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2005-01-01: reference: Artikel 1. G. v. 24.12.2003 BGBl. I S. 2954. @@ -204,8 +201,8 @@ parameter_anrechnungsfreies_einkommen_mit_kindern_in_bg: 24.03.2011 BGBl. I S. 453). Bezieht sich auf die Parameter in parameter_anrechnungsfreies_einkommen_ohne_kinder_in_bg. en: null - unit: Euros - reference_period: Month + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2005-10-01: reference: Artikel 1 G. v. 14.08.2005 BGBl. I S. 2407. diff --git "a/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge_verm\303\266gen.py" "b/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge_verm\303\266gen.py" index 506bc82db6..b04e8dc98e 100644 --- "a/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge_verm\303\266gen.py" +++ "b/src/gettsim/germany/arbeitslosengeld_2/freibetr\303\244ge_verm\303\266gen.py" @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function if TYPE_CHECKING: from gettsim.tt import ConsecutiveIntLookupTableParamValue @@ -12,7 +12,9 @@ # TODO(@MImmesberger): Treatment of children who live in their own BG may be wrong here. # https://github.com/ttsim-dev/gettsim/issues/1009 -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY +) def grundfreibetrag_vermögen( familie__ist_kind_in_bedarfsgemeinschaft: bool, alter: int, @@ -30,7 +32,9 @@ def grundfreibetrag_vermögen( # TODO(@MImmesberger): Treatment of children who live in their own BG may be wrong here. # https://github.com/ttsim-dev/gettsim/issues/1009 -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY +) def maximaler_grundfreibetrag_vermögen( geburtsjahr: int, familie__ist_kind_in_bedarfsgemeinschaft: bool, @@ -46,6 +50,7 @@ def maximaler_grundfreibetrag_vermögen( @policy_function( start_date="2005-01-01", end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg( grundfreibetrag_vermögen_bg: float, diff --git a/src/gettsim/germany/arbeitslosengeld_2/inputs.py b/src/gettsim/germany/arbeitslosengeld_2/inputs.py index 50b09d05de..abdcc575fa 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/inputs.py +++ b/src/gettsim/germany/arbeitslosengeld_2/inputs.py @@ -2,13 +2,14 @@ from __future__ import annotations -from gettsim.tt import FKType, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input @policy_input( start_date="2005-01-01", end_date="2022-12-31", foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, + unit=TTSIMUnit.DIMENSIONLESS, ) def p_id_einstandspartner() -> int: """Identifier of Einstandspartner.""" diff --git "a/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" "b/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" index 9e63689183..23c83a388c 100644 --- "a/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" +++ "b/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" @@ -6,7 +6,9 @@ from gettsim.tt import ( AggType, + TTSIMUnit, agg_by_p_id_function, + cast_unit, join, policy_function, ) @@ -18,7 +20,10 @@ @agg_by_p_id_function( - start_date="2005-01-01", end_date="2022-12-31", agg_type=AggType.SUM + start_date="2005-01-01", + end_date="2022-12-31", + agg_type=AggType.SUM, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeldübertrag_m( differenz_kindergeld_kindbedarf_m: float, @@ -32,6 +37,7 @@ def kindergeldübertrag_m( start_date="2005-01-01", end_date="2022-12-31", leaf_name="kindergeld_pro_kind_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def _mean_kindergeld_per_child_gestaffelt_m( kindergeld__betrag_m: float, @@ -54,6 +60,7 @@ def _mean_kindergeld_per_child_gestaffelt_m( start_date="2005-01-01", end_date="2022-12-31", vectorization_strategy="not_required", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeld_zur_bedarfsdeckung_m( kindergeld_pro_kind_m: FloatColumn, @@ -80,7 +87,9 @@ def kindergeld_zur_bedarfsdeckung_m( ) -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def differenz_kindergeld_kindbedarf_m( regelbedarf_m_bg: float, nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -101,7 +110,7 @@ def differenz_kindergeld_kindbedarf_m( to the parental level. """ fehlbetrag = max( - regelbedarf_m_bg + cast_unit(regelbedarf_m_bg, TTSIMUnit.CURRENCY.PER_MONTH) - wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh - nettoeinkommen_nach_abzug_freibetrag_m - unterhalt__tatsächlich_erhaltener_betrag_m @@ -124,6 +133,7 @@ def differenz_kindergeld_kindbedarf_m( start_date="2005-01-01", end_date="2022-12-31", vectorization_strategy="not_required", + unit=TTSIMUnit.DIMENSIONLESS, ) def in_anderer_bg_als_kindergeldempfänger( p_id: IntColumn, diff --git a/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml b/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml index 691b47f123..9cc8383d7d 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml +++ b/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml @@ -18,10 +18,9 @@ mietobergrenze_pro_qm: rule of thumb used by the employment agencies. This is only an approximation. The regional parameters are unknown, see Issue https://github.com/ttsim-dev/gettsim/issues/782. - unit: Euros / Square Meter - reference_period: Month + unit: EUR_PER_SQUARE_METER_PER_MONTH type: scalar - 1984-01-01: + 2005-01-01: value: 10 2023-01-01: note: Bürgergeld replaces Arbeitslosengeld II. @@ -40,8 +39,9 @@ berechtigte_wohnfläche_miete: additional person). This is only an approximation. The regional parameters are unknown, see Issue https://github.com/ttsim-dev/gettsim/issues/782. - unit: Square Meters - reference_period: null + unit: + single: SQUARE_METER_PER_HH + je_weitere_person: SQUARE_METER type: dict 2005-01-01: single: 45 @@ -59,8 +59,13 @@ parameter_berechtigte_wohnfläche_eigentum: en: >- After 2023, this upper limit only applies to owner-occupied homes. Condominiums may only be up to 130 square meters in size. - unit: Square Meters - reference_period: null + unit: + 1: SQUARE_METER + 2: SQUARE_METER + 3: SQUARE_METER + 4: SQUARE_METER + je_weitere_person: SQUARE_METER + max_anzahl_direkt: PERSON_COUNT type: require_converter 1984-01-01: 1: 80 diff --git a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py index 456eb21eab..dcf9517479 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py +++ b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py @@ -3,10 +3,13 @@ from __future__ import annotations from dataclasses import dataclass -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Annotated from gettsim.tt import ( + UNSET_UNIT, ConsecutiveIntLookupTableParamValue, + TTSIMUnit, + cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -19,7 +22,9 @@ from gettsim.typing import RawParamValue -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def regelbedarf_m( regelsatz_m: float, kosten_der_unterkunft_m: float, @@ -31,13 +36,15 @@ def regelbedarf_m( return regelsatz_m + kosten_der_unterkunft_m -@policy_function(start_date="2005-01-01", end_date="2022-12-31") -def mehrbedarf_alleinerziehend_m( +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS +) +def r( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, familie__anzahl_kinder_bis_6_fg: int, familie__anzahl_kinder_bis_15_fg: int, - parameter_mehrbedarf_alleinerziehend: dict[str, float], + parameter_mehrbedarfsanteil_alleinerziehend: dict[str, float], ) -> float: """Mehrbedarf (additional need) for single parents as a share of the Regelsatz. @@ -47,10 +54,11 @@ def mehrbedarf_alleinerziehend_m( Reference: §21 SGB II """ - basis_mehrbedarf = ( - parameter_mehrbedarf_alleinerziehend["basis_je_kind_bis_17"] - * familie__anzahl_kinder_bis_17_fg - ) + # A dimensionless share: the per-child share times the child count. The count + # is a leveled `[person]/[fg]`, so cast it to a plain dimensionless multiplier. + basis_mehrbedarf = parameter_mehrbedarfsanteil_alleinerziehend[ + "basis_je_kind_bis_17" + ] * cast_unit(familie__anzahl_kinder_bis_17_fg, TTSIMUnit.DIMENSIONLESS) if ( familie__anzahl_kinder_bis_6_fg == 1 @@ -58,14 +66,16 @@ def mehrbedarf_alleinerziehend_m( or familie__anzahl_kinder_bis_15_fg == 3 # noqa: PLR2004 ): mehrbedarf = max( - parameter_mehrbedarf_alleinerziehend["kind_bis_6_oder_2_3_kinder_bis_15"], + parameter_mehrbedarfsanteil_alleinerziehend[ + "kind_bis_6_oder_2_3_kinder_bis_15" + ], basis_mehrbedarf, ) else: mehrbedarf = basis_mehrbedarf if familie__alleinerziehend: - return min(mehrbedarf, parameter_mehrbedarf_alleinerziehend["max"]) + return min(mehrbedarf, parameter_mehrbedarfsanteil_alleinerziehend["max"]) else: return 0.0 @@ -74,6 +84,7 @@ def mehrbedarf_alleinerziehend_m( start_date="2005-01-01", end_date="2010-12-31", leaf_name="kindersatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_anteilsbasiert( alter: int, @@ -116,6 +127,7 @@ def kindersatz_m_anteilsbasiert( start_date="2011-01-01", end_date="2022-06-30", leaf_name="kindersatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_ohne_sofortzuschlag( alter: int, @@ -156,6 +168,7 @@ def kindersatz_m_nach_regelbedarfsstufen_ohne_sofortzuschlag( start_date="2022-07-01", end_date="2022-12-31", leaf_name="kindersatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( alter: int, @@ -194,9 +207,10 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( start_date="2005-01-01", end_date="2010-12-31", leaf_name="erwachsenensatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_bis_2010( - mehrbedarf_alleinerziehend_m: float, + mehrbedarfsanteil_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, regelsatz_anteilsbasiert: RegelsatzAnteilsbasiert, @@ -213,16 +227,17 @@ def erwachsenensatz_m_bis_2010( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend_m) + return out * (1 + mehrbedarfsanteil_alleinerziehend) @policy_function( start_date="2011-01-01", end_date="2022-12-31", leaf_name="erwachsenensatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( - mehrbedarf_alleinerziehend_m: float, + mehrbedarfsanteil_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, @@ -237,10 +252,12 @@ def erwachsenensatz_m_ab_2011( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend_m) + return out * (1 + mehrbedarfsanteil_alleinerziehend) -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def regelsatz_m( erwachsenensatz_m: float, kindersatz_m: float, @@ -253,6 +270,7 @@ def regelsatz_m( start_date="2005-01-01", end_date="2022-12-31", leaf_name="kosten_der_unterkunft_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_bis_2022( berechtigte_wohnfläche: float, @@ -262,7 +280,11 @@ def kosten_der_unterkunft_m_bis_2022( return berechtigte_wohnfläche * anerkannte_warmmiete_je_qm_m -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", + end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_SQUARE_METER.PER_MONTH, +) def anerkannte_warmmiete_je_qm_m( bruttokaltmiete_m: float, heizkosten_m: float, @@ -274,7 +296,11 @@ def anerkannte_warmmiete_je_qm_m( return min(out, mietobergrenze_pro_qm) -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", + end_date="2022-12-31", + unit=TTSIMUnit.SQUARE_METER, +) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, @@ -288,13 +314,15 @@ def berechtigte_wohnfläche( else: maximum = ( berechtigte_wohnfläche_miete["single"] - + max(anzahl_personen_hh - 1, 0) + + max(anzahl_personen_hh - cast_unit(1, TTSIMUnit.PERSON_COUNT.PER_HH), 0) * berechtigte_wohnfläche_miete["je_weitere_person"] ) return min(wohnfläche, maximum / anzahl_personen_hh) -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def bruttokaltmiete_m( wohnen__bruttokaltmiete_m_hh: float, anzahl_personen_hh: int, @@ -308,7 +336,9 @@ def bruttokaltmiete_m( return wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def heizkosten_m( wohnen__heizkosten_m_hh: float, anzahl_personen_hh: int, @@ -322,7 +352,9 @@ def heizkosten_m( return wohnen__heizkosten_m_hh / anzahl_personen_hh -@policy_function(start_date="2005-01-01", end_date="2022-12-31") +@policy_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.SQUARE_METER +) def wohnfläche( wohnen__wohnfläche_hh: float, anzahl_personen_hh: int, @@ -333,15 +365,15 @@ def wohnfläche( @dataclass(frozen=True) class RegelsatzAnteilErwachsen: - je_erwachsener_bei_zwei_erwachsenen: float - je_erwachsener_ab_drei_erwachsene: float + je_erwachsener_bei_zwei_erwachsenen: Annotated[float, TTSIMUnit.DIMENSIONLESS] + je_erwachsener_ab_drei_erwachsene: Annotated[float, TTSIMUnit.DIMENSIONLESS] @dataclass(frozen=True) class RegelsatzAnteilKind: - anteil: float - min_alter: int - max_alter: int + anteil: Annotated[float, TTSIMUnit.DIMENSIONLESS] + min_alter: Annotated[int, TTSIMUnit.YEARS] + max_alter: Annotated[int, TTSIMUnit.YEARS] @dataclass(frozen=True) @@ -353,12 +385,12 @@ class RegelsatzAnteilKindNachAlter: @dataclass(frozen=True) class RegelsatzAnteilsbasiert: - basissatz: float + basissatz: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] erwachsen: RegelsatzAnteilErwachsen kind: RegelsatzAnteilKindNachAlter -@param_function(start_date="2005-01-01", end_date="2010-12-31") +@param_function(start_date="2005-01-01", end_date="2010-12-31", unit=UNSET_UNIT) def regelsatz_anteilsbasiert( parameter_regelsatz_anteilsbasiert: RawParamValue, ) -> RegelsatzAnteilsbasiert: @@ -400,7 +432,11 @@ def regelsatz_anteilsbasiert( ) -@param_function(start_date="2005-01-01", end_date="2022-12-31") +@param_function( + start_date="2005-01-01", + end_date="2022-12-31", + unit=TTSIMUnit.SQUARE_METER.PER_HH, +) def berechtigte_wohnfläche_eigentum( parameter_berechtigte_wohnfläche_eigentum: RawParamValue, wohngeld__max_anzahl_personen: dict[str, int], diff --git "a/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" "b/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" index 35b93197b7..13fd30d230 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" +++ "b/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" @@ -14,8 +14,7 @@ kindersofortzuschlag: Children, adolescents and young adults who are entitled to unemployment benefits or social benefits (Regelbedarfsstufen 3, 4, 5, 6) receive an instant surcharge of 20 Euro. - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2023-01-01: value: 20 @@ -25,7 +24,7 @@ kindersofortzuschlag: Gesetz zur Fortentwicklung des Steuerrechts und zur Anpassung des Einkommen- steuertarifs (Steuerfortentwicklungsgesetz - SteFeG) reference: Art. 7 G. v. 30.12.2024 BGBl. 2024 Nr. 449. -parameter_mehrbedarf_alleinerziehend: +parameter_mehrbedarfsanteil_alleinerziehend: name: de: Parameter zur Berechnung des Mehrbedarfs von Alleinerziehenden en: Parameter for calculating the additional need of single parents @@ -46,8 +45,7 @@ parameter_mehrbedarf_alleinerziehend: when the resulting claim is greater than the claim through ``kind_bis_6_oder_2_3_kinder_bis_15``. ``max`` gives the maximum share of the Regelbedarf that is considered as an additional need for single parents. - unit: Share - reference_period: Month + unit: DIMENSIONLESS type: dict 2023-01-01: basis_je_kind_bis_17: 0.12 diff --git "a/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" "b/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" index dd28146c70..439d6ec0ba 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" @@ -9,10 +9,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_m( anspruchshöhe_m: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -27,7 +27,7 @@ def betrag_m( return anspruchshöhe_m -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anspruchshöhe_m( ungedeckter_bedarf_m: float, ungedeckter_bedarf_m_bg: float, @@ -43,9 +43,11 @@ def anspruchshöhe_m( Reference: §9 Abs. 2 Satz 3 SGB II """ - total_income_m_bg = ( - einkommen_zur_verteilung_m_bg - + grundsicherung__im_alter__überschusseinkommen_m_eg + # Deliberate cross-level summation: the EG's Überschusseinkommen is transferred + # into the BG's income pool, so re-tag it from the EG to the BG level. + total_income_m_bg = einkommen_zur_verteilung_m_bg + cast_unit( + grundsicherung__im_alter__überschusseinkommen_m_eg, + TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) anspruch_m_bg = max(0.0, ungedeckter_bedarf_m_bg - total_income_m_bg) @@ -55,7 +57,7 @@ def anspruchshöhe_m( return (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def ungedeckter_bedarf_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -79,7 +81,7 @@ def ungedeckter_bedarf_m( return regelbedarf_m -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_zur_verteilung_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -104,8 +106,8 @@ def einkommen_zur_verteilung_m( return anzurechnendes_einkommen_m -@policy_function(start_date="2023-01-01") -def überschusseinkommen_m( +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) +def überschusseinkommen_m_bg( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, ) -> float: diff --git "a/src/gettsim/germany/b\303\274rgergeld/einkommen.py" "b/src/gettsim/germany/b\303\274rgergeld/einkommen.py" index 2f3597008e..ba91cea672 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/einkommen.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/einkommen.py" @@ -6,6 +6,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -14,7 +15,7 @@ from types import ModuleType -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anzurechnendes_einkommen_m( nettoeinkommen_nach_abzug_freibetrag_m: float, unterhalt__tatsächlich_erhaltener_betrag_m: float, @@ -40,7 +41,7 @@ def anzurechnendes_einkommen_m( ) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def nettoeinkommen_nach_abzug_freibetrag_m( nettoeinkommen_vor_abzug_freibetrag_m: float, anrechnungsfreies_einkommen_m: float, @@ -49,7 +50,7 @@ def nettoeinkommen_nach_abzug_freibetrag_m( return nettoeinkommen_vor_abzug_freibetrag_m - anrechnungsfreies_einkommen_m -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def nettoeinkommen_vor_abzug_freibetrag_m( bruttoeinkommen_m: float, einkommensteuer__betrag_m_sn: float, @@ -66,7 +67,7 @@ def nettoeinkommen_vor_abzug_freibetrag_m( ) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttoeinkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -90,7 +91,7 @@ def bruttoeinkommen_m( ) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anrechnungsfreies_einkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, diff --git "a/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge.yaml" "b/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge.yaml" index 78901f37cf..0055df7255 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge.yaml" +++ "b/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge.yaml" @@ -10,8 +10,7 @@ vermögensfreibetrag_je_person_nach_karenzzeit: en: >- Wealth exemption per member of the Bedarfsgemeinschaft, which changes after the end of the Karenzzeit. - unit: Euros - reference_period: null + unit: EUR type: dict 2023-01-01: während_karenzzeit: 40000 @@ -37,8 +36,8 @@ parameter_anrechnungsfreies_einkommen_ohne_kinder_in_bg: defined by exemption in § 11 SGB II, see § 67 SGB II. Since 01.04.2011 § 11b (2) SGB II (amended by B. v. 13.05.2011 BGBl. I S. 850. Artikel 2 G. v. 24.03.2011 BGBl. I S. 453). - unit: Euros - reference_period: Month + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2023-01-01: reference: Artikel 1 G. v. 20.12.2011 BGBl. I 2854. @@ -94,8 +93,8 @@ parameter_anrechnungsfreies_einkommen_mit_kindern_in_bg: 24.03.2011 BGBl. I S. 453). Bezieht sich auf die Parameter in parameter_anrechnungsfreies_einkommen_ohne_kinder_in_bg. en: null - unit: Euros - reference_period: Month + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2023-01-01: reference: Artikel 1 G. v. 14.08.2005 BGBl. I S. 2407. diff --git "a/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge_verm\303\266gen.py" "b/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge_verm\303\266gen.py" index 3638d36e04..85f47d7f66 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge_verm\303\266gen.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge_verm\303\266gen.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_BG) def vermögensfreibetrag_in_karenzzeit_bg( familie__anzahl_personen_bg: int, vermögensfreibetrag_je_person_nach_karenzzeit: dict[str, float], @@ -21,7 +21,11 @@ def vermögensfreibetrag_in_karenzzeit_bg( ) -@policy_function(start_date="2023-01-01", leaf_name="vermögensfreibetrag_bg") +@policy_function( + start_date="2023-01-01", + leaf_name="vermögensfreibetrag_bg", + unit=TTSIMUnit.CURRENCY.PER_BG, +) def vermögensfreibetrag_bg_ab_2023( familie__anzahl_personen_bg: int, vermögensfreibetrag_in_karenzzeit_bg: float, diff --git "a/src/gettsim/germany/b\303\274rgergeld/inputs.py" "b/src/gettsim/germany/b\303\274rgergeld/inputs.py" index 6059213ae4..a6ddb46496 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/inputs.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/inputs.py" @@ -2,14 +2,18 @@ from __future__ import annotations -from gettsim.tt import FKType, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input -@policy_input(start_date="2023-01-01") +@policy_input(start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS) def bezug_im_vorjahr() -> bool: """Person received Bürgergeld in the last 12 months.""" -@policy_input(start_date="2023-01-01", foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF) +@policy_input( + start_date="2023-01-01", + foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, + unit=TTSIMUnit.DIMENSIONLESS, +) def p_id_einstandspartner() -> int: """Identifier of Einstandspartner.""" diff --git "a/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" "b/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" index 8c51ec6d96..2cbffbf151 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" @@ -6,7 +6,9 @@ from gettsim.tt import ( AggType, + TTSIMUnit, agg_by_p_id_function, + cast_unit, join, policy_function, ) @@ -17,7 +19,9 @@ from gettsim.typing import BoolColumn, FloatColumn, IntColumn -@agg_by_p_id_function(start_date="2023-01-01", agg_type=AggType.SUM) +@agg_by_p_id_function( + start_date="2023-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.CURRENCY.PER_MONTH +) def kindergeldübertrag_m( differenz_kindergeld_kindbedarf_m: float, kindergeld__p_id_empfänger: int, @@ -29,6 +33,7 @@ def kindergeldübertrag_m( @policy_function( start_date="2023-01-01", leaf_name="kindergeld_pro_kind_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def _mean_kindergeld_per_child_ohne_staffelung_m( kindergeld__anzahl_ansprüche: int, @@ -43,7 +48,11 @@ def _mean_kindergeld_per_child_ohne_staffelung_m( return kindergeld__satz if kindergeld__anzahl_ansprüche > 0 else 0.0 -@policy_function(start_date="2023-01-01", vectorization_strategy="not_required") +@policy_function( + start_date="2023-01-01", + vectorization_strategy="not_required", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def kindergeld_zur_bedarfsdeckung_m( kindergeld_pro_kind_m: FloatColumn, kindergeld__p_id_empfänger: IntColumn, @@ -69,7 +78,7 @@ def kindergeld_zur_bedarfsdeckung_m( ) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def differenz_kindergeld_kindbedarf_m( regelbedarf_m_bg: float, nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -90,7 +99,7 @@ def differenz_kindergeld_kindbedarf_m( to the parental level. """ fehlbetrag = max( - regelbedarf_m_bg + cast_unit(regelbedarf_m_bg, TTSIMUnit.CURRENCY.PER_MONTH) - wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh - nettoeinkommen_nach_abzug_freibetrag_m - unterhalt__tatsächlich_erhaltener_betrag_m @@ -109,7 +118,11 @@ def differenz_kindergeld_kindbedarf_m( return out -@policy_function(start_date="2023-01-01", vectorization_strategy="not_required") +@policy_function( + start_date="2023-01-01", + vectorization_strategy="not_required", + unit=TTSIMUnit.DIMENSIONLESS, +) def in_anderer_bg_als_kindergeldempfänger( p_id: IntColumn, kindergeld__p_id_empfänger: IntColumn, diff --git "a/src/gettsim/germany/b\303\274rgergeld/kosten_der_unterkunft.yaml" "b/src/gettsim/germany/b\303\274rgergeld/kosten_der_unterkunft.yaml" index 8f0e042bae..3ed0848573 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/kosten_der_unterkunft.yaml" +++ "b/src/gettsim/germany/b\303\274rgergeld/kosten_der_unterkunft.yaml" @@ -18,8 +18,7 @@ mietobergrenze_pro_qm: rule of thumb used by the employment agencies. This is only an approximation. The regional parameters are unknown, see Issue https://github.com/ttsim-dev/gettsim/issues/782. - unit: Euros / Square Meter - reference_period: Month + unit: EUR_PER_SQUARE_METER_PER_MONTH type: scalar 2023-01-01: value: 10 @@ -38,8 +37,7 @@ berechtigte_wohnfläche_miete: additional person). This is only an approximation. The regional parameters are unknown, see Issue https://github.com/ttsim-dev/gettsim/issues/782. - unit: Square Meters - reference_period: null + unit: SQUARE_METER type: dict 2023-01-01: single: 45 @@ -55,8 +53,13 @@ parameter_berechtigte_wohnfläche_eigentum: en: >- After 2023, this upper limit only applies to owner-occupied homes. Condominiums may only be up to 130 square meters in size. - unit: Square Meters - reference_period: null + unit: + 1: SQUARE_METER + 2: SQUARE_METER + 3: SQUARE_METER + 4: SQUARE_METER + je_weitere_person: SQUARE_METER + max_anzahl_direkt: PERSON_COUNT type: require_converter 2023-01-01: reference: Art. 1 Nr.12 Abschnitt 5, G. v. 20.12.2022 BGBl. I S. 2328 diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index cebb113a3c..24d233441e 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -6,7 +6,10 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, ConsecutiveIntLookupTableParamValue, + TTSIMUnit, + cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -19,7 +22,7 @@ from gettsim.typing import RawParamValue -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def regelbedarf_m( regelsatz_m: float, kosten_der_unterkunft_m: float, @@ -31,13 +34,13 @@ def regelbedarf_m( return regelsatz_m + kosten_der_unterkunft_m -@policy_function(start_date="2023-01-01") -def mehrbedarf_alleinerziehend_m( +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS) +def mehrbedarfsanteil_alleinerziehend( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, familie__anzahl_kinder_bis_6_fg: int, familie__anzahl_kinder_bis_15_fg: int, - parameter_mehrbedarf_alleinerziehend: dict[str, float], + parameter_mehrbedarfsanteil_alleinerziehend: dict[str, float], ) -> float: """Mehrbedarf (additional need) for single parents as a share of the Regelsatz. @@ -47,10 +50,9 @@ def mehrbedarf_alleinerziehend_m( Reference: §21 SGB II """ - basis_mehrbedarf = ( - parameter_mehrbedarf_alleinerziehend["basis_je_kind_bis_17"] - * familie__anzahl_kinder_bis_17_fg - ) + basis_mehrbedarf = parameter_mehrbedarfsanteil_alleinerziehend[ + "basis_je_kind_bis_17" + ] * cast_unit(familie__anzahl_kinder_bis_17_fg, TTSIMUnit.DIMENSIONLESS) if ( familie__anzahl_kinder_bis_6_fg == 1 @@ -58,14 +60,16 @@ def mehrbedarf_alleinerziehend_m( or familie__anzahl_kinder_bis_15_fg == 3 # noqa: PLR2004 ): mehrbedarf = max( - parameter_mehrbedarf_alleinerziehend["kind_bis_6_oder_2_3_kinder_bis_15"], + parameter_mehrbedarfsanteil_alleinerziehend[ + "kind_bis_6_oder_2_3_kinder_bis_15" + ], basis_mehrbedarf, ) else: mehrbedarf = basis_mehrbedarf if familie__alleinerziehend: - return min(mehrbedarf, parameter_mehrbedarf_alleinerziehend["max"]) + return min(mehrbedarf, parameter_mehrbedarfsanteil_alleinerziehend["max"]) else: return 0.0 @@ -73,6 +77,7 @@ def mehrbedarf_alleinerziehend_m( @policy_function( start_date="2023-01-01", leaf_name="kindersatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( alter: int, @@ -110,9 +115,10 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( @policy_function( start_date="2023-01-01", leaf_name="erwachsenensatz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( - mehrbedarf_alleinerziehend_m: float, + mehrbedarfsanteil_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, @@ -127,10 +133,10 @@ def erwachsenensatz_m_ab_2011( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend_m) + return out * (1 + mehrbedarfsanteil_alleinerziehend) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def regelsatz_m( erwachsenensatz_m: float, kindersatz_m: float, @@ -142,6 +148,7 @@ def regelsatz_m( @policy_function( start_date="2023-01-01", leaf_name="kosten_der_unterkunft_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_ab_2023( bruttokaltmiete_m: float, @@ -164,7 +171,9 @@ def kosten_der_unterkunft_m_ab_2023( return out -@policy_function(start_date="2023-01-01") +@policy_function( + start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_SQUARE_METER.PER_MONTH +) def anerkannte_warmmiete_je_qm_m( bruttokaltmiete_m: float, heizkosten_m: float, @@ -176,7 +185,7 @@ def anerkannte_warmmiete_je_qm_m( return min(out, mietobergrenze_pro_qm) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.SQUARE_METER) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, @@ -196,7 +205,7 @@ def berechtigte_wohnfläche( return min(wohnfläche, maximum / anzahl_personen_hh) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttokaltmiete_m( wohnen__bruttokaltmiete_m_hh: float, anzahl_personen_hh: int, @@ -210,7 +219,7 @@ def bruttokaltmiete_m( return wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def heizkosten_m( wohnen__heizkosten_m_hh: float, anzahl_personen_hh: int, @@ -224,7 +233,7 @@ def heizkosten_m( return wohnen__heizkosten_m_hh / anzahl_personen_hh -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.SQUARE_METER) def wohnfläche( wohnen__wohnfläche_hh: float, anzahl_personen_hh: int, @@ -260,7 +269,7 @@ class RegelsatzAnteilsbasiert: kind: RegelsatzAnteilKindNachAlter -@param_function(start_date="2023-01-01") +@param_function(start_date="2023-01-01", unit=UNSET_UNIT) def berechtigte_wohnfläche_eigentum( parameter_berechtigte_wohnfläche_eigentum: RawParamValue, wohngeld__max_anzahl_personen: dict[str, int], diff --git a/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py b/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py index 915fe05d0e..859deb79dc 100644 --- a/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py +++ b/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(start_date="2009-01-01") +@policy_function(start_date="2009-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN) def betrag_y_sn( einkommensteuer__einkünfte__aus_kapitalvermögen__betrag_y_sn: float, satz: float ) -> float: diff --git a/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.yaml b/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.yaml index f9e7642e44..bd9c2c5105 100644 --- a/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.yaml +++ b/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.yaml @@ -6,8 +6,7 @@ satz: description: de: §32d (1) EStG en: §32d (1) EStG - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2009-01-01: value: 0.25 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" index ccdb178c4b..4e9db84a0a 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" @@ -2,31 +2,39 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2014-12-31", leaf_name="alleinerziehend_betrag_y") +@policy_function( + end_date="2014-12-31", + leaf_name="alleinerziehend_betrag_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def alleinerziehend_betrag_y_pauschal( familie__alleinerziehend_sn: bool, - alleinerziehendenfreibetrag_basis: float, + alleinerziehendenfreibetrag_basis_y: float, ) -> float: """Calculate tax deduction allowance for single parents until 2014""" - return alleinerziehendenfreibetrag_basis if familie__alleinerziehend_sn else 0.0 + return alleinerziehendenfreibetrag_basis_y if familie__alleinerziehend_sn else 0.0 -@policy_function(start_date="2015-01-01", leaf_name="alleinerziehend_betrag_y") +@policy_function( + start_date="2015-01-01", + leaf_name="alleinerziehend_betrag_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def alleinerziehend_betrag_y_nach_kinderzahl( familie__alleinerziehend_sn: bool, kindergeld__anzahl_ansprüche_sn: int, - alleinerziehendenfreibetrag_basis: float, - alleinerziehendenfreibetrag_zusatz_pro_kind: float, + alleinerziehendenfreibetrag_basis_y: float, + alleinerziehendenfreibetrag_zusatz_pro_kind_y: float, ) -> float: """Calculate tax deduction allowance for single parents since 2015.""" if familie__alleinerziehend_sn: out = ( - alleinerziehendenfreibetrag_basis + alleinerziehendenfreibetrag_basis_y + (kindergeld__anzahl_ansprüche_sn - 1) - * alleinerziehendenfreibetrag_zusatz_pro_kind + * alleinerziehendenfreibetrag_zusatz_pro_kind_y ) else: out = 0.0 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" index 6abc4ef490..4822096a30 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" @@ -1,23 +1,26 @@ --- -alleinerziehendenfreibetrag_basis: +alleinerziehendenfreibetrag_basis_y: name: de: Parmeter zur Berechnung ds Entlastungsbetrags für Alleinerziehende en: Income Tax Allowance for Single Parents description: de: § 24b (1) EStG. vor 2004 "Haushaltsfreibetrag", § 32 (7) EStG en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 1984-01-01: - value: 2154 + unit: DM_PER_YEAR + value: 4212 + reference: >- + § 32 Abs. 3 EStG i. d. F. der Bekanntmachung v. 06.12.1981 BGBl. I S. 1249. 1986-01-01: - value: 2319 + value: 4536 + reference: Art. 1 G. v. 26.06.1985 BGBl. I S. 1153. 1989-01-01: - value: 2871 - 2001-01-01: - value: 2916 + value: 5616 + reference: Art. 1 G. v. 25.07.1988 BGBl. I S. 1093 (Steuerreformgesetz 1990). 2002-01-01: + unit: EUR_PER_YEAR value: 2340 2004-01-01: value: 1308 @@ -30,7 +33,7 @@ alleinerziehendenfreibetrag_basis: 2023-01-01: value: 4260 reference: G. v. 20.12.2022 BGBl. I S. 2294. -alleinerziehendenfreibetrag_zusatz_pro_kind: +alleinerziehendenfreibetrag_zusatz_pro_kind_y: name: de: Zusätzlicher Entlastungsbetrag für Alleinerziehende en: Additional income tax allowance for Single Parents @@ -39,8 +42,7 @@ alleinerziehendenfreibetrag_zusatz_pro_kind: §24b (2) S. 2 EStG. Alleinerziehenden-Entlastungsbetrag, Zusatzbetrag pro Kind ab dem 2. Kind. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2015-01-01: value: 240 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" index 7c16db5058..40ed2b1039 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, + TTSIMUnit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -16,7 +18,11 @@ from gettsim.tt import ConsecutiveIntLookupTableParamValue -@policy_function(end_date="2004-12-31", leaf_name="altersfreibetrag_y") +@policy_function( + end_date="2004-12-31", + leaf_name="altersfreibetrag_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def altersfreibetrag_y_bis_2004( alter: int, einnahmen__bruttolohn_y: float, @@ -24,7 +30,7 @@ def altersfreibetrag_y_bis_2004( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_y: float, einkommensteuer__einkünfte__aus_vermietung_und_verpachtung__betrag_y: float, altersentlastungsbetrag_altersgrenze: int, - maximaler_altersentlastungsbetrag: float, + maximaler_altersentlastungsbetrag_y: float, altersentlastungsquote: float, ) -> float: """Calculate tax deduction allowance for elderly until 2004.""" @@ -38,7 +44,7 @@ def altersfreibetrag_y_bis_2004( if alter > altersgrenze: out = min( altersentlastungsquote * (einnahmen__bruttolohn_y + weiteres_einkommen), - maximaler_altersentlastungsbetrag, + maximaler_altersentlastungsbetrag_y, ) else: out = 0.0 @@ -46,7 +52,11 @@ def altersfreibetrag_y_bis_2004( return out -@policy_function(start_date="2005-01-01", leaf_name="altersfreibetrag_y") +@policy_function( + start_date="2005-01-01", + leaf_name="altersfreibetrag_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def altersfreibetrag_y_ab_2005( alter: int, geburtsjahr: int, @@ -56,12 +66,12 @@ def altersfreibetrag_y_ab_2005( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_y: float, einkommensteuer__einkünfte__aus_vermietung_und_verpachtung__betrag_y: float, altersentlastungsbetrag_altersgrenze: int, - maximaler_altersentlastungsbetrag_gestaffelt_nach_geburtsjahr: ConsecutiveIntLookupTableParamValue, + maximaler_altersentlastungsbetrag_y_gestaffelt_nach_geburtsjahr: ConsecutiveIntLookupTableParamValue, altersentlastungsquote_gestaffelt_nach_geburtsjahr: ConsecutiveIntLookupTableParamValue, ) -> float: """Calculate tax deduction allowance for elderly since 2005.""" - maximaler_altersentlastungsbetrag = ( - maximaler_altersentlastungsbetrag_gestaffelt_nach_geburtsjahr.look_up( + maximaler_altersentlastungsbetrag_y = ( + maximaler_altersentlastungsbetrag_y_gestaffelt_nach_geburtsjahr.look_up( geburtsjahr ) ) @@ -80,14 +90,14 @@ def altersfreibetrag_y_ab_2005( ) if alter > altersentlastungsbetrag_altersgrenze: - out = min(betrag, maximaler_altersentlastungsbetrag) + out = min(betrag, maximaler_altersentlastungsbetrag_y) else: out = 0.0 return out -@param_function(start_date="2005-01-01") +@param_function(start_date="2005-01-01", unit=UNSET_UNIT) def altersentlastungsquote_gestaffelt_nach_geburtsjahr( raw_altersentlastungsquote_gestaffelt: dict[str | int, int | float], altersentlastungsbetrag_altersgrenze: int, @@ -112,14 +122,14 @@ def altersentlastungsquote_gestaffelt_nach_geburtsjahr( ) -@param_function(start_date="2005-01-01") -def maximaler_altersentlastungsbetrag_gestaffelt_nach_geburtsjahr( - raw_maximaler_altersentlastungsbetrag_gestaffelt: dict[str | int, int | float], +@param_function(start_date="2005-01-01", unit=UNSET_UNIT) +def maximaler_altersentlastungsbetrag_y_gestaffelt_nach_geburtsjahr( + raw_maximaler_altersentlastungsbetrag_y_gestaffelt: dict[str | int, int | float], altersentlastungsbetrag_altersgrenze: int, xnp: ModuleType, ) -> ConsecutiveIntLookupTableParamValue: """Convert the raw parameters for the age-based tax deduction allowance to a dict.""" - spec = raw_maximaler_altersentlastungsbetrag_gestaffelt.copy() + spec = raw_maximaler_altersentlastungsbetrag_y_gestaffelt.copy() first_calendar_year_to_consider: int = int( spec.pop("first_calendar_year_to_consider") ) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" index a5caaf0b77..721dfea3a4 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" @@ -13,12 +13,11 @@ altersentlastungsbetrag_altersgrenze: § 24a Art. 3 EStG The old-age relief amount is granted to a taxpayer who, before the start of the calendar year in which he received his income, had reached the age of 64. - unit: Years - reference_period: null + unit: YEARS type: scalar 1984-01-01: value: 64 -maximaler_altersentlastungsbetrag: +maximaler_altersentlastungsbetrag_y: name: de: Höchstbetrag des Altersentlastungsbetrags en: Maximum Amount of Tax Credit for older employees. @@ -29,26 +28,28 @@ maximaler_altersentlastungsbetrag: en: >- If someone receives employment income above the age of 64, a share up to this amount is deducted. - unit: Euros - reference_period: Year type: require_converter 1984-01-01: - value: 1534 + unit: DM_PER_YEAR + value: 3000 + reference: § 24a EStG i. d. F. der Bekanntmachung v. 27.02.1987 BGBl. I S. 657. 1989-01-01: - value: 1902 + value: 3720 + reference: Art. 1 Nr. 23 G. v. 25.07.1988 BGBl. I S. 1093 (Steuerreformgesetz 1990). 2002-01-01: + unit: EUR_PER_YEAR value: 1908 2005-01-01: - note: Ausschleichung per `raw_maximaler_altersentlastungsbetrag_gestaffelt` -raw_maximaler_altersentlastungsbetrag_gestaffelt: + note: Ausschleichung per `raw_maximaler_altersentlastungsbetrag_y_gestaffelt` +raw_maximaler_altersentlastungsbetrag_y_gestaffelt: name: de: Höchstbetrag des Altersentlastungsbetrags en: Maximum Amount of Tax Credit for older employees. description: de: 24a EStG S. 5. Tabelle legt die Werte bis 2040 fest. en: null - unit: Euros - reference_period: Year + input_unit: CALENDAR_YEAR + output_unit: EUR_PER_YEAR type: require_converter 2005-01-01: reference: Artikel 1 G. v. 05.07.2004 BGBl. I S. 1427. @@ -161,8 +162,7 @@ altersentlastungsquote: en: >- If someone receives employment income above the age of 64, this share of income is deducted. Since 2005, this share additionally depends on the birth year. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: require_converter 1984-01-01: value: 0.4 @@ -181,8 +181,8 @@ raw_altersentlastungsquote_gestaffelt: en: >- If someone receives employment income above the age of 64, this share of income is deducted. Since 2005, this share additionally depends on the birth year. - unit: Share - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: DIMENSIONLESS type: require_converter 2005-01-01: reference: Artikel 1 G. v. 05.07.2004 BGBl. I S. 1427. diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" index 9ddbd04aa2..19ec9e83ab 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" @@ -6,6 +6,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -14,7 +15,7 @@ from types import ModuleType -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def pauschbetrag_behinderung_y( behinderungsgrad: int, parameter_behindertenpauschbetrag: PiecewisePolynomialParamValue, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" index fff80a5965..ce7de6b59f 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" @@ -6,33 +6,34 @@ parameter_behindertenpauschbetrag: description: de: § 33b (3) EStG. en: null - unit: Euros - reference_period: Year type: piecewise_constant 1975-01-01: reference: G. v. 05.08.1974 BGBl. I S. 1769. - note: DM converted to Euro. + input_unit: DIMENSIONLESS + output_unit: DM_PER_YEAR intervals: - interval: (-inf, 25) intercept: 0 - interval: '[25, 35)' - intercept: 307 + intercept: 600 - interval: '[35, 45)' - intercept: 429 + intercept: 840 - interval: '[45, 55)' - intercept: 568 + intercept: 1110 - interval: '[55, 65)' - intercept: 721 + intercept: 1410 - interval: '[65, 75)' - intercept: 890 + intercept: 1740 - interval: '[75, 85)' - intercept: 1058 + intercept: 2070 - interval: '[85, 95)' - intercept: 1227 + intercept: 2400 - interval: '[95, inf)' - intercept: 1411 + intercept: 2760 2002-01-01: reference: Art. 1 G. v. 19.12.2000 BGBl. I S. 1790. + input_unit: DIMENSIONLESS + output_unit: EUR_PER_YEAR intervals: - interval: (-inf, 25) intercept: 0 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" index c12fffe202..7139626f70 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN) def betrag_y_sn( sonderausgaben_y_sn: float, vorsorgeaufwendungen_y_sn: float, @@ -15,7 +15,7 @@ def betrag_y_sn( return sonderausgaben_y_sn + vorsorgeaufwendungen_y_sn + betrag_ind_y_sn -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_ind_y( pauschbetrag_behinderung_y: float, alleinerziehend_betrag_y: float, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/inputs.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/inputs.py" index b9974ea262..ecad490efc 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/inputs.py" @@ -2,19 +2,19 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitrag_private_rentenversicherung_m() -> float: pass -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def kinderbetreuungskosten_m() -> float: """Monthly childcare expenses for a particular child under the age of 14.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def p_id_kinderbetreuungskostenträger() -> int: """Identifier of the person who paid childcare expenses.""" diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" index c2dca0c94a..a125894111 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" @@ -5,12 +5,13 @@ from gettsim.tt import ( AggType, RoundingSpec, + TTSIMUnit, agg_by_p_id_function, policy_function, ) -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.CURRENCY.PER_MONTH) def kinderbetreuungskosten_elternteil_m( kinderbetreuungskosten_m: float, p_id_kinderbetreuungskostenträger: int, @@ -19,7 +20,11 @@ def kinderbetreuungskosten_elternteil_m( pass -@policy_function(end_date="2011-12-31", leaf_name="sonderausgaben_y_sn") +@policy_function( + end_date="2011-12-31", + leaf_name="sonderausgaben_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def sonderausgaben_y_sn_nur_pauschale( familie__anzahl_personen_sn: int, sonderausgabenpauschbetrag: float, @@ -33,7 +38,11 @@ def sonderausgaben_y_sn_nur_pauschale( return sonderausgabenpauschbetrag * familie__anzahl_personen_sn -@policy_function(start_date="2012-01-01", leaf_name="sonderausgaben_y_sn") +@policy_function( + start_date="2012-01-01", + leaf_name="sonderausgaben_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def sonderausgaben_y_sn_mit_kinderbetreuung( absetzbare_kinderbetreuungskosten_y_sn: float, familie__anzahl_personen_sn: int, @@ -51,7 +60,7 @@ def sonderausgaben_y_sn_mit_kinderbetreuung( ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def gedeckelte_kinderbetreuungskosten_y( kinderbetreuungskosten_elternteil_y: float, parameter_absetzbare_kinderbetreuungskosten: dict[str, float], @@ -63,7 +72,13 @@ def gedeckelte_kinderbetreuungskosten_y( ) -@policy_function(rounding_spec=RoundingSpec(base=1, direction="up")) +@policy_function( + start_date="2002-01-01", + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="up" + ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def absetzbare_kinderbetreuungskosten_y_sn( gedeckelte_kinderbetreuungskosten_y_sn: float, parameter_absetzbare_kinderbetreuungskosten: dict[str, float], diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" index 60310390f1..82635db9d7 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" @@ -6,16 +6,17 @@ sonderausgabenpauschbetrag: description: de: § 10c EStG en: null - unit: Euros - reference_period: Year type: scalar 1984-01-01: - value: 138 + unit: DM_PER_YEAR + value: 270 + reference: § 10c EStG i. d. F. der Bekanntmachung v. 27.02.1987 BGBl. I S. 657. 1988-01-01: - value: 55 - reference: Art. 1 G. v. 25.07.1988, BGBl. I S. 1093 - note: 108 DM. Rückdatiert auf das gesamte Jahr. + value: 108 + reference: Art. 1 Nr. 15 G. v. 25.07.1988, BGBl. I S. 1093 + note: Rückdatiert auf das gesamte Jahr. 2002-01-01: + unit: EUR_PER_YEAR value: 36 note: Art. 1 G. v. 19.12.2000, BGBl. I S. 1790 parameter_absetzbare_kinderbetreuungskosten: @@ -25,8 +26,9 @@ parameter_absetzbare_kinderbetreuungskosten: description: de: §10 (1) Nr. 5 EStG en: null - unit: Share - reference_period: null + unit: + anteil: DIMENSIONLESS + maximum: EUR_PER_YEAR type: dict 2012-01-01: anteil: 0.6666666 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" index d4523f9630..b65b562703 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" @@ -5,6 +5,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, RoundingSpec, + TTSIMUnit, param_function, piecewise_polynomial, policy_function, @@ -15,9 +16,16 @@ @policy_function( + start_date="2002-01-01", end_date="2004-12-31", leaf_name="vorsorgeaufwendungen_y_sn", - rounding_spec=RoundingSpec(base=1, direction="up", reference="§ 10 Abs. 3 EStG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_bis_2004( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -30,7 +38,13 @@ def vorsorgeaufwendungen_y_sn_bis_2004( start_date="2005-01-01", end_date="2009-12-31", leaf_name="vorsorgeaufwendungen_y_sn", - rounding_spec=RoundingSpec(base=1, direction="up", reference="§ 10 Abs. 3 EStG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2005_bis_2009( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -51,7 +65,13 @@ def vorsorgeaufwendungen_y_sn_ab_2005_bis_2009( start_date="2010-01-01", end_date="2019-12-31", leaf_name="vorsorgeaufwendungen_y_sn", - rounding_spec=RoundingSpec(base=1, direction="up", reference="§ 10 Abs. 3 EStG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2010_bis_2019( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -71,7 +91,13 @@ def vorsorgeaufwendungen_y_sn_ab_2010_bis_2019( @policy_function( start_date="2020-01-01", leaf_name="vorsorgeaufwendungen_y_sn", - rounding_spec=RoundingSpec(base=1, direction="up", reference="§ 10 Abs. 3 EStG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2020( vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn: float, @@ -84,7 +110,10 @@ def vorsorgeaufwendungen_y_sn_ab_2020( return vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn -@policy_function(end_date="2019-12-31") +@policy_function( + end_date="2019-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def vorsorgeaufwendungen_regime_bis_2004_y_sn( vorwegabzug_lohnsteuer_y_sn: float, sozialversicherung__kranken__beitrag__betrag_versicherter_y_sn: float, @@ -127,6 +156,7 @@ def vorsorgeaufwendungen_regime_bis_2004_y_sn( @policy_function( start_date="2005-01-01", end_date="2009-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_globale_kappung_y_sn( altersvorsorge_y_sn: float, @@ -156,6 +186,7 @@ def vorsorgeaufwendungen_globale_kappung_y_sn( @policy_function( start_date="2010-01-01", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn( altersvorsorge_y_sn: float, @@ -195,7 +226,9 @@ def vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn( return sonst_vors + altersvorsorge_y_sn -@param_function(start_date="2005-01-01", end_date="2022-12-31") +@param_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def rate_abzugsfähige_altersvorsorgeaufwendungen( parameter_einführungsfaktor_altersvorsorgeaufwendungen: PiecewisePolynomialParamValue, policy_year: int, @@ -222,6 +255,7 @@ def rate_abzugsfähige_altersvorsorgeaufwendungen( start_date="2005-01-01", end_date="2022-12-31", leaf_name="altersvorsorge_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def altersvorsorge_y_sn_phase_in( sozialversicherung__rente__beitrag__betrag_versicherter_y_sn: float, @@ -248,7 +282,11 @@ def altersvorsorge_y_sn_phase_in( return min(out, max_value) -@policy_function(start_date="2023-01-01", leaf_name="altersvorsorge_y_sn") +@policy_function( + start_date="2023-01-01", + leaf_name="altersvorsorge_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def altersvorsorge_y_sn_volle_anrechnung( sozialversicherung__rente__beitrag__betrag_versicherter_y_sn: float, beitrag_private_rentenversicherung_y_sn: float, @@ -265,7 +303,10 @@ def altersvorsorge_y_sn_volle_anrechnung( return min(out, max_value) -@policy_function(end_date="2019-12-31") +@policy_function( + end_date="2019-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def vorwegabzug_lohnsteuer_y_sn( einnahmen__bruttolohn_y_sn: float, familie__anzahl_personen_sn: int, @@ -284,7 +325,7 @@ def vorwegabzug_lohnsteuer_y_sn( return max(out, 0.0) -@param_function(start_date="2015-01-01") +@param_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def maximalbetrag_altersvorsorgeaufwendungen_y( sozialversicherung__rente__beitrag__beitragssatz_knappschaftliche_rentenversicherung: float, sozialversicherung__rente__beitrag__beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: float, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" index 1853562d67..749d38ede8 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" @@ -16,13 +16,17 @@ parameter_altersvorsorgeaufwendungen_regime_bis_2004: gekürzt bei abhängig Beschäftigten (vereinfacht). Achtung: Heterogene Einträge im dict! en: null - unit: null - reference_period: Year type: dict 1985-01-01: - vorwegabzug: 1534 - grundhöchstbetrag: 1196 + unit: + vorwegabzug: DM_PER_YEAR + grundhöchstbetrag: DM_PER_YEAR + kürzungsanteil_abhängig_beschäftigte: DIMENSIONLESS + vorwegabzug: 3000 + grundhöchstbetrag: 2340 kürzungsanteil_abhängig_beschäftigte: 0.0935 + reference: >- + § 10 Abs. 3 EStG i. d. F. der Bekanntmachung v. 27.02.1987 BGBl. I S. 657. 1986-01-01: updates_previous: true kürzungsanteil_abhängig_beschäftigte: 0.096 @@ -31,18 +35,28 @@ parameter_altersvorsorgeaufwendungen_regime_bis_2004: kürzungsanteil_abhängig_beschäftigte: 0.0935 1989-01-01: updates_previous: true - vorwegabzug: 2045 + vorwegabzug: 4000 kürzungsanteil_abhängig_beschäftigte: 0.12 + reference: Art. 1 G. v. 25.07.1988 BGBl. I S. 1093 (Steuerreformgesetz 1990). 1992-01-01: updates_previous: true - grundhöchstbetrag: 1334 + grundhöchstbetrag: 2610 1993-01-01: updates_previous: true - vorwegabzug: 3068 + vorwegabzug: 6000 1994-01-01: updates_previous: true kürzungsanteil_abhängig_beschäftigte: 0.16 reference: Art. 1 G. v. 21.12.1993 BGBl. I S. 2310. + 2002-01-01: + unit: + vorwegabzug: EUR_PER_YEAR + grundhöchstbetrag: EUR_PER_YEAR + kürzungsanteil_abhängig_beschäftigte: DIMENSIONLESS + vorwegabzug: 3068 + grundhöchstbetrag: 1334 + kürzungsanteil_abhängig_beschäftigte: 0.16 + reference: Art. 1 G. v. 19.12.2000 BGBl. I S. 1790 (Steuer-Euroglättungsgesetz). 2011-01-01: updates_previous: true vorwegabzug: 2700 @@ -90,8 +104,8 @@ parameter_einführungsfaktor_altersvorsorgeaufwendungen: percentage points each year from 60% in 2005 to 94% in 2022. It was planned that 100% are reached in 2025. Deviating from this plan, the deductible contributions were set to 100% already in 2023. - unit: null - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: DIMENSIONLESS type: piecewise_linear 2005-01-01: intervals: @@ -113,8 +127,7 @@ maximalbetrag_sonstige_vorsorgeaufwendungen: description: de: §10 Abs. 4 S.1 EStG en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2005-01-01: value: 1500 @@ -129,8 +142,7 @@ maximalbetrag_altersvorsorgeaufwendungen_y: description: de: §10 (3) EStG, Anlage 2 SGB VI en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2005-01-01: value: 20000 @@ -148,8 +160,7 @@ minderungsanteil_vorsorgeaufwendungen_für_krankenversicherungsbeiträge: description: de: §10 (3) a) S.4 EStG en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2009-07-23: value: 0.04 diff --git a/src/gettsim/germany/einkommensteuer/einkommen.py b/src/gettsim/germany/einkommensteuer/einkommen.py index dc7333a171..64b71b2feb 100644 --- a/src/gettsim/germany/einkommensteuer/einkommen.py +++ b/src/gettsim/germany/einkommensteuer/einkommen.py @@ -6,11 +6,11 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() -def gesamteinkommen_y( +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN) +def gesamteinkommen_y_sn( einkünfte__gesamtbetrag_der_einkünfte_y_sn: float, abzüge__betrag_y_sn: float, ) -> float: diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuer.py b/src/gettsim/germany/einkommensteuer/einkommensteuer.py index d1946d1dd5..1f5590d747 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuer.py +++ b/src/gettsim/germany/einkommensteuer/einkommensteuer.py @@ -7,10 +7,12 @@ import portion from gettsim.tt import ( + UNSET_UNIT, AggType, ConsecutiveIntLookupTableParamValue, PiecewisePolynomialParamValue, RoundingSpec, + TTSIMUnit, agg_by_p_id_function, get_piecewise_parameters, intervals_to_thresholds, @@ -25,7 +27,7 @@ from gettsim.typing import RawParamValue -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS) def anzahl_kindergeld_ansprüche_1( kindergeld__ist_leistungsbegründendes_kind: bool, familie__p_id_elternteil_1: int, @@ -34,7 +36,7 @@ def anzahl_kindergeld_ansprüche_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS) def anzahl_kindergeld_ansprüche_2( kindergeld__ist_leistungsbegründendes_kind: bool, familie__p_id_elternteil_2: int, @@ -47,10 +49,12 @@ def anzahl_kindergeld_ansprüche_2( end_date="1996-12-31", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S. 6 EStG", ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( betrag_mit_kinderfreibetrag_y_sn: float, @@ -63,12 +67,15 @@ def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( @policy_function( start_date="1997-01-01", + end_date="2001-12-31", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_kindergeld_oder_kinderfreibetrag( betrag_ohne_kinderfreibetrag_y_sn: float, @@ -85,7 +92,33 @@ def betrag_y_sn_kindergeld_oder_kinderfreibetrag( return out -@policy_function() +@policy_function( + start_date="2002-01-01", + leaf_name="betrag_y_sn", + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, + base=1, + direction="down", + reference="§ 32a Abs. 1 S.6 EStG", + ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) +def betrag_y_sn_kindergeld_oder_kinderfreibetrag( + betrag_ohne_kinderfreibetrag_y_sn: float, + betrag_mit_kinderfreibetrag_y_sn: float, + kinderfreibetrag_günstiger_sn: bool, + relevantes_kindergeld_y_sn: float, +) -> float: + """Income tax calculation on Steuernummer level since 1997.""" + if kinderfreibetrag_günstiger_sn: + out = betrag_mit_kinderfreibetrag_y_sn + relevantes_kindergeld_y_sn + else: + out = betrag_ohne_kinderfreibetrag_y_sn + + return out + + +@policy_function(unit=TTSIMUnit.DIMENSIONLESS.PER_SN) def kinderfreibetrag_günstiger_sn( betrag_ohne_kinderfreibetrag_y_sn: float, betrag_mit_kinderfreibetrag_y_sn: float, @@ -103,11 +136,13 @@ def kinderfreibetrag_günstiger_sn( end_date="2001-12-31", leaf_name="betrag_mit_kinderfreibetrag_y_sn", rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), fail_msg_if_included="Tax system before 2002 is not implemented yet.", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_mit_kinderfreibetrag_y_sn_bis_2001() -> float: pass @@ -117,10 +152,12 @@ def betrag_mit_kinderfreibetrag_y_sn_bis_2001() -> float: start_date="2002-01-01", leaf_name="betrag_mit_kinderfreibetrag_y_sn", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_mit_kinderfreibetrag_y_sn_ab_2002( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -145,14 +182,17 @@ def betrag_mit_kinderfreibetrag_y_sn_ab_2002( @policy_function( + start_date="2002-01-01", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_ohne_kinderfreibetrag_y_sn( - gesamteinkommen_y: float, + gesamteinkommen_y_sn: float, familie__anzahl_personen_sn: int, parameter_einkommensteuertarif: PiecewisePolynomialParamValue, xnp: ModuleType, @@ -161,7 +201,7 @@ def betrag_ohne_kinderfreibetrag_y_sn( "tarifliche ESt II". """ - zu_verst_eink_per_indiv = gesamteinkommen_y / familie__anzahl_personen_sn + zu_verst_eink_per_indiv = gesamteinkommen_y_sn / familie__anzahl_personen_sn return familie__anzahl_personen_sn * piecewise_polynomial( x=zu_verst_eink_per_indiv, parameters=parameter_einkommensteuertarif, @@ -169,7 +209,11 @@ def betrag_ohne_kinderfreibetrag_y_sn( ) -@policy_function(end_date="2022-12-31", leaf_name="relevantes_kindergeld_m") +@policy_function( + end_date="2022-12-31", + leaf_name="relevantes_kindergeld_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def relevantes_kindergeld_mit_staffelung_m( anzahl_kindergeld_ansprüche_1: int, anzahl_kindergeld_ansprüche_2: int, @@ -193,6 +237,7 @@ def relevantes_kindergeld_mit_staffelung_m( @policy_function( start_date="2023-01-01", leaf_name="relevantes_kindergeld_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def relevantes_kindergeld_ohne_staffelung_m( anzahl_kindergeld_ansprüche_1: int, @@ -213,7 +258,7 @@ def relevantes_kindergeld_ohne_staffelung_m( return kindergeld__satz * kindergeld_ansprüche / 2 -@param_function(start_date="2002-01-01") +@param_function(start_date="2002-01-01", unit=UNSET_UNIT) def parameter_einkommensteuertarif( raw_parameter_einkommensteuertarif: RawParamValue, xnp: ModuleType, diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuertarif.yaml b/src/gettsim/germany/einkommensteuer/einkommensteuertarif.yaml index 4f3c48a248..7a46163683 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuertarif.yaml +++ b/src/gettsim/germany/einkommensteuer/einkommensteuertarif.yaml @@ -13,8 +13,8 @@ raw_parameter_einkommensteuertarif: §32a EStG The quadratic rate is calculated by gettsim with the formula of the Progressionsfaktor. For details see the docstring of add_progressionsfaktor. - unit: Euros - reference_period: Year + input_unit: EUR_PER_YEAR + output_unit: EUR_PER_YEAR type: require_converter 2002-01-01: intervals: diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_forst_und_landwirtschaft/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_forst_und_landwirtschaft/inputs.py" index 864317703f..eb30ebd2ab 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_forst_und_landwirtschaft/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_forst_und_landwirtschaft/inputs.py" @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y() -> float: """Yearly income from forestry and agriculture.""" diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_gewerbebetrieb/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_gewerbebetrieb/inputs.py" index 5c9d46ee66..772ef3ee17 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_gewerbebetrieb/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_gewerbebetrieb/inputs.py" @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y() -> float: """Yearly business income.""" diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/aus_kapitalverm\303\266gen.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/aus_kapitalverm\303\266gen.py" index 35d0a2c7a3..6a734ac7ec 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/aus_kapitalverm\303\266gen.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/aus_kapitalverm\303\266gen.py" @@ -2,33 +2,42 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2008-12-31", leaf_name="betrag_y_sn") +@policy_function( + end_date="2008-12-31", + leaf_name="betrag_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def betrag_y_sn_mit_sparerfreibetrag_und_werbungskostenpauschbetrag( einnahmen__kapitalerträge_y_sn: float, familie__anzahl_personen_sn: int, - sparerfreibetrag: float, - werbungskostenpauschbetrag: float, + sparerfreibetrag_y: float, + werbungskostenpauschbetrag_y: float, ) -> float: """Taxable capital income on Steuernummer level.""" return max( einnahmen__kapitalerträge_y_sn - - familie__anzahl_personen_sn * (sparerfreibetrag + werbungskostenpauschbetrag), + - familie__anzahl_personen_sn + * (sparerfreibetrag_y + werbungskostenpauschbetrag_y), 0.0, ) -@policy_function(start_date="2009-01-01", leaf_name="betrag_y_sn") +@policy_function( + start_date="2009-01-01", + leaf_name="betrag_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def betrag_y_sn_mit_sparerpauschbetrag( einnahmen__kapitalerträge_y_sn: float, familie__anzahl_personen_sn: int, - sparerpauschbetrag: float, + sparerpauschbetrag_y: float, ) -> float: """Taxable capital income on Steuernummer level.""" return max( einnahmen__kapitalerträge_y_sn - - familie__anzahl_personen_sn * sparerpauschbetrag, + - familie__anzahl_personen_sn * sparerpauschbetrag_y, 0.0, ) diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/freibetr\303\244ge.yaml" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/freibetr\303\244ge.yaml" index 3650dbd81c..8a794db60a 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/freibetr\303\244ge.yaml" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_kapitalverm\303\266gen/freibetr\303\244ge.yaml" @@ -1,5 +1,5 @@ --- -sparerfreibetrag: +sparerfreibetrag_y: name: de: Sparerfreibetrag en: Allowance for Capital Gains @@ -8,22 +8,18 @@ sparerfreibetrag: Früher § 20 (4) EStG. Wert für Einzelpersonen. Wird verdoppelt für gemeinsam veranlagte Paare. en: null - unit: Euros - reference_period: Year type: scalar 1975-01-01: - value: 153 - note: 300 DM. + unit: DM_PER_YEAR + value: 300 1990-01-01: - value: 307 - note: 600 DM. + value: 600 1993-01-01: - value: 3068 - note: 6000 DM. + value: 6000 2000-01-01: - value: 1534 - note: 3000 DM + value: 3000 2002-01-01: + unit: EUR_PER_YEAR value: 1550 reference: Art. 1 G. v. 19.12.2000 BGBl I S. 1790. 2004-01-01: @@ -34,24 +30,26 @@ sparerfreibetrag: note: >- Integration von Sparerfreibetrag, Werbungskostenpauschbetrag bei Zinseinkünften in Sparerpauschbetrag. -werbungskostenpauschbetrag: +werbungskostenpauschbetrag_y: name: de: Werbungskostenpauschbetrag bei Zinseinkünften en: null description: de: § 9a EStG en: null - unit: Euros - reference_period: Year type: scalar 1975-01-01: + unit: DM_PER_YEAR + value: 100 + 2002-01-01: + unit: EUR_PER_YEAR value: 51 - note: 100 DM. + reference: Art. 1 G. v. 19.12.2000 BGBl I S. 1790. 2009-01-01: note: >- Integration von Sparerfreibetrag, Werbungskostenpauschbetrag bei Zinseinkünften in Sparerpauschbetrag. -sparerpauschbetrag: +sparerpauschbetrag_y: name: de: Sparerpauschbetrag en: Allowance for Capital Gains @@ -60,8 +58,7 @@ sparerpauschbetrag: § 20 (9) EStG. Wert für Einzelpersonen. Wird verdoppelt für gemeinsam veranlagte Paare. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2009-01-01: value: 801 diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aktivrente.yaml" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aktivrente.yaml" index 8366d220df..d623b5f58d 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aktivrente.yaml" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aktivrente.yaml" @@ -9,8 +9,7 @@ steuerfreibetrag_aktivrente_y: description: de: § 3 Abs. 21 EStG en: § 3 Abs. 21 EStG - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2026-01-01: value: 24000 diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aus_nichtselbstst\303\244ndiger_arbeit.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aus_nichtselbstst\303\244ndiger_arbeit.py" index d7d693c751..e691e3b82b 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aus_nichtselbstst\303\244ndiger_arbeit.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/aus_nichtselbstst\303\244ndiger_arbeit.py" @@ -2,10 +2,12 @@ from __future__ import annotations -from gettsim.tt import param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function -@policy_function(end_date="1999-03-31", leaf_name="betrag_y") +@policy_function( + end_date="1999-03-31", leaf_name="betrag_y", unit=TTSIMUnit.CURRENCY.PER_YEAR +) def betrag_y_bis_03_1999( einnahmen_nach_abzug_werbungskosten_y: float, ) -> float: @@ -13,7 +15,9 @@ def betrag_y_bis_03_1999( return einnahmen_nach_abzug_werbungskosten_y -@policy_function(start_date="1999-04-01", leaf_name="betrag_y") +@policy_function( + start_date="1999-04-01", leaf_name="betrag_y", unit=TTSIMUnit.CURRENCY.PER_YEAR +) def betrag_y_ab_04_1999( sozialversicherung__geringfügig_beschäftigt: bool, steuerbefreite_einnahmen_y: float, @@ -33,7 +37,7 @@ def betrag_y_ab_04_1999( ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def einnahmen_nach_abzug_werbungskosten_y( einnahmen__bruttolohn_y: float, werbungskosten_y: float, @@ -42,12 +46,12 @@ def einnahmen_nach_abzug_werbungskosten_y( return max(einnahmen__bruttolohn_y - werbungskosten_y, 0.0) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def werbungskosten_y( tatsächliche_werbungskosten_y: float, arbeitnehmerpauschbetrag: float, einnahmen__bruttolohn_y: float, - anteil_steuerfälliger_einnahmen_y: float, + anteil_steuerfälliger_einnahmen: float, ) -> float: """Werbungskosten nach Berücksichtung des Arbeitnehmer-Pauschbetrags. @@ -57,7 +61,7 @@ def werbungskosten_y( """ if einnahmen__bruttolohn_y > 0.0: anrechenbare_werbungskosten = ( - tatsächliche_werbungskosten_y * anteil_steuerfälliger_einnahmen_y + tatsächliche_werbungskosten_y * anteil_steuerfälliger_einnahmen ) else: anrechenbare_werbungskosten = 0.0 @@ -65,8 +69,8 @@ def werbungskosten_y( return max(anrechenbare_werbungskosten, arbeitnehmerpauschbetrag) -@policy_function() -def anteil_steuerfälliger_einnahmen_y( +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) +def anteil_steuerfälliger_einnahmen( einnahmen__bruttolohn_y: float, steuerbefreite_einnahmen_y: float, ) -> float: @@ -83,7 +87,11 @@ def anteil_steuerfälliger_einnahmen_y( return 0.0 -@param_function(end_date="2025-12-31", leaf_name="steuerbefreite_einnahmen_y") +@param_function( + end_date="2025-12-31", + leaf_name="steuerbefreite_einnahmen_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def steuerbefreite_einnahmen_y_bis_2025() -> float: """Steuerbefreite Einnahmen aus abhängiger Beschäftigung. @@ -93,7 +101,11 @@ def steuerbefreite_einnahmen_y_bis_2025() -> float: return 0.0 -@policy_function(start_date="2026-01-01", leaf_name="steuerbefreite_einnahmen_y") +@policy_function( + start_date="2026-01-01", + leaf_name="steuerbefreite_einnahmen_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def steuerbefreite_einnahmen_y_ab_2026( anspruchshöhe_steuerfreibetrag_aktivrente_y: float, ) -> float: @@ -104,7 +116,7 @@ def steuerbefreite_einnahmen_y_ab_2026( return anspruchshöhe_steuerfreibetrag_aktivrente_y -@policy_function(start_date="2026-01-01") +@policy_function(start_date="2026-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anspruchshöhe_steuerfreibetrag_aktivrente_m( sozialversicherung__rente__beitrag__betrag_versicherter_m: float, steuerfreibetrag_aktivrente_m: float, diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/inputs.py" index 3dc34fd99b..821c8814c1 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/inputs.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def tatsächliche_werbungskosten_y() -> float: """Actual yearly work-related expenses (Werbungskosten) before comparison with the Arbeitnehmer-Pauschbetrag. diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/werbungskostenpauschale.yaml" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/werbungskostenpauschale.yaml" index 6c9e5be96f..2c5770384c 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/werbungskostenpauschale.yaml" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_nichtselbstst\303\244ndiger_arbeit/werbungskostenpauschale.yaml" @@ -6,15 +6,16 @@ arbeitnehmerpauschbetrag: description: de: § 9a Nr. 1a) EStG en: This is the minimum amount deducted from any employment income. - unit: Euros - reference_period: Year type: scalar 1975-01-01: - value: 288 - note: 564 DM + unit: DM_PER_YEAR + value: 564 1990-01-01: + value: 2000 + reference: Art. 1 G. v. 25.07.1988 BGBl. I S. 1093 (Steuerreformgesetz 1990). + 2002-01-01: + unit: EUR_PER_YEAR value: 1044 - note: 2000 DM. 2004-01-01: value: 920 2012-01-01: diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_selbstst\303\244ndiger_arbeit/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_selbstst\303\244ndiger_arbeit/inputs.py" index 2ba8c4a13a..99ec5f1323 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_selbstst\303\244ndiger_arbeit/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_selbstst\303\244ndiger_arbeit/inputs.py" @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y() -> float: """Yearly income from self-employment.""" diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_vermietung_und_verpachtung/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_vermietung_und_verpachtung/inputs.py" index a43d6166b7..3209ca1ad5 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_vermietung_und_verpachtung/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_vermietung_und_verpachtung/inputs.py" @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y() -> float: """Yearly rental income net of deductions.""" diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/eink\303\274nfte.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/eink\303\274nfte.py" index 01126bb59a..247ff4cea4 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/eink\303\274nfte.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/eink\303\274nfte.py" @@ -2,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2008-12-31", leaf_name="gesamtbetrag_der_einkünfte_y") +@policy_function( + end_date="2008-12-31", + leaf_name="gesamtbetrag_der_einkünfte_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def gesamtbetrag_der_einkünfte_y_mit_kapiteleinkünften( aus_forst_und_landwirtschaft__betrag_y: float, aus_gewerbebetrieb__betrag_y: float, @@ -33,7 +37,11 @@ def gesamtbetrag_der_einkünfte_y_mit_kapiteleinkünften( ) -@policy_function(start_date="2009-01-01", leaf_name="gesamtbetrag_der_einkünfte_y") +@policy_function( + start_date="2009-01-01", + leaf_name="gesamtbetrag_der_einkünfte_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, +) def gesamtbetrag_der_einkünfte_y_ohne_kapitaleinkünfte( aus_forst_und_landwirtschaft__betrag_y: float, aus_gewerbebetrieb__betrag_y: float, diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/inputs.py" index 852680363f..f8079dc58c 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/inputs.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def ist_hauptberuflich_selbstständig() -> bool: """Self-employed (main occupation). diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/inputs.py" index 8a124cbd67..f2190c5ecb 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/inputs.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def alle_weiteren_y() -> float: """Any sonstige Einnahmen according to EStG not considered explicitly. diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/inputs.py" index 17c5d615e1..1193295a1d 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/inputs.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/inputs.py" @@ -2,19 +2,19 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.YEARS) def alter_beginn_leistungsbezug_sonstige_private_vorsorge() -> int: """Age at which pension from `sonstige_private_vorsorge_m` commenced.""" -@policy_input(end_date="2004-12-31") +@policy_input(end_date="2004-12-31", unit=TTSIMUnit.YEARS) def alter_beginn_leistungsbezug_berufsständische_altersvorsorge() -> int: """Age at which pension `aus_berufsständischen_versicherungen_m` commenced.""" -@policy_input(end_date="2004-12-31") +@policy_input(end_date="2004-12-31", unit=TTSIMUnit.YEARS) def alter_beginn_leistungsbezug_betriebliche_altersvorsorge() -> int: """Age at which pension from `betriebliche_altersvorsorge_m` commenced.""" diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.py" index 14d2a26036..0fb60d692d 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.py" @@ -9,10 +9,14 @@ from gettsim.tt import ConsecutiveIntLookupTableParamValue -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2004-12-31", leaf_name="steuerpflichtige_einnahmen_m") +@policy_function( + end_date="2004-12-31", + leaf_name="steuerpflichtige_einnahmen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def steuerpflichtige_einnahmen_m_nach_ertragsanteil( ertragsanteil_gesetzliche_rente: float, ertragsanteil_berufsständische_altersvorsorge: float, @@ -37,7 +41,11 @@ def steuerpflichtige_einnahmen_m_nach_ertragsanteil( ) -@policy_function(start_date="2005-01-01", leaf_name="steuerpflichtige_einnahmen_m") +@policy_function( + start_date="2005-01-01", + leaf_name="steuerpflichtige_einnahmen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def steuerpflichtige_einnahmen_m_nach_besteuerungsanteil( besteuerungsanteil: float, ertragsanteil_sonstige_private_vorsorge: float, @@ -66,7 +74,7 @@ def steuerpflichtige_einnahmen_m_nach_besteuerungsanteil( ) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ertragsanteil_sonstige_private_vorsorge( alter_beginn_leistungsbezug_sonstige_private_vorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -77,7 +85,7 @@ def ertragsanteil_sonstige_private_vorsorge( ) -@policy_function(end_date="2004-12-31") +@policy_function(end_date="2004-12-31", unit=TTSIMUnit.DIMENSIONLESS) def ertragsanteil_berufsständische_altersvorsorge( alter_beginn_leistungsbezug_berufsständische_altersvorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -88,7 +96,10 @@ def ertragsanteil_berufsständische_altersvorsorge( ) -@policy_function(end_date="2004-12-31") +@policy_function( + end_date="2004-12-31", + unit=TTSIMUnit.DIMENSIONLESS, +) def ertragsanteil_gesetzliche_rente( sozialversicherung__rente__alter_bei_renteneintritt: float, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -100,7 +111,7 @@ def ertragsanteil_gesetzliche_rente( ) -@policy_function(end_date="2004-12-31") +@policy_function(end_date="2004-12-31", unit=TTSIMUnit.DIMENSIONLESS) def ertragsanteil_betriebliche_altersvorsorge( alter_beginn_leistungsbezug_betriebliche_altersvorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -111,7 +122,7 @@ def ertragsanteil_betriebliche_altersvorsorge( ) -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def besteuerungsanteil( sozialversicherung__rente__jahr_renteneintritt: int, parameter_besteuerungsanteil: ConsecutiveIntLookupTableParamValue, diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.yaml" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.yaml" index 9a3710d034..c48f8e2f60 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.yaml" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/rente/rente.yaml" @@ -14,8 +14,8 @@ parameter_ertragsanteil: en: >- Until 2005, all pension income was taxed with its Ertragsanteil. The Ertragsanteil is determined by the age at pension entry. - unit: null - reference_period: null + input_unit: YEARS + output_unit: DIMENSIONLESS type: sparse_to_consecutive_int_lookup_table 1997-01-01: reference: Neubekanntmachung EStG BGBl. I Nr. 26 S. 821 vom 16.04.1997 @@ -238,8 +238,8 @@ parameter_besteuerungsanteil: Pensions are taxed with the Besteuerungsanteil unless they come from a state-sponsored (i.e. tax-benefited) pension fund. § 22 Nr. 1 Satz 3 Buchstabe a Doppelbuchstabe aa EStG - unit: null - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: DIMENSIONLESS type: sparse_to_consecutive_int_lookup_table 2005-01-01: reference: Alterseinkünftegesetz 2004 BGBl. 2004 I Nr. 33 vom 05.07.2004 diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" index d38cc1c93c..4e32558ecc 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" @@ -2,19 +2,19 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y( rente__steuerpflichtige_einnahmen_y: float, alle_weiteren_y: float, - werbungskostenpauschbetrag: float, + werbungskostenpauschbetrag_y: float, ) -> float: """Sonstige Einkünfte nach Abzug der Werbungskosten.""" return max( rente__steuerpflichtige_einnahmen_y + alle_weiteren_y - - werbungskostenpauschbetrag, + - werbungskostenpauschbetrag_y, 0.0, ) diff --git "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/werbungskostenpauschale.yaml" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/werbungskostenpauschale.yaml" index 89b858b08c..1ba1263ef1 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/werbungskostenpauschale.yaml" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/werbungskostenpauschale.yaml" @@ -1,5 +1,5 @@ --- -werbungskostenpauschbetrag: +werbungskostenpauschbetrag_y: name: de: Werbungskostenpauschbetrag für sonstige Einkünfte (vor allem Renten). en: Lump-sum deduction for miscellaneous income (pensions, most prominently). @@ -11,12 +11,11 @@ werbungskostenpauschbetrag: en: >- § 9a Satz 1 Nr. 3 EStG. Lump-sum deducted from income within the meaning of § 22 Nr. 1, 1a, and 5 EStG, capped at the income itself (§ 9a Satz 2 EStG). - unit: Euros - reference_period: Year type: scalar 1984-01-01: value: 200 - unit: DM + unit: DM_PER_YEAR 2002-01-01: value: 102 + unit: EUR_PER_YEAR reference: Art. 1 G. v. 19.12.2000 BGBl. I S. 1790 (Steuer-Euroglättungsgesetz). diff --git a/src/gettsim/germany/einkommensteuer/inputs.py b/src/gettsim/germany/einkommensteuer/inputs.py index 0e9a16d547..c37d2b630f 100644 --- a/src/gettsim/germany/einkommensteuer/inputs.py +++ b/src/gettsim/germany/einkommensteuer/inputs.py @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def gemeinsam_veranlagt() -> bool: """Taxes are filed jointly.""" diff --git a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py index e17fd2212e..a703276f6b 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py @@ -4,13 +4,14 @@ from gettsim.tt import ( AggType, + TTSIMUnit, agg_by_p_id_function, param_function, policy_function, ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def kinderfreibetrag_y( anzahl_kinderfreibeträge: int, kinderfreibetrag_pro_kind_y: float, @@ -19,12 +20,12 @@ def kinderfreibetrag_y( return kinderfreibetrag_pro_kind_y * anzahl_kinderfreibeträge -@param_function() +@param_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def kinderfreibetrag_pro_kind_y(parameter_kinderfreibetrag: dict[str, float]) -> float: return sum(parameter_kinderfreibetrag.values()) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def anzahl_kinderfreibeträge( anzahl_kinderfreibeträge_1: int, anzahl_kinderfreibeträge_2: int, @@ -40,7 +41,7 @@ def anzahl_kinderfreibeträge( return anzahl_kinderfreibeträge_1 + anzahl_kinderfreibeträge_2 -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS) def anzahl_kinderfreibeträge_1( kindergeld__ist_leistungsbegründendes_kind: bool, p_id_kinderfreibetragsempfänger_1: int, @@ -49,7 +50,7 @@ def anzahl_kinderfreibeträge_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS) def anzahl_kinderfreibeträge_2( kindergeld__ist_leistungsbegründendes_kind: bool, p_id_kinderfreibetragsempfänger_2: int, @@ -58,7 +59,7 @@ def anzahl_kinderfreibeträge_2( pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def p_id_kinderfreibetragsempfänger_1( familie__p_id_elternteil_1: int, ) -> int: @@ -66,7 +67,7 @@ def p_id_kinderfreibetragsempfänger_1( return familie__p_id_elternteil_1 -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def p_id_kinderfreibetragsempfänger_2( familie__p_id_elternteil_2: int, ) -> int: diff --git a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml index 16cfeee12d..659ed154d6 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml @@ -9,38 +9,34 @@ parameter_kinderfreibetrag: Betreuungs-, Erziehungs- oder Ausbildungsbedarf. Wird verdoppelt für gemeinsam veranlagte Paare. §32 (6) EStG. en: null - unit: Euros - reference_period: Year type: dict 1983-01-01: - sächliches_existenzminimum: 110 + unit: DM_PER_YEAR + sächliches_existenzminimum: 216 reference: Art. 1 G. v. 23.12.1982 BGBl. I S. 1857. - note: Der Betrag laut Gesetz ist 216 DM. 1986-01-01: - sächliches_existenzminimum: 635 + sächliches_existenzminimum: 1242 reference: Art. 1 G. v. 26.06.1985 BGBl. I S. 1153. - note: Der Betrag im Gesetz lautet 1242 DM. 1990-01-01: - sächliches_existenzminimum: 773 + sächliches_existenzminimum: 1512 reference: Artikel 1 G. v. 25.07.1988 BGBl. I S. 1093. - note: Der Betrag im Gesetz lautet 1512 DM. 1992-01-01: - sächliches_existenzminimum: 1049 + sächliches_existenzminimum: 2052 reference: Art. 1 G. v. 25.02.1992 BGBl. I S. 297. - note: Wert laut Gesetz 2052 DM. 1996-01-01: - sächliches_existenzminimum: 1601 + sächliches_existenzminimum: 3132 reference: Art. 1. G. v. 11.10.1995 BGBl. I S. 1250. - note: Laut Gesetz 261 DM pro Monat. + note: Das Gesetz nennt 261 Deutsche Mark pro Monat. 1997-01-01: - sächliches_existenzminimum: 1767 - note: Laut Gesetz 288 DM pro Monat (ab 2000 3456 DM pro Jahr) + sächliches_existenzminimum: 3456 + reference: Art. 1. G. v. 11.10.1995 BGBl. I S. 1250. + note: Das Gesetz nennt 288 Deutsche Mark pro Monat. 2000-01-01: - sächliches_existenzminimum: 1767 - betreuung_erziehung_ausbildung: 774 + sächliches_existenzminimum: 3456 + betreuung_erziehung_ausbildung: 1512 reference: Art. 1 G. v. 28.12.1999 BGBl. I. S. 2552. - note: Wert für betreuung_erziehung_ausbildung laut Gesetz 1512 DM. 2002-01-01: + unit: EUR_PER_YEAR sächliches_existenzminimum: 1824 betreuung_erziehung_ausbildung: 1080 reference: Art. 1 G. v. 16.08.2001 BGBl. I S. 2074 diff --git a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py index 8af18c339d..136888a7f0 100644 --- a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py +++ b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py @@ -2,34 +2,37 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function @policy_function( rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.1 EStG", ), start_date="2004-01-01", leaf_name="zu_versteuerndes_einkommen_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, - gesamteinkommen_y: float, + gesamteinkommen_y_sn: float, kinderfreibetrag_günstiger_sn: bool, ) -> float: """Calculate taxable income on Steuernummer level.""" if kinderfreibetrag_günstiger_sn: out = zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn else: - out = gesamteinkommen_y + out = gesamteinkommen_y_sn return out @policy_function( rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=36, direction="down", to_add_after_rounding=18, @@ -38,50 +41,53 @@ def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( start_date="2002-01-01", end_date="2003-12-31", leaf_name="zu_versteuerndes_einkommen_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, - gesamteinkommen_y: float, + gesamteinkommen_y_sn: float, kinderfreibetrag_günstiger_sn: bool, ) -> float: """Calculate taxable income on Steuernummer level.""" if kinderfreibetrag_günstiger_sn: out = zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn else: - out = gesamteinkommen_y + out = gesamteinkommen_y_sn return out @policy_function( rounding_spec=RoundingSpec( - base=27.609762, + unit=TTSIMUnit.DM.PER_YEAR.PER_SN, + base=54, direction="down", - to_add_after_rounding=13.804881, + to_add_after_rounding=27, reference="§ 32a Abs. 2 EStG", ), end_date="2001-12-31", leaf_name="zu_versteuerndes_einkommen_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_dmark_rundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, - gesamteinkommen_y: float, + gesamteinkommen_y_sn: float, kinderfreibetrag_günstiger_sn: bool, ) -> float: """Calculate taxable income on Steuernummer level.""" if kinderfreibetrag_günstiger_sn: out = zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn else: - out = gesamteinkommen_y + out = gesamteinkommen_y_sn return out -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN) def zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn( - gesamteinkommen_y: float, + gesamteinkommen_y_sn: float, kinderfreibetrag_y_sn: float, ) -> float: """Calculate taxable income with child allowance on Steuernummer level.""" - out = gesamteinkommen_y - kinderfreibetrag_y_sn + out = gesamteinkommen_y_sn - kinderfreibetrag_y_sn return max(out, 0.0) diff --git a/src/gettsim/germany/einnahmen/inputs.py b/src/gettsim/germany/einnahmen/inputs.py index f3dc2d7137..04617d4fb3 100644 --- a/src/gettsim/germany/einnahmen/inputs.py +++ b/src/gettsim/germany/einnahmen/inputs.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttolohn_m() -> float: """Income (Einnahmen) from non-self-employment.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) def kapitalerträge_y() -> float: """Income (Einnahmen) from capital income.""" diff --git a/src/gettsim/germany/einnahmen/renten/betrag_gesamt.py b/src/gettsim/germany/einnahmen/renten/betrag_gesamt.py index b034dc08a7..fcd0e621a5 100644 --- a/src/gettsim/germany/einnahmen/renten/betrag_gesamt.py +++ b/src/gettsim/germany/einnahmen/renten/betrag_gesamt.py @@ -1,9 +1,13 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2004-12-31", leaf_name="betrag_gesamt_m") +@policy_function( + end_date="2004-12-31", + leaf_name="betrag_gesamt_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_gesamt_m_ohne_basisrente( gesetzliche_m: float, sonstige_private_vorsorge_m: float, @@ -21,7 +25,11 @@ def betrag_gesamt_m_ohne_basisrente( ) -@policy_function(start_date="2005-01-01", leaf_name="betrag_gesamt_m") +@policy_function( + start_date="2005-01-01", + leaf_name="betrag_gesamt_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_gesamt_m_mit_basisrente( gesetzliche_m: float, basisrente_m: float, diff --git a/src/gettsim/germany/einnahmen/renten/gesetzliche.py b/src/gettsim/germany/einnahmen/renten/gesetzliche.py index e2838d0e8c..5c32ef889e 100644 --- a/src/gettsim/germany/einnahmen/renten/gesetzliche.py +++ b/src/gettsim/germany/einnahmen/renten/gesetzliche.py @@ -1,9 +1,9 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def gesetzliche_m( sozialversicherung__rente__altersrente__betrag_m: float, sozialversicherung__rente__erwerbsminderung__betrag_m: float, diff --git a/src/gettsim/germany/einnahmen/renten/inputs.py b/src/gettsim/germany/einnahmen/renten/inputs.py index 3d6570271b..6f1528cb2e 100644 --- a/src/gettsim/germany/einnahmen/renten/inputs.py +++ b/src/gettsim/germany/einnahmen/renten/inputs.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def betriebliche_altersvorsorge_m() -> float: """Monthly payout from occupational pension schemes (Betriebsrente). @@ -14,7 +14,7 @@ def betriebliche_altersvorsorge_m() -> float: """ -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def aus_berufsständischen_versicherungen_m() -> float: """Monthly payout from a berufsständisches Versorgungswerk. @@ -27,7 +27,7 @@ def aus_berufsständischen_versicherungen_m() -> float: """ -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def geförderte_private_vorsorge_m() -> float: """Monthly payout from state-subsidised private pension plans. @@ -41,7 +41,7 @@ def geförderte_private_vorsorge_m() -> float: """ -@policy_input(start_date="2005-01-01") +@policy_input(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def basisrente_m() -> float: """Monthly payout from the Basisrente (colloquially Rürup-Rente). @@ -56,7 +56,7 @@ def basisrente_m() -> float: """ -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def sonstige_private_vorsorge_m() -> float: """Monthly payout from private pensions taxed via Ertragsanteil only. diff --git a/src/gettsim/germany/elterngeld/anspruch.yaml b/src/gettsim/germany/elterngeld/anspruch.yaml index 092f3e3c33..06ba1d02c3 100644 --- a/src/gettsim/germany/elterngeld/anspruch.yaml +++ b/src/gettsim/germany/elterngeld/anspruch.yaml @@ -9,8 +9,7 @@ max_bezugsmonate: § 4 (3) BEEG Basismonate plus "Partnermonate" bei gleichzeitiger Inanspruchnahme von Elterngeld bei Paaren. Basismonate bei Alleinerziehenden. - unit: Months - reference_period: null + unit: MONTHS_PER_FG type: dict 2007-01-01: basismonate: 12 @@ -28,8 +27,7 @@ max_zu_versteuerndes_einkommen_vorjahr_nach_alleinerziehendenstatus: en: >- Maximum taxable income in the year before the birth of the child. Income above this threshold disqualifies the parent from receiving Elterngeld. - unit: Euros - reference_period: null + unit: EUR_PER_YEAR type: dict 2011-01-01: alleinerziehend: 250000.0 @@ -53,8 +51,7 @@ max_zu_versteuerndes_einkommen_vorjahr_pauschal: en: >- Maximum taxable income in the year before the birth of the child. Income above this threshold disqualifies the parent from receiving Elterngeld. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2024-04-01: value: 200000.0 @@ -75,8 +72,7 @@ max_arbeitsstunden_w: description: de: §1 (6) BEEG en: null - unit: Hours - reference_period: Week + unit: HOURS_PER_WEEK type: scalar 2007-01-01: value: 30 diff --git a/src/gettsim/germany/elterngeld/boni.yaml b/src/gettsim/germany/elterngeld/boni.yaml index a424c89325..2d3b076eda 100644 --- a/src/gettsim/germany/elterngeld/boni.yaml +++ b/src/gettsim/germany/elterngeld/boni.yaml @@ -14,8 +14,7 @@ geschwisterbonus_altersgrenzen: § 2a BEEG If there are two children under the age of 3 or more than two under the age of 6 living in the household, Elterngeld increases. - unit: Years - reference_period: null + unit: PERSON_COUNT_PER_FG type: dict 2007-01-01: 3: 2 @@ -27,34 +26,31 @@ geschwisterbonus_aufschlag: description: de: § 2a (1) BEEG. Früher § 2 (4) BEEG en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2007-01-01: value: 0.1 reference: Art. 1 G. v. 05.12.2006 BGBl. I S. 2748 -geschwisterbonus_minimum: +geschwisterbonus_minimum_m_fg: name: de: Minimaler Geschwisterbonus als Euro-Betrag en: Sibling Bonus, minimal amount description: de: § 2a (1) BEEG. Früher §2 (4) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH_PER_FG type: scalar 2007-01-01: value: 75.0 reference: Art. 1 G. v. 05.12.2006 BGBl. I S. 2748 -mehrlingsbonus_pro_kind: +mehrlingsbonus_pro_kind_m: name: de: Pauschale für jedes weitere Mehrlingskind en: Twin, triplet bonus per additional child description: de: § 2a (4) BEEG, früher §2 (6) BEEG. en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 300.0 diff --git a/src/gettsim/germany/elterngeld/einkommen.py b/src/gettsim/germany/elterngeld/einkommen.py index 8b78cab481..70db7e9729 100644 --- a/src/gettsim/germany/elterngeld/einkommen.py +++ b/src/gettsim/germany/elterngeld/einkommen.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anzurechnendes_nettoeinkommen_m( einnahmen__bruttolohn_m: float, lohnsteuer__betrag_m: float, @@ -20,9 +20,12 @@ def anzurechnendes_nettoeinkommen_m( @policy_function( start_date="2007-01-01", - rounding_spec=RoundingSpec(base=2, direction="down", reference="§ 2 (2) BEEG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) -def lohnersatzanteil_einkommen_untere_grenze( +def lohnersatzanteil_einkommen_untere_grenze_m( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, nettoeinkommensstufen_für_lohnersatzrate: dict[str, float], ) -> float: @@ -35,9 +38,12 @@ def lohnersatzanteil_einkommen_untere_grenze( @policy_function( start_date="2007-01-01", - rounding_spec=RoundingSpec(base=2, direction="down", reference="§ 2 (2) BEEG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) -def lohnersatzanteil_einkommen_obere_grenze( +def lohnersatzanteil_einkommen_obere_grenze_m( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, nettoeinkommensstufen_für_lohnersatzrate: dict[str, float], ) -> float: @@ -52,6 +58,7 @@ def lohnersatzanteil_einkommen_obere_grenze( start_date="2011-01-01", end_date="2024-03-31", leaf_name="einkommen_vorjahr_unter_bezugsgrenze", + unit=TTSIMUnit.DIMENSIONLESS, ) def einkommen_vorjahr_unter_bezugsgrenze_mit_unterscheidung_single_paar( familie__alleinerziehend: bool, @@ -82,6 +89,7 @@ def einkommen_vorjahr_unter_bezugsgrenze_mit_unterscheidung_single_paar( @policy_function( start_date="2024-04-01", leaf_name="einkommen_vorjahr_unter_bezugsgrenze", + unit=TTSIMUnit.DIMENSIONLESS, ) def einkommen_vorjahr_unter_bezugsgrenze_ohne_unterscheidung_single_paar( zu_versteuerndes_einkommen_vorjahr_y_sn: float, @@ -96,7 +104,10 @@ def einkommen_vorjahr_unter_bezugsgrenze_ohne_unterscheidung_single_paar( @policy_function( start_date="2012-09-18", - rounding_spec=RoundingSpec(base=0.01, direction="down"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="down" + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def mean_nettoeinkommen_für_bemessungsgrundlage_nach_geburt_m( einnahmen__bruttolohn_m: float, diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index e5d0a69be5..2c178539fc 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -5,13 +5,15 @@ from gettsim.tt import ( AggType, RoundingSpec, + TTSIMUnit, agg_by_group_function, agg_by_p_id_function, + cast_unit, policy_function, ) -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_leistungsbegründendes_kind( alter_monate: int, max_bezugsmonate: dict[str, int], @@ -37,7 +39,7 @@ def ist_leistungsbegründendes_kind( ) -@agg_by_group_function(agg_type=AggType.ANY) +@agg_by_group_function(agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS.PER_FG) def leistungsbegründende_kinder_in_fg( ist_leistungsbegründendes_kind: bool, fg_id: int, @@ -45,7 +47,7 @@ def leistungsbegründende_kinder_in_fg( pass -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) def anzahl_mehrlinge_jüngstes_kind_fg( jüngstes_kind_oder_mehrling: bool, fg_id: int, @@ -53,13 +55,16 @@ def anzahl_mehrlinge_jüngstes_kind_fg( pass -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) def anzahl_anträge_fg(claimed: bool, fg_id: int) -> int: pass @agg_by_p_id_function( - leaf_name="bezugsmonate_partner", end_date="2022-12-31", agg_type=AggType.SUM + leaf_name="bezugsmonate_partner", + end_date="2022-12-31", + agg_type=AggType.SUM, + unit=TTSIMUnit.MONTHS, ) def bezugsmonate_partner_bis_2022( bisherige_bezugsmonate: int, @@ -70,7 +75,10 @@ def bezugsmonate_partner_bis_2022( @agg_by_p_id_function( - leaf_name="bezugsmonate_partner", start_date="2023-01-01", agg_type=AggType.SUM + leaf_name="bezugsmonate_partner", + start_date="2023-01-01", + agg_type=AggType.SUM, + unit=TTSIMUnit.MONTHS, ) def bezugsmonate_partner_ab_2023( bisherige_bezugsmonate: int, @@ -82,7 +90,10 @@ def bezugsmonate_partner_ab_2023( @policy_function( start_date="2011-01-01", - rounding_spec=RoundingSpec(base=0.01, direction="down"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="down" + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m( grundsätzlich_anspruchsberechtigt: bool, @@ -92,12 +103,12 @@ def betrag_m( return anspruchshöhe_m if grundsätzlich_anspruchsberechtigt else 0.0 -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def basisbetrag_m( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, lohnersatzanteil: float, anzurechnendes_nettoeinkommen_m: float, - max_zu_berücksichtigendes_einkommen: float, + max_zu_berücksichtigendes_einkommen_m: float, ) -> float: """Base parental leave benefit without accounting for floor and ceiling. @@ -106,7 +117,7 @@ def basisbetrag_m( """ berücksichtigtes_einkommen = min( mean_nettoeinkommen_in_12_monaten_vor_geburt_m, - max_zu_berücksichtigendes_einkommen, + max_zu_berücksichtigendes_einkommen_m, ) return ( berücksichtigtes_einkommen - anzurechnendes_nettoeinkommen_m @@ -117,33 +128,38 @@ def basisbetrag_m( start_date="2007-01-01", end_date="2010-12-31", leaf_name="betrag_m", - rounding_spec=RoundingSpec(base=0.01, direction="down"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="down" + ), fail_msg_if_included="Elterngeld is not implemented prior to 2011.", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def elterngeld_not_implemented() -> float: pass -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anspruchshöhe_m( basisbetrag_m: float, - geschwisterbonus_m: float, - mehrlingsbonus_m: float, - mindestbetrag: float, - höchstbetrag: float, + geschwisterbonus_m_fg: float, + mehrlingsbonus_m_fg: float, + mindestbetrag_m: float, + höchstbetrag_m: float, ) -> float: """Elterngeld before checking eligibility. Anspruchshöhe is calculated on the parental level. """ + kinderboni_m = cast_unit( + geschwisterbonus_m_fg + mehrlingsbonus_m_fg, TTSIMUnit.CURRENCY.PER_MONTH + ) return ( min( - max(basisbetrag_m, mindestbetrag), - höchstbetrag, + max(basisbetrag_m, mindestbetrag_m), + höchstbetrag_m, ) - + geschwisterbonus_m - + mehrlingsbonus_m + + kinderboni_m ) @@ -151,6 +167,7 @@ def anspruchshöhe_m( start_date="2007-01-01", end_date="2010-12-31", leaf_name="grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_ohne_maximales_vorjahreseinkommen( claimed: bool, @@ -168,7 +185,11 @@ def grundsätzlich_anspruchsberechtigt_ohne_maximales_vorjahreseinkommen( ) -@policy_function(start_date="2011-01-01", leaf_name="grundsätzlich_anspruchsberechtigt") +@policy_function( + start_date="2011-01-01", + leaf_name="grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, +) def grundsätzlich_anspruchsberechtigt_mit_maximales_vorjahreseinkommen( claimed: bool, arbeitsstunden_w: float, @@ -190,7 +211,7 @@ def grundsätzlich_anspruchsberechtigt_mit_maximales_vorjahreseinkommen( ) -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.DIMENSIONLESS) def bezugsmonate_unter_grenze_fg( bisherige_bezugsmonate_fg: int, bezugsmonate_partner: int, @@ -202,30 +223,27 @@ def bezugsmonate_unter_grenze_fg( parent. """ + grenze_mit_partnermonaten = ( + max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] + ) if ( familie__alleinerziehend or bezugsmonate_partner >= max_bezugsmonate["partnermonate"] ): - out = ( - bisherige_bezugsmonate_fg - < max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] - ) + out = bisherige_bezugsmonate_fg < grenze_mit_partnermonaten elif anzahl_anträge_fg > 1: - out = ( - bisherige_bezugsmonate_fg + 1 - < max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] - ) + out = bisherige_bezugsmonate_fg + 1 < grenze_mit_partnermonaten else: out = bisherige_bezugsmonate_fg < max_bezugsmonate["basismonate"] return out -@policy_function(start_date="2011-01-01") +@policy_function(start_date="2011-01-01", unit=TTSIMUnit.DIMENSIONLESS) def lohnersatzanteil( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, - lohnersatzanteil_einkommen_untere_grenze: float, - lohnersatzanteil_einkommen_obere_grenze: float, - einkommensschritte_korrektur: float, + lohnersatzanteil_einkommen_untere_grenze_m: float, + lohnersatzanteil_einkommen_obere_grenze_m: float, + einkommensschritte_korrektur_m: float, satz: float, prozent_korrektur: float, prozent_minimum: float, @@ -244,8 +262,8 @@ def lohnersatzanteil( and mean_nettoeinkommen_in_12_monaten_vor_geburt_m > 0 ): out = satz + ( - lohnersatzanteil_einkommen_untere_grenze - / einkommensschritte_korrektur + lohnersatzanteil_einkommen_untere_grenze_m + / einkommensschritte_korrektur_m * prozent_korrektur ) # Lower replacement rate if considered income is above a threshold @@ -257,8 +275,8 @@ def lohnersatzanteil( out = max( satz - ( - lohnersatzanteil_einkommen_obere_grenze - / einkommensschritte_korrektur + lohnersatzanteil_einkommen_obere_grenze_m + / einkommensschritte_korrektur_m * prozent_korrektur ), prozent_minimum, @@ -272,11 +290,11 @@ def lohnersatzanteil( # TODO(@MImmesberger): Elterngeld is considered as SGB II income since 2011. Also, there # is a 300€ Freibetrag under some conditions since 2011. # https://github.com/ttsim-dev/gettsim/issues/549 -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anrechenbarer_betrag_m( betrag_m: float, anzahl_mehrlinge_fg: int, - mindestbetrag: float, + mindestbetrag_m: float, ) -> float: """Elterngeld that can be considered as income for other transfers. @@ -290,12 +308,12 @@ def anrechenbarer_betrag_m( """ return max( - betrag_m - ((1 + anzahl_mehrlinge_fg) * mindestbetrag), + betrag_m - ((1 + anzahl_mehrlinge_fg) * mindestbetrag_m), 0, ) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def jüngstes_kind_oder_mehrling( alter_monate: int, familie__alter_monate_jüngstes_mitglied_fg: int, @@ -309,5 +327,9 @@ def jüngstes_kind_oder_mehrling( """ return ( - (alter_monate - familie__alter_monate_jüngstes_mitglied_fg) < 0.1 # noqa: PLR2004 + ( + alter_monate + - cast_unit(familie__alter_monate_jüngstes_mitglied_fg, TTSIMUnit.MONTHS) + ) + < 0.1 ) and ist_leistungsbegründendes_kind diff --git a/src/gettsim/germany/elterngeld/formel.yaml b/src/gettsim/germany/elterngeld/formel.yaml index 78eb492f91..78d7c357b8 100644 --- a/src/gettsim/germany/elterngeld/formel.yaml +++ b/src/gettsim/germany/elterngeld/formel.yaml @@ -8,47 +8,43 @@ satz: § 2 (1) BEEG Faktor bei der ElG-Berechung, 2. Stufe. en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2007-01-01: value: 0.67 reference: Art. 1 G. v. 05.12.2006 BGBl. I S. 2748 -höchstbetrag: +höchstbetrag_m: name: de: Höchstbetrag des Elterngeldes en: Maximum Elterngeld description: de: § 2 (1) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 1800.0 reference: Art. 1 G. v. 05.12.2006 BGBl. I S. 2748 -mindestbetrag: +mindestbetrag_m: name: de: Mindestbetrag des Elterngeldes en: Minimum amount of parental benefit description: de: § 2 (5) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 300 reference: Art. 1 G. v. 05.12.2006 BGBl. I S. 2748 -max_zu_berücksichtigendes_einkommen: +max_zu_berücksichtigendes_einkommen_m: name: de: Maximal zu berücksichtigendes Einkommen vor Geburt. en: Maximum income to be considered before birth. description: de: § 2 (3) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 2700.0 @@ -65,8 +61,7 @@ nettoeinkommensstufen_für_lohnersatzrate: § 2 (2) BEEG. Maßgeblich ist das durchschnittlich erzielte monatliche Einkommen vor der Geburt en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: dict 2007-01-01: lower_threshold: 1000.0 @@ -83,8 +78,7 @@ prozent_korrektur: description: de: § 2 (2) BEEG en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2007-01-01: value: 0.001 @@ -96,8 +90,7 @@ prozent_minimum: description: de: § 2 (2) BEEG en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2007-01-01: value: 0.67 @@ -105,15 +98,14 @@ prozent_minimum: 2011-01-01: value: 0.65 reference: Art. 14 G. v. 09.12.2010 BGBl. I S. 1885 -einkommensschritte_korrektur: +einkommensschritte_korrektur_m: name: de: Einkommensschritte für die Korrektur en: Income steps for percentage correction description: de: § 2 (2) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 2 @@ -125,8 +117,7 @@ sozialversicherungspauschale: description: de: §2f BEEG. Vor 2012 waren es die eigentlichen Pflichtbeiträge. en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2012-09-18: value: 0.21 diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index 572d07ea18..39e1fe7bb8 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -2,15 +2,15 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(start_date="2007-01-01") -def geschwisterbonus_m( +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) +def geschwisterbonus_m_fg( basisbetrag_m: float, geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg: bool, geschwisterbonus_aufschlag: float, - geschwisterbonus_minimum: float, + geschwisterbonus_minimum_m_fg: float, ) -> float: """Elterngeld bonus for (older) siblings. @@ -18,21 +18,24 @@ def geschwisterbonus_m( """ if geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg: out = max( - geschwisterbonus_aufschlag * basisbetrag_m, - geschwisterbonus_minimum, + geschwisterbonus_aufschlag + * cast_unit(basisbetrag_m, TTSIMUnit.CURRENCY.PER_MONTH.PER_FG), + geschwisterbonus_minimum_m_fg, ) else: out = 0.0 return out -@policy_function(start_date="2007-01-01") -def mehrlingsbonus_m(anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind: float) -> float: +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) +def mehrlingsbonus_m_fg( + anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind_m: float +) -> float: """Elterngeld bonus for multiples.""" - return anzahl_mehrlinge_fg * mehrlingsbonus_pro_kind + return anzahl_mehrlinge_fg * mehrlingsbonus_pro_kind_m -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.DIMENSIONLESS) def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( familie__anzahl_kinder_bis_2_fg: int, familie__anzahl_kinder_bis_5_fg: int, @@ -49,7 +52,7 @@ def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( return geschwister_unter_3 or geschwister_unter_6 -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.PERSON_COUNT.PER_FG) def anzahl_mehrlinge_fg( anzahl_mehrlinge_jüngstes_kind_fg: int, ) -> int: diff --git a/src/gettsim/germany/elterngeld/inputs.py b/src/gettsim/germany/elterngeld/inputs.py index 3e526721c6..3b9707386b 100644 --- a/src/gettsim/germany/elterngeld/inputs.py +++ b/src/gettsim/germany/elterngeld/inputs.py @@ -2,20 +2,20 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def bisherige_bezugsmonate() -> int: """Number of months the individual received Elterngeld for the current youngest child.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def claimed() -> bool: """Individual claims Elterngeld.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def mean_nettoeinkommen_in_12_monaten_vor_geburt_m() -> float: """Mean net wage in the 12 months before birth of youngest child. @@ -25,7 +25,7 @@ def mean_nettoeinkommen_in_12_monaten_vor_geburt_m() -> float: """ -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN) def zu_versteuerndes_einkommen_vorjahr_y_sn() -> float: """Taxable income in the calendar year prior to the youngest child's birth year. diff --git a/src/gettsim/germany/erziehungsgeld/anspruch.yaml b/src/gettsim/germany/erziehungsgeld/anspruch.yaml index 86fe7c41c0..8140c38ff1 100644 --- a/src/gettsim/germany/erziehungsgeld/anspruch.yaml +++ b/src/gettsim/germany/erziehungsgeld/anspruch.yaml @@ -8,8 +8,7 @@ maximale_wochenarbeitszeit: Grenze der wöchentlichen Arbeitsstunden bis zu der Erziehungsgeld ausgezahlt wird en: >- Limit of weekly working hours up to which parental leave benefit is paid - unit: Hours - reference_period: Week + unit: HOURS_PER_WEEK type: scalar 2004-02-09: reference: § 5 G. v. 09.02.2004 BGBl. I S. 211 @@ -27,8 +26,7 @@ maximales_kindsalter_regelsatz: Alter des Kindein Monaten bis zu dem der Regelsatz bezogen werden kann. en: >- Age of the child in months up to which the Regelsatz can be claimed. - unit: Months - reference_period: null + unit: MONTHS type: scalar 2004-01-01: reference: § 5 G. v. 09.02.2004 BGBl. I S. 208 @@ -44,8 +42,7 @@ maximales_kindsalter_budgetsatz: Alter des Kindein Monaten bis zu dem der Budgetsatz bezogen werden kann. en: >- Age of the child in months up to which the Budgetsatz can be claimed. - unit: Months - reference_period: null + unit: MONTHS type: scalar 2004-01-01: reference: § 5 G. v. 09.02.2004 BGBl. I S. 208 @@ -61,8 +58,7 @@ abolishment_cohort: Erziehungsgeld wird durch das Elterngeld ersetzt. en: >- Erziehungsgeld is replaced by Elterngeld. - unit: Years - reference_period: null + unit: CALENDAR_YEAR type: scalar 2006-12-11: reference: Art. 3 G. v. 5.12.2006 BGBl. I S. 2748 @@ -80,8 +76,7 @@ altersgrenze_für_reduziertes_einkommenslimit_kind_monate: en: >- For children under a certain age, parental leave benefit is not paid if the income of the parents exceeds the relevant income threshold. - unit: Months - reference_period: Year + unit: MONTHS type: scalar 2004-02-09: reference: 09.02.2004 BGBl. I S. 209 diff --git a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py index fe7337d1a1..c9b8a0907e 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -6,10 +6,13 @@ from typing import Any, Literal from gettsim.tt import ( + UNSET_UNIT, AggType, RoundingSpec, + TTSIMUnit, agg_by_group_function, agg_by_p_id_function, + cast_unit, param_function, policy_function, ) @@ -28,6 +31,7 @@ class Einkommensgrenzen: @param_function( start_date="2004-02-09", end_date="2008-12-31", + unit=UNSET_UNIT, ) def einkommensgrenzen( parameter_einkommensgrenze: dict[str, Any], @@ -43,7 +47,9 @@ def einkommensgrenzen( ) -@agg_by_group_function(end_date="2008-12-31", agg_type=AggType.ANY) +@agg_by_group_function( + end_date="2008-12-31", agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS.PER_FG +) def leistungsbegründende_kinder_fg( ist_leistungsbegründendes_kind: bool, fg_id: int, @@ -51,7 +57,9 @@ def leistungsbegründende_kinder_fg( pass -@agg_by_p_id_function(end_date="2008-12-31", agg_type=AggType.SUM) +@agg_by_p_id_function( + end_date="2008-12-31", agg_type=AggType.SUM, unit=TTSIMUnit.CURRENCY.PER_MONTH +) def anspruchshöhe_m( anspruchshöhe_kind_m: float, p_id_empfänger: int, @@ -60,7 +68,9 @@ def anspruchshöhe_m( pass -@policy_function(start_date="2004-01-01", end_date="2008-12-31") +@policy_function( + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def betrag_m( anspruchshöhe_m: float, grundsätzlich_anspruchsberechtigt: bool, @@ -73,11 +83,15 @@ def betrag_m( @policy_function( + start_date="2002-01-01", end_date="2003-12-31", leaf_name="anspruchshöhe_kind_m", - rounding_spec=RoundingSpec(base=0.01, direction="nearest"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest" + ), fail_msg_if_included="""Erziehungsgeld is not implemented yet prior to 2004, see https://github.com/ttsim-dev/gettsim/issues/673""", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anspruchshöhe_kind_ohne_budgetsatz_m() -> float: pass @@ -87,7 +101,10 @@ def anspruchshöhe_kind_ohne_budgetsatz_m() -> float: start_date="2004-01-01", end_date="2008-12-31", leaf_name="anspruchshöhe_kind_m", - rounding_spec=RoundingSpec(base=0.01, direction="nearest"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest" + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anspruchshöhe_kind_mit_budgetsatz_m( ist_leistungsbegründendes_kind: bool, @@ -102,12 +119,18 @@ def anspruchshöhe_kind_mit_budgetsatz_m( Legal reference: BGBl I. v. 17.02.2004 """ if ist_leistungsbegründendes_kind: - return max(basisbetrag_m - abzug_durch_einkommen_m_fg, 0.0) + return max( + basisbetrag_m + - cast_unit(abzug_durch_einkommen_m_fg, TTSIMUnit.CURRENCY.PER_MONTH), + 0.0, + ) else: return 0.0 -@policy_function(start_date="2004-01-01", end_date="2008-12-31") +@policy_function( + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def basisbetrag_m( budgetsatz: bool, anzurechnendes_einkommen_y_fg: float, @@ -130,7 +153,11 @@ def basisbetrag_m( return out -@policy_function(start_date="2004-01-01", end_date="2008-12-31") +@policy_function( + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_FG, +) def abzug_durch_einkommen_m_fg( anzurechnendes_einkommen_m_fg: float, einkommensgrenze_m_fg: float, @@ -156,6 +183,7 @@ def abzug_durch_einkommen_m_fg( start_date="2004-01-01", end_date="2006-12-10", leaf_name="ist_leistungsbegründendes_kind", + unit=TTSIMUnit.DIMENSIONLESS, ) def _leistungsbegründendes_kind_vor_abschaffung( p_id_empfänger: int, @@ -181,6 +209,7 @@ def _leistungsbegründendes_kind_vor_abschaffung( start_date="2006-12-11", end_date="2008-12-31", leaf_name="ist_leistungsbegründendes_kind", + unit=TTSIMUnit.DIMENSIONLESS, ) def _leistungsbegründendes_kind_nach_abschaffung( p_id_empfänger: int, @@ -216,7 +245,9 @@ def _leistungsbegründendes_kind_nach_abschaffung( return out -@policy_function(start_date="2004-01-01", end_date="2008-12-31") +@policy_function( + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def grundsätzlich_anspruchsberechtigt( arbeitsstunden_w: float, leistungsbegründende_kinder_fg: bool, @@ -231,7 +262,11 @@ def grundsätzlich_anspruchsberechtigt( ) -@policy_function(start_date="2004-01-01", end_date="2008-12-31") +@policy_function( + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, +) def anzurechnendes_einkommen_y_fg( bruttolohn_vorjahr_nach_abzug_werbungskosten_y_fg: float, ist_leistungsbegründendes_kind: bool, @@ -254,12 +289,16 @@ def anzurechnendes_einkommen_y_fg( return out -@policy_function(start_date="2004-01-01", end_date="2008-12-31") +@policy_function( + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, +) def einkommensgrenze_y_fg( - einkommensgrenze_ohne_geschwisterbonus: float, + einkommensgrenze_ohne_geschwisterbonus_y_fg: float, familie__anzahl_kinder_fg: int, ist_leistungsbegründendes_kind: bool, - aufschlag_einkommen: float, + erhöhung_einkommensgrenze_pro_kind_y: float, ) -> float: """Income threshold for parental leave benefit (Erziehungsgeld). @@ -267,18 +306,22 @@ def einkommensgrenze_y_fg( """ if ist_leistungsbegründendes_kind: return ( - einkommensgrenze_ohne_geschwisterbonus - + (familie__anzahl_kinder_fg - 1) * aufschlag_einkommen + einkommensgrenze_ohne_geschwisterbonus_y_fg + + (familie__anzahl_kinder_fg - 1) * erhöhung_einkommensgrenze_pro_kind_y ) else: return 0.0 -@policy_function(start_date="2004-01-01", end_date="2008-12-31") -def einkommensgrenze_ohne_geschwisterbonus( +@policy_function( + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, +) +def einkommensgrenze_ohne_geschwisterbonus_y_fg( alter_monate: int, - einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze: float, - einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze: float, + einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y_fg: float, + einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y_fg: float, altersgrenze_für_reduziertes_einkommenslimit_kind_monate: int, ) -> float: """Income threshold for parental leave benefit (Erziehungsgeld) before adding the @@ -287,13 +330,17 @@ def einkommensgrenze_ohne_geschwisterbonus( Legal reference: BGBl I. v. 17.02.2004 S.208 """ if alter_monate < altersgrenze_für_reduziertes_einkommenslimit_kind_monate: - return einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze + return einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y_fg else: - return einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze + return einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y_fg -@policy_function(start_date="2004-01-01", end_date="2008-12-31") -def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze( +@policy_function( + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, +) +def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y_fg( familie__alleinerziehend_fg: bool, budgetsatz: bool, einkommensgrenzen: Einkommensgrenzen, @@ -312,8 +359,12 @@ def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze( return einkommensgrenzen.regulär_paar["regelsatz"] -@policy_function(start_date="2004-01-01", end_date="2008-12-31") -def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze( +@policy_function( + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, +) +def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y_fg( familie__alleinerziehend_fg: bool, budgetsatz: bool, einkommensgrenzen: Einkommensgrenzen, diff --git a/src/gettsim/germany/erziehungsgeld/formel.yaml b/src/gettsim/germany/erziehungsgeld/formel.yaml index 42cf632801..6d770c4579 100644 --- a/src/gettsim/germany/erziehungsgeld/formel.yaml +++ b/src/gettsim/germany/erziehungsgeld/formel.yaml @@ -6,8 +6,7 @@ satz: description: de: Höhe des Erziehungsgeldes abhängig vom beantragtem Satz en: Amount of the parental leave benefit depending on the rate applied for - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: dict 2004-02-09: reference: § 5 G. v. 09.02.2004 BGBl. I S. 208 @@ -30,8 +29,7 @@ parameter_einkommensgrenze: Income threshold for the receipt of parental leave benefit for young children. For children under a certain age, parental leave benefit is not paid if the income of the parents exceeds the income threshold. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: require_converter 2004-02-09: reference: 09.02.2004 BGBl. I S. 209 @@ -52,15 +50,14 @@ parameter_einkommensgrenze: budgetsatz: 16500 2009-01-01: note: Erziehungsgeld revoked and replaced by Elterngeld. -aufschlag_einkommen: +erhöhung_einkommensgrenze_pro_kind_y: name: de: Erhöhung der Einkommensgrenze en: Increase in the income threshold description: de: Erhöhung der Einkommensgrenze pro weiterem Kind en: Increase in the income threshold per additional child - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2004-02-09: reference: 09.02.2004 BGBl. I S. 209 @@ -84,8 +81,7 @@ abschlagsfaktor: exceeding the income threshold after the 7th month of life. The factor is multiplied by the relevant income and the product is deducted from the parental leave benefit entitlement accordingly. - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2004-02-09: reference: § 5 G. v. 09.02.2004 BGBl. I S. 207 @@ -105,8 +101,7 @@ pauschaler_abzug_vom_einkommen: en: >- Factor by which the income is reduced in a lump sum in order to calculate the relevant income - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2004-02-09: reference: § 5 G. v. 09.02.2004 BGBl. I S. 209 diff --git a/src/gettsim/germany/erziehungsgeld/inputs.py b/src/gettsim/germany/erziehungsgeld/inputs.py index 902ecdbe4d..b2ce32757b 100644 --- a/src/gettsim/germany/erziehungsgeld/inputs.py +++ b/src/gettsim/germany/erziehungsgeld/inputs.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import FKType, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input -@policy_input(end_date="2008-12-31") +@policy_input(end_date="2008-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR) def bruttolohn_vorjahr_nach_abzug_werbungskosten_y() -> float: """Gross earnings of the previous calendar year minus Werbungskosten. @@ -16,11 +16,15 @@ def bruttolohn_vorjahr_nach_abzug_werbungskosten_y() -> float: """ -@policy_input(end_date="2008-12-31") +@policy_input(end_date="2008-12-31", unit=TTSIMUnit.DIMENSIONLESS) def budgetsatz() -> bool: """Applied for "Budgetsatz" of parental leave benefit.""" -@policy_input(end_date="2008-12-31", foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF) +@policy_input( + end_date="2008-12-31", + foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, + unit=TTSIMUnit.DIMENSIONLESS, +) def p_id_empfänger() -> int: pass diff --git a/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index 710a6aebad..8572c1ec75 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -10,7 +10,9 @@ from gettsim.tt import ( AggType, + TTSIMUnit, agg_by_group_function, + cast_unit, join, policy_function, ) @@ -21,7 +23,7 @@ from gettsim.typing import BoolColumn, IntColumn -@policy_function(vectorization_strategy="not_required") +@policy_function(vectorization_strategy="not_required", unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_in_familiengemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -51,99 +53,115 @@ def ist_kind_in_familiengemeinschaft( return in_gleicher_fg_wie_elternteil_1 | in_gleicher_fg_wie_elternteil_2 -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG +) def anzahl_kinder_fg(ist_kind_in_familiengemeinschaft: bool, fg_id: int) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_bis_2_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: """Child under the age of 3 in Familiengemeinschaft.""" - return ist_kind_in_familiengemeinschaft and (alter <= 2) + return ist_kind_in_familiengemeinschaft and (alter <= cast_unit(2, TTSIMUnit.YEARS)) -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) def anzahl_kinder_bis_2_fg( ist_kind_bis_2_in_familiengemeinschaft: bool, fg_id: int ) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_bis_5_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: """Child under the age of 6 in Familiengemeinschaft.""" - return ist_kind_in_familiengemeinschaft and (alter <= 5) + return ist_kind_in_familiengemeinschaft and (alter <= cast_unit(5, TTSIMUnit.YEARS)) -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) def anzahl_kinder_bis_5_fg( ist_kind_bis_5_in_familiengemeinschaft: bool, fg_id: int ) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_bis_6_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: """Child under the age of 7 in Familiengemeinschaft.""" - return ist_kind_in_familiengemeinschaft and (alter <= 6) + return ist_kind_in_familiengemeinschaft and (alter <= cast_unit(6, TTSIMUnit.YEARS)) -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG +) def anzahl_kinder_bis_6_fg( ist_kind_bis_6_in_familiengemeinschaft: bool, fg_id: int ) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_bis_15_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: """Child under the age of 16 in Familiengemeinschaft.""" - return ist_kind_in_familiengemeinschaft and (alter <= 15) + return ist_kind_in_familiengemeinschaft and ( + alter <= cast_unit(15, TTSIMUnit.YEARS) + ) -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG +) def anzahl_kinder_bis_15_fg( ist_kind_bis_15_in_familiengemeinschaft: bool, fg_id: int ) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_bis_17_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: """Child under the age of 18 in Familiengemeinschaft.""" - return ist_kind_in_familiengemeinschaft and (alter <= 17) + return ist_kind_in_familiengemeinschaft and ( + alter <= cast_unit(17, TTSIMUnit.YEARS) + ) -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG +) def anzahl_kinder_bis_17_fg( ist_kind_bis_17_in_familiengemeinschaft: bool, fg_id: int ) -> int: pass -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) def anzahl_erwachsene_fg( ist_erwachsener_in_familiengemeinschaft: bool, fg_id: int ) -> int: pass -@agg_by_group_function(agg_type=AggType.MIN) +@agg_by_group_function(agg_type=AggType.MIN, unit=TTSIMUnit.MONTHS.PER_FG) def alter_monate_jüngstes_mitglied_fg(alter_monate: int, fg_id: int) -> int: pass -@policy_function(start_date="2005-01-01", vectorization_strategy="not_required") +@policy_function( + start_date="2005-01-01", + vectorization_strategy="not_required", + unit=TTSIMUnit.DIMENSIONLESS, +) def ist_kind_in_bedarfsgemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -171,7 +189,7 @@ def ist_kind_in_bedarfsgemeinschaft( return in_gleicher_fg_wie_elternteil_1 | in_gleicher_fg_wie_elternteil_2 -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_erwachsener_in_bedarfsgemeinschaft( ist_kind_in_bedarfsgemeinschaft: bool, ) -> bool: @@ -179,12 +197,16 @@ def ist_erwachsener_in_bedarfsgemeinschaft( return not ist_kind_in_bedarfsgemeinschaft -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.COUNT) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_BG +) def anzahl_personen_bg(bg_id: int) -> int: pass -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_BG +) def anzahl_erwachsene_bg( ist_erwachsener_in_bedarfsgemeinschaft: bool, bg_id: int, @@ -192,32 +214,38 @@ def anzahl_erwachsene_bg( pass -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_BG +) def anzahl_kinder_bg(ist_kind_in_bedarfsgemeinschaft: bool, bg_id: int) -> int: pass -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_bis_17_in_bedarfsgemeinschaft( alter: int, ist_kind_in_bedarfsgemeinschaft: bool ) -> bool: """Child under the age of 18 in Bedarfsgemeinschaft.""" - return ist_kind_in_bedarfsgemeinschaft and (alter <= 17) + return ist_kind_in_bedarfsgemeinschaft and (alter <= cast_unit(17, TTSIMUnit.YEARS)) -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_BG +) def anzahl_kinder_bis_17_bg( ist_kind_bis_17_in_bedarfsgemeinschaft: bool, bg_id: int ) -> int: pass -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.ANY) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS.PER_BG +) def alleinerziehend_bg(alleinerziehend: bool, bg_id: int) -> bool: pass -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def hat_kind_in_gleicher_bedarfsgemeinschaft( anzahl_kinder_bg: int, ist_erwachsener_in_bedarfsgemeinschaft: bool, @@ -226,17 +254,21 @@ def hat_kind_in_gleicher_bedarfsgemeinschaft( return anzahl_kinder_bg >= 1 and ist_erwachsener_in_bedarfsgemeinschaft -@agg_by_group_function(agg_type=AggType.COUNT) +@agg_by_group_function(agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_SN) def anzahl_personen_sn(sn_id: int) -> int: pass -@agg_by_group_function(agg_type=AggType.ANY) +@agg_by_group_function(agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS.PER_SN) def alleinerziehend_sn(familie__alleinerziehend: bool, sn_id: int) -> bool: pass -@policy_function(start_date="2005-01-01", vectorization_strategy="not_required") +@policy_function( + start_date="2005-01-01", + vectorization_strategy="not_required", + unit=TTSIMUnit.DIMENSIONLESS, +) def ist_kind_in_einsatzgemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -264,7 +296,7 @@ def ist_kind_in_einsatzgemeinschaft( return in_gleicher_eg_wie_elternteil_1 | in_gleicher_eg_wie_elternteil_2 -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_erwachsener_in_einsatzgemeinschaft( ist_kind_in_einsatzgemeinschaft: bool, ) -> bool: @@ -272,35 +304,41 @@ def ist_erwachsener_in_einsatzgemeinschaft( return not ist_kind_in_einsatzgemeinschaft -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_EG +) def anzahl_kinder_eg(ist_kind_in_einsatzgemeinschaft: bool, eg_id: int) -> int: pass -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_EG +) def anzahl_erwachsene_eg( ist_erwachsener_in_einsatzgemeinschaft: bool, eg_id: int ) -> int: pass -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.COUNT) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_EG +) def anzahl_personen_eg(eg_id: int) -> int: pass -@agg_by_group_function(agg_type=AggType.COUNT) +@agg_by_group_function(agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_EHE) def anzahl_personen_ehe(ehe_id: int) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def volljährig(alter: int) -> bool: - """Person over the age of 18.""" - return alter >= 18 + """Person aged 18 years or older.""" + return alter >= cast_unit(18, TTSIMUnit.YEARS) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_erwachsener_in_familiengemeinschaft( ist_kind_in_familiengemeinschaft: bool, ) -> bool: diff --git a/src/gettsim/germany/familie/inputs.py b/src/gettsim/germany/familie/inputs.py index 922f66af78..bbb5cdb1be 100644 --- a/src/gettsim/germany/familie/inputs.py +++ b/src/gettsim/germany/familie/inputs.py @@ -2,29 +2,37 @@ from __future__ import annotations -from gettsim.tt import AggType, FKType, agg_by_group_function, policy_input +from gettsim.tt import AggType, FKType, TTSIMUnit, agg_by_group_function, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def alleinerziehend() -> bool: """Single parent.""" -@agg_by_group_function(agg_type=AggType.ANY, end_date="2008-12-31") +@agg_by_group_function( + agg_type=AggType.ANY, end_date="2008-12-31", unit=TTSIMUnit.DIMENSIONLESS.PER_FG +) def alleinerziehend_fg(alleinerziehend: bool, fg_id: int) -> bool: """Only used for Erziehungsgeld and even there it might be wrong.""" -@policy_input(foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF) +@policy_input( + foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, unit=TTSIMUnit.DIMENSIONLESS +) def p_id_ehepartner() -> int: """Identifier of married partner.""" -@policy_input(foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF) +@policy_input( + foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, unit=TTSIMUnit.DIMENSIONLESS +) def p_id_elternteil_1() -> int: """Identifier of the first parent.""" -@policy_input(foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF) +@policy_input( + foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, unit=TTSIMUnit.DIMENSIONLESS +) def p_id_elternteil_2() -> int: """Identifier of the second parent.""" diff --git a/src/gettsim/germany/grundsicherung/bedarfe.py b/src/gettsim/germany/grundsicherung/bedarfe.py index d931836e60..6ef410bd19 100644 --- a/src/gettsim/germany/grundsicherung/bedarfe.py +++ b/src/gettsim/germany/grundsicherung/bedarfe.py @@ -1,10 +1,10 @@ from __future__ import annotations from dataclasses import dataclass -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Annotated from gettsim.germany.param_types import Altersgrenzen, SatzMitAltersgrenzen -from gettsim.tt import param_function +from gettsim.tt import UNSET_UNIT, TTSIMUnit, param_function if TYPE_CHECKING: from gettsim.typing import RawParamValue @@ -12,15 +12,15 @@ @dataclass(frozen=True) class Regelbedarfsstufen: - rbs_1: float - rbs_2: float - rbs_3: float + rbs_1: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] + rbs_2: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] + rbs_3: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] rbs_4: SatzMitAltersgrenzen rbs_5: SatzMitAltersgrenzen rbs_6: SatzMitAltersgrenzen -@param_function(start_date="2011-01-01") +@param_function(start_date="2011-01-01", unit=UNSET_UNIT) def regelbedarfsstufen( parameter_regelbedarfsstufen: RawParamValue, ) -> Regelbedarfsstufen: diff --git a/src/gettsim/germany/grundsicherung/bedarfe.yaml b/src/gettsim/germany/grundsicherung/bedarfe.yaml index 47c5b414e2..6495970629 100644 --- a/src/gettsim/germany/grundsicherung/bedarfe.yaml +++ b/src/gettsim/germany/grundsicherung/bedarfe.yaml @@ -21,8 +21,22 @@ parameter_regelbedarfsstufen: 4: Adolescents 5: Older children 6: Youngest children - unit: Euros - reference_period: Month + unit: + 1: EUR_PER_MONTH + 2: EUR_PER_MONTH + 3: EUR_PER_MONTH + 4: + min_alter: YEARS + max_alter: YEARS + betrag: EUR_PER_MONTH + 5: + min_alter: YEARS + max_alter: YEARS + betrag: EUR_PER_MONTH + 6: + min_alter: YEARS + max_alter: YEARS + betrag: EUR_PER_MONTH type: require_converter 2011-01-01: 1: 364 diff --git a/src/gettsim/germany/grundsicherung/hilfe_zum_lebensunterhalt/hilfe_zum_lebensunterhalt.py b/src/gettsim/germany/grundsicherung/hilfe_zum_lebensunterhalt/hilfe_zum_lebensunterhalt.py index 0a6ce4c9e4..b460f11908 100644 --- a/src/gettsim/germany/grundsicherung/hilfe_zum_lebensunterhalt/hilfe_zum_lebensunterhalt.py +++ b/src/gettsim/germany/grundsicherung/hilfe_zum_lebensunterhalt/hilfe_zum_lebensunterhalt.py @@ -1,11 +1,12 @@ """Hilfe zum Lebensunterhalt (SGB XII Kap. 3).""" -from gettsim.tt import param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function @policy_function( fail_msg_if_included="Hilfe zum Lebensunterhalt (SGB XII Kap. 3) is not implemented" " yet, see https://github.com/ttsim-dev/gettsim/issues/1153", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m() -> float: """Hilfe zum Lebensunterhalt per person (§27 ff. SGB XII). @@ -20,7 +21,7 @@ def betrag_m() -> float: return 0.0 # pragma: no cover -@param_function(start_date="2005-01-01") +@param_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_EG) def überschusseinkommen_m_eg() -> float: """Excess HzL income flowing to the parent's Grundsicherung im Alter. diff --git a/src/gettsim/germany/grundsicherung/im_alter/einkommen.py b/src/gettsim/germany/grundsicherung/im_alter/einkommen.py index db1211c2a5..71fbd38f42 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/einkommen.py +++ b/src/gettsim/germany/grundsicherung/im_alter/einkommen.py @@ -8,6 +8,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -21,6 +22,7 @@ @policy_function( end_date="2006-12-31", leaf_name="einkommen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_m_bis_2006( erwerbseinkommen_m: float, @@ -74,6 +76,7 @@ def einkommen_m_bis_2006( start_date="2007-01-01", end_date="2017-12-31", leaf_name="einkommen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_m_ab_2007_bis_2017( erwerbseinkommen_m: float, @@ -124,7 +127,9 @@ def einkommen_m_ab_2007_bis_2017( return max(out, 0.0) -@policy_function(start_date="2018-01-01", leaf_name="einkommen_m") +@policy_function( + start_date="2018-01-01", leaf_name="einkommen_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def einkommen_m_ab_2018( erwerbseinkommen_m: float, einkommen_aus_zusätzlicher_altersvorsorge_m: float, @@ -168,7 +173,7 @@ def einkommen_m_ab_2018( return max(out, 0.0) -@policy_function(start_date="2011-01-01") +@policy_function(start_date="2011-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def erwerbseinkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -192,7 +197,11 @@ def erwerbseinkommen_m( return max(earnings, earnings_after_max_deduction) -@policy_function(end_date="2015-12-31", leaf_name="kapitaleinkommen_brutto_m") +@policy_function( + end_date="2015-12-31", + leaf_name="kapitaleinkommen_brutto_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def kapitaleinkommen_brutto_m_ohne_freibetrag( einnahmen__kapitalerträge_m: float, ) -> float: @@ -200,7 +209,11 @@ def kapitaleinkommen_brutto_m_ohne_freibetrag( return max(0.0, einnahmen__kapitalerträge_m) -@policy_function(start_date="2016-01-01", leaf_name="kapitaleinkommen_brutto_m") +@policy_function( + start_date="2016-01-01", + leaf_name="kapitaleinkommen_brutto_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def kapitaleinkommen_brutto_m_mit_freibetrag( einnahmen__kapitalerträge_y: float, freibetrag_kapitaleinkünfte: float, @@ -214,7 +227,7 @@ def kapitaleinkommen_brutto_m_mit_freibetrag( return max(0.0, per_y_to_per_m(capital_income_y)) -@policy_function(start_date="2018-01-01") +@policy_function(start_date="2018-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_aus_zusätzlicher_altersvorsorge_m( einnahmen__renten__basisrente_m: float, einnahmen__renten__sonstige_private_vorsorge_m: float, @@ -257,7 +270,11 @@ def einkommen_aus_zusätzlicher_altersvorsorge_m( ) -@policy_function(end_date="2020-12-31", leaf_name="gesetzliche_rente_m") +@policy_function( + end_date="2020-12-31", + leaf_name="gesetzliche_rente_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def gesetzliche_rente_m_bis_2020( einnahmen__renten__gesetzliche_m: float, ) -> float: @@ -265,7 +282,11 @@ def gesetzliche_rente_m_bis_2020( return einnahmen__renten__gesetzliche_m -@policy_function(start_date="2021-01-01", leaf_name="gesetzliche_rente_m") +@policy_function( + start_date="2021-01-01", + leaf_name="gesetzliche_rente_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def gesetzliche_rente_m_ab_2021( einnahmen__renten__gesetzliche_m: float, sozialversicherung__rente__grundrente__grundsätzlich_anspruchsberechtigt: bool, diff --git "a/src/gettsim/germany/grundsicherung/im_alter/freibetr\303\244ge_und_mehrbedarfe.yaml" "b/src/gettsim/germany/grundsicherung/im_alter/freibetr\303\244ge_und_mehrbedarfe.yaml" index 58f501bc26..b9191a6e07 100644 --- "a/src/gettsim/germany/grundsicherung/im_alter/freibetr\303\244ge_und_mehrbedarfe.yaml" +++ "b/src/gettsim/germany/grundsicherung/im_alter/freibetr\303\244ge_und_mehrbedarfe.yaml" @@ -14,8 +14,7 @@ parameter_vermögensfreibetrag: assets exceed this threshold. § 1 Verordnung zur Durchführung des § 90 Abs. 2 Nr. 9 des Zwölften Buches Sozialgesetzbuch - unit: Euros - reference_period: null + unit: EUR type: dict 2003-01-01: erwachsene: 2600 @@ -43,8 +42,8 @@ anrechnungsfreier_anteil_gesetzliche_rente: § 82a Abs. 1 und 2 SGB XII Public pension shares not subject to transfer withdrawal for subjects whose Grundrentenzeiten exceeds 33 years. - unit: Share - reference_period: null + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2021-01-01: intervals: @@ -68,8 +67,7 @@ freibetrag_kapitaleinkünfte: § 43 SGB XII Abs. 2 Only the capital income above the threshold is considered for the calculation of the Grundsicherung im Alter. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2016-01-01: value: 26 @@ -86,8 +84,7 @@ anrechnungsfreier_anteil_erwerbseinkünfte: § 82 SGB XII Abs. 3 Share of income, which is not added to the total income when calculating the Grundsicherung. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2005-01-01: value: 0.3 @@ -108,8 +105,8 @@ anrechnungsfreier_anteil_zusätzliche_altersvorsorge: Betriebsrentenstärkungsgesetz v. 17.08.2017, BGBl. I S. 3214). Exemption for income from supplementary old-age provision (occupational pensions, Riester pensions, other voluntary private pensions). - unit: Share - reference_period: null + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2018-01-01: intervals: @@ -120,7 +117,7 @@ anrechnungsfreier_anteil_zusätzliche_altersvorsorge: slope: 1 - interval: '[100, inf)' slope: 0.3 -einkommensgrenze_kinder: +einkommensgrenze_kinder_y: name: de: >- Gesamteinkommensgrenze der Kinder ersten Grades, ab der Grundsicherungsbezug der @@ -137,8 +134,7 @@ einkommensgrenze_kinder: § 43 SGB XII (BGBl. I 2003 S. 3022). If the annual Gesamteinkommen (§ 16 SGB IV) of any child reaches or exceeds this threshold, the parents are excluded from Grundsicherung im Alter. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2005-01-01: value: 100000 @@ -168,8 +164,7 @@ mehrbedarf_bei_schwerbehinderungsgrad_g: § 30 Abs. 1 SGB XII, https://www.buzer.de/gesetz/3415/al0-3758.htm This share of the Regelbedarf is added as for someone who has a severly disabled ID card which shows the code 'G' and is entitled to the Grundsicherung. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2006-12-07: value: 0.17 diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index 84f14519f4..9f5eaf4b7f 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -17,13 +17,19 @@ RegelsatzAnteilsbasiert, ) -from gettsim.tt import AggType, agg_by_p_id_function, policy_function +from gettsim.tt import ( + AggType, + TTSIMUnit, + agg_by_p_id_function, + policy_function, +) @policy_function( start_date="2005-01-01", end_date="2019-12-31", leaf_name="betrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_mit_kindeseinkommensgrenze( anspruchshöhe_m: float, @@ -46,7 +52,9 @@ def betrag_m_mit_kindeseinkommensgrenze( return anspruchshöhe_m -@policy_function(start_date="2020-01-01", leaf_name="betrag_m") +@policy_function( + start_date="2020-01-01", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def betrag_m_ohne_kindeseinkommensgrenze( anspruchshöhe_m: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -80,7 +88,11 @@ def betrag_m_ohne_kindeseinkommensgrenze( return anspruchshöhe_m -@policy_function(end_date="2022-12-31", leaf_name="anspruchshöhe_m") +@policy_function( + end_date="2022-12-31", + leaf_name="anspruchshöhe_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def anspruchshöhe_m_bis_2022( individueller_restbedarf_m: float, individueller_restbedarf_m_eg: float, @@ -117,7 +129,11 @@ def anspruchshöhe_m_bis_2022( ) * anspruch_m_eg -@policy_function(start_date="2023-01-01", leaf_name="anspruchshöhe_m") +@policy_function( + start_date="2023-01-01", + leaf_name="anspruchshöhe_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def anspruchshöhe_m_ab_2023( individueller_restbedarf_m: float, individueller_restbedarf_m_eg: float, @@ -154,7 +170,7 @@ def anspruchshöhe_m_ab_2023( ) * anspruch_m_eg -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def individueller_restbedarf_m( bedarf_m: float, einkommen_zur_verteilung_m: float, @@ -167,7 +183,9 @@ def individueller_restbedarf_m( return max(0.0, bedarf_m - einkommen_zur_verteilung_m) -@policy_function(end_date="2022-12-31", leaf_name="bedarf_m") +@policy_function( + end_date="2022-12-31", leaf_name="bedarf_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def bedarf_m_bis_2022( arbeitslosengeld_2__regelbedarf_m: float, mehrbedarf_schwerbehinderung_g_m: float, @@ -186,7 +204,9 @@ def bedarf_m_bis_2022( return arbeitslosengeld_2__regelbedarf_m + mehrbedarf_schwerbehinderung_g_m -@policy_function(start_date="2023-01-01", leaf_name="bedarf_m") +@policy_function( + start_date="2023-01-01", leaf_name="bedarf_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def bedarf_m_ab_2023( bürgergeld__regelbedarf_m: float, mehrbedarf_schwerbehinderung_g_m: float, @@ -205,7 +225,7 @@ def bedarf_m_ab_2023( return bürgergeld__regelbedarf_m + mehrbedarf_schwerbehinderung_g_m -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_zur_verteilung_m( einkommen_m: float, sozialversicherung__rente__altersrente__hat_regelaltersgrenze_erreicht: bool, @@ -220,7 +240,7 @@ def einkommen_zur_verteilung_m( return einkommen_m -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_EG) def überschusseinkommen_m_eg( einkommen_zur_verteilung_m_eg: float, bedarf_m_eg: float, @@ -235,7 +255,11 @@ def überschusseinkommen_m_eg( return max(0.0, einkommen_zur_verteilung_m_eg - bedarf_m_eg) -@policy_function(end_date="2010-12-31", leaf_name="mehrbedarf_schwerbehinderung_g_m") +@policy_function( + end_date="2010-12-31", + leaf_name="mehrbedarf_schwerbehinderung_g_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def mehrbedarf_schwerbehinderung_g_m_vor_2011( schwerbehindert_grad_g: bool, familie__anzahl_erwachsene_eg: int, @@ -260,7 +284,11 @@ def mehrbedarf_schwerbehinderung_g_m_vor_2011( return out -@policy_function(start_date="2011-01-01", leaf_name="mehrbedarf_schwerbehinderung_g_m") +@policy_function( + start_date="2011-01-01", + leaf_name="mehrbedarf_schwerbehinderung_g_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def mehrbedarf_schwerbehinderung_g_m_ab_2011( schwerbehindert_grad_g: bool, familie__anzahl_erwachsene_eg: int, @@ -289,7 +317,7 @@ def mehrbedarf_schwerbehinderung_g_m_ab_2011( return out -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS.PER_EG) def vermögensgrenze_unterschritten_eg( vermögen_eg: float, vermögensfreibetrag_eg: float, @@ -298,7 +326,7 @@ def vermögensgrenze_unterschritten_eg( return vermögen_eg < vermögensfreibetrag_eg -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_EG) def vermögensfreibetrag_eg( familie__anzahl_kinder_eg: int, familie__anzahl_erwachsene_eg: int, @@ -311,19 +339,19 @@ def vermögensfreibetrag_eg( ) -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def hat_gesamteinkommen_über_kindeseinkommensgrenze( - einkommensteuer__gesamteinkommen_y: float, - einkommensgrenze_kinder: float, + einkünfte__gesamtbetrag_der_einkünfte_y: float, + einkommensgrenze_kinder_y: float, ) -> bool: """Whether a person's Gesamteinkommen exceeds the children's income threshold. Reference: § 43 SGB XII (BGBl. I 2003 S. 3022) """ - return einkommensteuer__gesamteinkommen_y >= einkommensgrenze_kinder + return einkünfte__gesamtbetrag_der_einkünfte_y >= einkommensgrenze_kinder_y -@agg_by_p_id_function(agg_type=AggType.ANY) +@agg_by_p_id_function(agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS) def hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_1( hat_gesamteinkommen_über_kindeseinkommensgrenze: bool, familie__p_id_elternteil_1: int, @@ -332,7 +360,7 @@ def hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_1( pass -@agg_by_p_id_function(agg_type=AggType.ANY) +@agg_by_p_id_function(agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS) def hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_2( hat_gesamteinkommen_über_kindeseinkommensgrenze: bool, familie__p_id_elternteil_2: int, @@ -341,7 +369,7 @@ def hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_2( pass -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def hat_kind_mit_einkommen_über_einkommensgrenze( hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_1: bool, hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_2: bool, diff --git a/src/gettsim/germany/hh_characteristics.py b/src/gettsim/germany/hh_characteristics.py index 47b14f443e..e4fbda739c 100644 --- a/src/gettsim/germany/hh_characteristics.py +++ b/src/gettsim/germany/hh_characteristics.py @@ -1,8 +1,8 @@ from __future__ import annotations -from gettsim.tt import AggType, agg_by_group_function +from gettsim.tt import AggType, TTSIMUnit, agg_by_group_function -@agg_by_group_function(agg_type=AggType.COUNT) +@agg_by_group_function(agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_HH) def anzahl_personen_hh(hh_id: int) -> int: pass diff --git a/src/gettsim/germany/ids.py b/src/gettsim/germany/ids.py index f27e624601..d616f34ac5 100644 --- a/src/gettsim/germany/ids.py +++ b/src/gettsim/germany/ids.py @@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Literal from gettsim.germany import WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC -from gettsim.tt import group_creation_function, policy_input +from gettsim.tt import TTSIMUnit, group_creation_function, policy_input if TYPE_CHECKING: from types import ModuleType @@ -14,17 +14,17 @@ from gettsim.typing import BoolColumn, IntColumn -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def p_id() -> int: """Unique identifier for each person. Always required, must be unique.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def hh_id() -> int: """Individuals living together in a household in the Wohngeld sense (§5 WoGG).""" -@group_creation_function() +@group_creation_function(unit=TTSIMUnit.DIMENSIONLESS) def ehe_id( p_id: IntColumn, familie__p_id_ehepartner: IntColumn, @@ -43,7 +43,9 @@ def ehe_id( ) -@group_creation_function(leaf_name="fg_id", end_date="2022-12-31") +@group_creation_function( + leaf_name="fg_id", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def fg_id_arbeitslosengeld_2( arbeitslosengeld_2__p_id_einstandspartner: IntColumn, p_id: IntColumn, @@ -71,7 +73,9 @@ def fg_id_arbeitslosengeld_2( ) -@group_creation_function(leaf_name="fg_id", start_date="2023-01-01") +@group_creation_function( + leaf_name="fg_id", start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS +) def fg_id_bürgergeld( bürgergeld__p_id_einstandspartner: IntColumn, p_id: IntColumn, @@ -178,7 +182,10 @@ def _assign_parents_fg_id( ) -@group_creation_function(warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC) +@group_creation_function( + warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC, + unit=TTSIMUnit.DIMENSIONLESS, +) def bg_id( fg_id: IntColumn, # xnp is needed to instantiate the GroupCreationFunction (because of `reorder_ids`) @@ -201,7 +208,9 @@ def bg_id( return fg_id -@group_creation_function(leaf_name="eg_id", end_date="2022-12-31") +@group_creation_function( + leaf_name="eg_id", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def eg_id_arbeitslosengeld_2( arbeitslosengeld_2__p_id_einstandspartner: IntColumn, p_id: IntColumn, @@ -229,7 +238,9 @@ def eg_id_arbeitslosengeld_2( ) -@group_creation_function(leaf_name="eg_id", start_date="2023-01-01") +@group_creation_function( + leaf_name="eg_id", start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS +) def eg_id_bürgergeld( bürgergeld__p_id_einstandspartner: IntColumn, p_id: IntColumn, @@ -332,7 +343,10 @@ def _assign_parents_eg_id( ) -@group_creation_function(warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC) +@group_creation_function( + warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC, + unit=TTSIMUnit.DIMENSIONLESS, +) def wthh_id( fg_id: IntColumn, xnp: ModuleType, # noqa: ARG001 @@ -355,7 +369,7 @@ def wthh_id( return fg_id -@group_creation_function() +@group_creation_function(unit=TTSIMUnit.DIMENSIONLESS) def sn_id( p_id: IntColumn, familie__p_id_ehepartner: IntColumn, diff --git a/src/gettsim/germany/individual_characteristics.py b/src/gettsim/germany/individual_characteristics.py index 9a381cd6f4..ef85005cda 100644 --- a/src/gettsim/germany/individual_characteristics.py +++ b/src/gettsim/germany/individual_characteristics.py @@ -1,12 +1,12 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def alter_bis_24(alter: int) -> bool: """Age is 24 years at most. Trivial, but necessary in order to use the target for aggregation. """ - return alter <= 24 # noqa: PLR2004 + return alter <= cast_unit(24, TTSIMUnit.YEARS) diff --git a/src/gettsim/germany/inputs.py b/src/gettsim/germany/inputs.py index 749df972a4..dc2fc0a9b1 100644 --- a/src/gettsim/germany/inputs.py +++ b/src/gettsim/germany/inputs.py @@ -2,61 +2,61 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.YEARS) def alter() -> int: """Age in years.""" # TODO(@MImmesberger): Remove once evaluation date is available. # https://github.com/ttsim-dev/gettsim/issues/211 -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def alter_monate() -> int: """Age in months.""" -@policy_input() +@policy_input(unit=TTSIMUnit.HOURS.PER_WEEK) def arbeitsstunden_w() -> float: """Working hours.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def behinderungsgrad() -> int: pass -@policy_input() +@policy_input(unit=TTSIMUnit.CALENDAR_YEAR) def geburtsjahr() -> int: """Birth year.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CALENDAR_MONTH) def geburtsmonat() -> int: """Month of birth (within year).""" -@policy_input() +@policy_input(unit=TTSIMUnit.CALENDAR_DAY) def geburtstag() -> int: """Day of birth (within month).""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def schwerbehindert_grad_g() -> bool: pass -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY) def vermögen() -> float: """Assets for means testing on individual level. {ref}`See this page for more details. `""" -@policy_input(end_date="2017-12-31") +@policy_input(end_date="2017-12-31", unit=TTSIMUnit.DIMENSIONLESS) def weiblich() -> bool: """Female.""" -@policy_input(end_date="2024-12-31") +@policy_input(end_date="2024-12-31", unit=TTSIMUnit.DIMENSIONLESS.PER_HH) def wohnort_ost_hh() -> bool: """Whether the household is located in the new Länder (Beitrittsgebiet).""" diff --git a/src/gettsim/germany/kinderbonus/kinderbonus.py b/src/gettsim/germany/kinderbonus/kinderbonus.py index 256f588c18..75f3b4532f 100644 --- a/src/gettsim/germany/kinderbonus/kinderbonus.py +++ b/src/gettsim/germany/kinderbonus/kinderbonus.py @@ -2,14 +2,16 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(start_date="2020-01-01", end_date="2021-12-31") -def betrag_y(kindergeld__betrag_y: float, satz: float) -> float: +@policy_function( + start_date="2020-01-01", end_date="2021-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR +) +def betrag_y(kindergeld__betrag_y: float, satz_y: float) -> float: """Calculate Kinderbonus for an individual child. (one-time payment, non-allowable against transfer payments) """ - return satz if kindergeld__betrag_y > 0 else 0.0 + return satz_y if kindergeld__betrag_y > 0 else 0.0 diff --git a/src/gettsim/germany/kinderbonus/kinderbonus.yaml b/src/gettsim/germany/kinderbonus/kinderbonus.yaml index d759f4af43..0215326f90 100644 --- a/src/gettsim/germany/kinderbonus/kinderbonus.yaml +++ b/src/gettsim/germany/kinderbonus/kinderbonus.yaml @@ -1,5 +1,5 @@ --- -satz: +satz_y: name: de: Kinderbonus pro Kind en: Child bonus (one-time payment) @@ -9,8 +9,7 @@ satz: 2020 bzw. Mai 2021 ausgezahlt, aber ist hier auf das volle Kalenderjahr angerechnet. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2020-01-01: reference: Art. 1 Zweites Corona-Steuerhilfegesetz v. 29.06.2020 BGBl. I S. 1512 diff --git a/src/gettsim/germany/kindergeld/inputs.py b/src/gettsim/germany/kindergeld/inputs.py index ac13b15478..f66ed2b403 100644 --- a/src/gettsim/germany/kindergeld/inputs.py +++ b/src/gettsim/germany/kindergeld/inputs.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import FKType, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def in_ausbildung() -> bool: """In education according to Kindergeld definition.""" -@policy_input(foreign_key_type=FKType.MAY_POINT_TO_SELF) +@policy_input(foreign_key_type=FKType.MAY_POINT_TO_SELF, unit=TTSIMUnit.DIMENSIONLESS) def p_id_empfänger() -> int: """Identifier of person who receives Kindergeld for the particular child.""" diff --git a/src/gettsim/germany/kindergeld/kindergeld.py b/src/gettsim/germany/kindergeld/kindergeld.py index 962b05f370..59beebdd2e 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -5,9 +5,13 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, AggType, ConsecutiveIntLookupTableParamValue, + TTSIMUnit, + agg_by_group_function, agg_by_p_id_function, + cast_unit, get_consecutive_int_lookup_table_param_value, join, param_function, @@ -20,7 +24,7 @@ from gettsim.typing import BoolColumn, IntColumn -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS) def anzahl_ansprüche( ist_leistungsbegründendes_kind: bool, p_id_empfänger: int, @@ -29,10 +33,24 @@ def anzahl_ansprüche( pass -@policy_function(start_date="2023-01-01", leaf_name="betrag_m") +@agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS) +def anzahl_ansprüche_sn( + anzahl_ansprüche: int, + sn_id: int, +) -> int: + """Number of Kindergeld claims per Steuernummer. + + Dedicated function to pass the dimensionless unit instead of the inferred person + count. + """ + + +@policy_function( + start_date="2023-01-01", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def betrag_ohne_staffelung_m( anzahl_ansprüche: int, - satz: float, + satz_m: float, ) -> float: """Sum of Kindergeld for eligible children. @@ -40,10 +58,12 @@ def betrag_ohne_staffelung_m( of children. """ - return satz * anzahl_ansprüche + return satz_m * anzahl_ansprüche -@policy_function(end_date="2022-12-31", leaf_name="betrag_m") +@policy_function( + end_date="2022-12-31", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def betrag_gestaffelt_m( anzahl_ansprüche: int, satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, @@ -54,13 +74,16 @@ def betrag_gestaffelt_m( being claimed for. """ - return satz_nach_anzahl_kinder.look_up(anzahl_ansprüche) + return cast_unit( + satz_nach_anzahl_kinder.look_up(anzahl_ansprüche), TTSIMUnit.CURRENCY.PER_MONTH + ) @policy_function( end_date="1995-12-31", leaf_name="ist_leistungsbegründendes_kind", fail_msg_if_included="Kindergeld eligibility is not implemented prior to 1996.", + unit=TTSIMUnit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_lohn_bis_1995() -> bool: pass @@ -70,13 +93,14 @@ def leistungsbegründendes_kind_nach_lohn_bis_1995() -> bool: start_date="1996-01-01", end_date="2011-12-31", leaf_name="ist_leistungsbegründendes_kind", + unit=TTSIMUnit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_lohn( alter: int, in_ausbildung: bool, einnahmen__bruttolohn_y: float, altersgrenze: dict[str, int], - maximales_einkommen_des_kindes: float, + maximales_einkommen_des_kindes_y: float, ) -> bool: """Child gives rise to a Kindergeld claim. @@ -88,13 +112,14 @@ def leistungsbegründendes_kind_nach_lohn( return (alter < altersgrenze["ohne_bedingungen"]) or ( (alter < altersgrenze["mit_bedingungen"]) and in_ausbildung - and (einnahmen__bruttolohn_y <= maximales_einkommen_des_kindes) + and (einnahmen__bruttolohn_y <= maximales_einkommen_des_kindes_y) ) @policy_function( start_date="2012-01-01", leaf_name="ist_leistungsbegründendes_kind", + unit=TTSIMUnit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_stunden( alter: int, @@ -116,16 +141,16 @@ def leistungsbegründendes_kind_nach_stunden( ) -@policy_function(end_date="2015-12-31") +@policy_function(end_date="2015-12-31", unit=TTSIMUnit.DIMENSIONLESS) def kind_bis_10_mit_kindergeld( alter: int, ist_leistungsbegründendes_kind: bool, ) -> bool: """Child under the age of 11 and eligible for Kindergeld.""" - return ist_leistungsbegründendes_kind and (alter <= 10) # noqa: PLR2004 + return ist_leistungsbegründendes_kind and (alter <= cast_unit(10, TTSIMUnit.YEARS)) -@policy_function(vectorization_strategy="not_required") +@policy_function(vectorization_strategy="not_required", unit=TTSIMUnit.DIMENSIONLESS) def gleiche_fg_wie_empfänger( p_id: IntColumn, p_id_empfänger: IntColumn, @@ -144,7 +169,7 @@ def gleiche_fg_wie_empfänger( return fg_id_kindergeldempfänger == fg_id -@param_function(end_date="2022-12-31") +@param_function(end_date="2022-12-31", unit=UNSET_UNIT) def satz_nach_anzahl_kinder( satz_gestaffelt: dict[int, float], xnp: ModuleType, diff --git a/src/gettsim/germany/kindergeld/kindergeld.yaml b/src/gettsim/germany/kindergeld/kindergeld.yaml index 41160d949d..d16546d6ee 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.yaml +++ b/src/gettsim/germany/kindergeld/kindergeld.yaml @@ -14,8 +14,7 @@ altersgrenze: Underage children are entitled to child benefit without any conditions. Also adult children up to a specified age are entitled to child benefit under certain conditions. - unit: Years - reference_period: null + unit: YEARS type: dict 1984-01-01: mit_bedingungen: 27 @@ -34,70 +33,70 @@ satz_gestaffelt: Steuerpflichtige relevant (d.h. Ausländer mit Erwerbstätigkeit in Deutschland). Für Werte vor 2002, siehe 'BMF - Datensammlung zur Steuerpolitik' en: null - unit: Euros - reference_period: Month type: require_converter 1975-01-01: - 1: 26 - 2: 36 - 3: 61 - 4: 61 + unit: DM_PER_MONTH + 1: 50 + 2: 70 + 3: 120 + 4: 120 1978-01-01: - 1: 26 - 2: 41 - 3: 77 - 4: 77 + 1: 50 + 2: 80 + 3: 150 + 4: 150 1979-01-01: - 1: 26 - 2: 51 - 3: 102 - 4: 102 + 1: 50 + 2: 100 + 3: 200 + 4: 200 1979-07-01: - 1: 26 - 2: 61 - 3: 102 - 4: 102 + 1: 50 + 2: 120 + 3: 200 + 4: 200 1981-02-01: - 1: 26 - 2: 61 - 3: 123 - 4: 123 + 1: 50 + 2: 120 + 3: 240 + 4: 240 1982-01-01: - 1: 26 - 2: 51 - 3: 112 - 4: 123 + 1: 50 + 2: 100 + 3: 220 + 4: 240 1990-07-01: - 1: 26 - 2: 66 - 3: 112 - 4: 123 + 1: 50 + 2: 130 + 3: 220 + 4: 240 1992-01-01: - 1: 36 - 2: 66 - 3: 112 - 4: 123 + 1: 70 + 2: 130 + 3: 220 + 4: 240 1996-01-01: - 1: 102 - 2: 102 - 3: 153 - 4: 179 + 1: 200 + 2: 200 + 3: 300 + 4: 350 1997-01-01: - 1: 112 - 2: 112 - 3: 153 - 4: 179 + 1: 220 + 2: 220 + 3: 300 + 4: 350 1999-01-01: - 1: 128 - 2: 128 - 3: 153 - 4: 179 + 1: 250 + 2: 250 + 3: 300 + 4: 350 2000-01-01: - 1: 138 - 2: 138 - 3: 153 - 4: 179 + 1: 270 + 2: 270 + 3: 300 + 4: 350 2002-01-01: + unit: EUR_PER_MONTH 1: 154 2: 154 3: 154 @@ -159,7 +158,7 @@ satz_gestaffelt: 4: 250 2023-01-01: note: Superseded by satz -satz: +satz_m: name: de: Kindergeld pro Kind, identisch für alle Kinder. en: Child benefit amount, depending on succession of children. @@ -169,8 +168,7 @@ satz: Steuerpflichtige relevant (d.h. Ausländer mit Erwerbstätigkeit in Deutschland). Für Werte vor 2002, siehe 'BMF - Datensammlung zur Steuerpolitik' en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2023-01-01: value: 250 @@ -184,7 +182,7 @@ satz: value: 259 reference: Art. 6 G. v. 30.12.2024 BGBl. 2024 Nr. 449. note: Steuerfortentwicklungsgesetz (SteFeG) 2024 -maximales_einkommen_des_kindes: +maximales_einkommen_des_kindes_y: name: de: Einkommensgrenze der Kinder, ab welcher kein Kindergeldanspruch besteht en: Income ceiling for children in order to get child benefit. @@ -193,20 +191,22 @@ maximales_einkommen_des_kindes: § 32 (4) EStG. Wurde 2012 durch eine Höchstgrenze der gearbeiteten Stunden ersetzt. en: null - unit: Euros - reference_period: Year type: scalar 1996-01-01: - value: 6136 + unit: DM_PER_YEAR + value: 12000 reference: Art. 1 G. v. 11.10.1995 BGBl. I S. 1250 - note: Originalwert 12000 DM. 1999-01-01: - value: 6657 + value: 13020 + reference: Art. 1 G. v. 11.10.1995 BGBl. I S. 1250 + note: >- + § 32 Abs. 4 Satz 2 EStG ist ab dem Veranlagungszeitraum 1999 mit dem Betrag von + 13 020 Deutsche Mark anzuwenden. 2000-01-01: - value: 6902 - 2001-01-01: - value: 7179 + value: 13500 + reference: Art. 1 G. v. 28.12.1999 BGBl. I S. 2552. 2002-01-01: + unit: EUR_PER_YEAR value: 7188 reference: Art. 1 G. v. 16.08.2001 BGBl. I S. 2074 2004-01-01: @@ -226,13 +226,12 @@ maximale_arbeitsstunden_des_kindes: §32 (4) S. 3 EStG. Maximale Anzahl von erlaubten Wochenstunden des Kindes für den Bezug von Kindergeld en: null - unit: Hours - reference_period: Week + unit: HOURS_PER_WEEK type: scalar 2012-01-01: value: 20 reference: Art. 1 G. v. 01.11.2011 BGBl. I S. 2131 -kinderbonus_pro_kind: +kinderbonus_pro_kind_y: name: de: Kinderbonus pro Kind en: Child bonus (one-time payment) @@ -242,8 +241,7 @@ kinderbonus_pro_kind: 2020 bzw. Mai 2021 ausgezahlt, aber ist hier auf das volle Kalenderjahr angerechnet. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2020-01-01: reference: Art. 1 Zweites Corona-Steuerhilfegesetz v. 29.06.2020 BGBl. I S. 1512 diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 4e4fb38920..0fa2d53444 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -11,8 +11,10 @@ ExistenzminimumNachAufwendungenOhneBildungUndTeilhabe, ) from gettsim.tt import ( + UNSET_UNIT, AggType, RoundingSpec, + TTSIMUnit, agg_by_group_function, param_function, policy_function, @@ -22,13 +24,18 @@ from gettsim.typing import RawParamValue -@agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) +@agg_by_group_function( + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_BG +) def anzahl_kinder_bg(kindergeld__anzahl_ansprüche: int, bg_id: int) -> int: pass @policy_function( - leaf_name="bruttoeinkommen_eltern_m", start_date="2005-01-01", end_date="2022-12-31" + leaf_name="bruttoeinkommen_eltern_m", + start_date="2005-01-01", + end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttoeinkommen_eltern_m_bis_2022( arbeitslosengeld_2__bruttoeinkommen_m: float, @@ -49,7 +56,11 @@ def bruttoeinkommen_eltern_m_bis_2022( return out -@policy_function(leaf_name="bruttoeinkommen_eltern_m", start_date="2023-01-01") +@policy_function( + leaf_name="bruttoeinkommen_eltern_m", + start_date="2023-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def bruttoeinkommen_eltern_m_ab_2023( bürgergeld__bruttoeinkommen_m: float, familie__hat_kind_in_gleicher_bedarfsgemeinschaft: bool, @@ -73,7 +84,13 @@ def bruttoeinkommen_eltern_m_ab_2023( leaf_name="nettoeinkommen_eltern_m", start_date="2005-01-01", end_date="2019-06-30", - rounding_spec=RoundingSpec(base=10, direction="down", reference="§ 6a Abs. 4 BKGG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, + base=10, + direction="down", + reference="§ 6a Abs. 4 BKGG", + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_grober_rundung( arbeitslosengeld_2__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -95,7 +112,13 @@ def nettoeinkommen_eltern_m_mit_grober_rundung( leaf_name="nettoeinkommen_eltern_m", start_date="2019-07-01", end_date="2022-12-31", - rounding_spec=RoundingSpec(base=1, direction="down", reference="§ 11 Abs. 2 BKGG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, + base=1, + direction="down", + reference="§ 11 Abs. 2 BKGG", + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_genauer_rundung_bis_2022( arbeitslosengeld_2__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -116,7 +139,13 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_bis_2022( @policy_function( leaf_name="nettoeinkommen_eltern_m", start_date="2023-01-01", - rounding_spec=RoundingSpec(base=1, direction="down", reference="§ 11 Abs. 2 BKGG"), + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, + base=1, + direction="down", + reference="§ 11 Abs. 2 BKGG", + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( bürgergeld__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -137,11 +166,12 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( @policy_function( start_date="2005-01-01", end_date="2019-06-30", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def maximales_nettoeinkommen_m_bg( erwachsenenbedarf_m_bg: float, anzahl_kinder_bg: int, - satz: float, + satz_m: float, ) -> float: """Calculate maximum income to be eligible for additional child benefit (Kinderzuschlag). @@ -149,10 +179,10 @@ def maximales_nettoeinkommen_m_bg( There is a maximum income threshold, depending on the need, plus the potential kiz receipt (§6a (1) Nr. 3 BKGG). """ - return erwachsenenbedarf_m_bg + satz * anzahl_kinder_bg + return erwachsenenbedarf_m_bg + satz_m * anzahl_kinder_bg -@policy_function(start_date="2008-10-01") +@policy_function(start_date="2008-10-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) def mindestbruttoeinkommen_m_bg( anzahl_kinder_bg: int, familie__alleinerziehend_bg: bool, @@ -164,16 +194,14 @@ def mindestbruttoeinkommen_m_bg( BKGG). """ if anzahl_kinder_bg == 0: - out = 0.0 + return 0.0 elif familie__alleinerziehend_bg: - out = mindesteinkommen["single"] + return mindesteinkommen["single"] else: - out = mindesteinkommen["paar"] - - return out + return mindesteinkommen["paar"] -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) def anzurechnendes_einkommen_eltern_m_bg( nettoeinkommen_eltern_m_bg: float, erwachsenenbedarf_m_bg: float, @@ -194,6 +222,7 @@ def anzurechnendes_einkommen_eltern_m_bg( leaf_name="kosten_der_unterkunft_m_bg", start_date="2005-01-01", end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def kosten_der_unterkunft_m_bg_bis_2022( wohnbedarf_anteil_eltern_bg: float, @@ -211,7 +240,11 @@ def kosten_der_unterkunft_m_bg_bis_2022( return wohnbedarf_anteil_eltern_bg * warmmiete_m_bg -@policy_function(leaf_name="kosten_der_unterkunft_m_bg", start_date="2023-01-01") +@policy_function( + leaf_name="kosten_der_unterkunft_m_bg", + start_date="2023-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, +) def kosten_der_unterkunft_m_bg_ab_2023( wohnbedarf_anteil_eltern_bg: float, bürgergeld__bruttokaltmiete_m_bg: float, @@ -230,6 +263,7 @@ def kosten_der_unterkunft_m_bg_ab_2023( start_date="2005-01-01", end_date="2011-12-31", leaf_name="existenzminimum", + unit=UNSET_UNIT, ) def existenzminimum_ohne_bildung_und_teilhabe( parameter_existenzminimum: RawParamValue, @@ -257,7 +291,7 @@ def existenzminimum_ohne_bildung_und_teilhabe( ) -@param_function(start_date="2012-01-01", leaf_name="existenzminimum") +@param_function(start_date="2012-01-01", leaf_name="existenzminimum", unit=UNSET_UNIT) def existenzminimum_mit_bildung_und_teilhabe( parameter_existenzminimum: RawParamValue, ) -> ExistenzminimumNachAufwendungenMitBildungUndTeilhabe: @@ -287,7 +321,7 @@ def existenzminimum_mit_bildung_und_teilhabe( ) -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def wohnbedarf_anteil_eltern_bg( anzahl_kinder_bg: int, familie__alleinerziehend_bg: bool, @@ -320,7 +354,10 @@ def wohnbedarf_anteil_eltern_bg( @policy_function( - leaf_name="erwachsenenbedarf_m_bg", start_date="2005-01-01", end_date="2022-12-31" + leaf_name="erwachsenenbedarf_m_bg", + start_date="2005-01-01", + end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def erwachsenenbedarf_m_bg_bis_2022( arbeitslosengeld_2__erwachsenensatz_m_bg: float, @@ -330,7 +367,11 @@ def erwachsenenbedarf_m_bg_bis_2022( return arbeitslosengeld_2__erwachsenensatz_m_bg + kosten_der_unterkunft_m_bg -@policy_function(leaf_name="erwachsenenbedarf_m_bg", start_date="2023-01-01") +@policy_function( + leaf_name="erwachsenenbedarf_m_bg", + start_date="2023-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, +) def erwachsenenbedarf_m_bg_ab_2023( bürgergeld__erwachsenensatz_m_bg: float, kosten_der_unterkunft_m_bg: float, diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index 5afd3a24cf..8eb7541f9f 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -6,7 +6,7 @@ from ttsim.unit_converters import per_y_to_per_m -from gettsim.tt import param_function, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, param_function, policy_function if TYPE_CHECKING: from gettsim.germany.param_types import ( @@ -15,10 +15,15 @@ from gettsim.tt import ConsecutiveIntLookupTableParamValue -@param_function(start_date="2021-01-01", end_date="2022-12-31", leaf_name="satz") +@param_function( + start_date="2021-01-01", + end_date="2022-12-31", + leaf_name="satz_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def satz_mit_gestaffeltem_kindergeld( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, - kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, + kindergeld__satz_gestaffelt: ConsecutiveIntLookupTableParamValue, satz_vorjahr_ohne_kindersofortzuschlag: float, ) -> float: """Prior to 2021, the maximum amount of the Kinderzuschlag was specified directly in @@ -35,12 +40,14 @@ def satz_mit_gestaffeltem_kindergeld( + existenzminimum.kosten_der_unterkunft.kind + existenzminimum.heizkosten.kind ) - - kindergeld__satz_nach_anzahl_kinder.look_up(1), + - kindergeld__satz_gestaffelt.look_up(1), satz_vorjahr_ohne_kindersofortzuschlag, ) -@param_function(leaf_name="satz", start_date="2024-01-01") +@param_function( + leaf_name="satz_m", start_date="2024-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, kindergeld__satz: float, @@ -67,7 +74,7 @@ def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( return satz_ohne_kindersofortzuschlag + bürgergeld__kindersofortzuschlag -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) def betrag_m_bg( anspruchshöhe_m_bg: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -79,7 +86,7 @@ def betrag_m_bg( return 0.0 -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anspruchshöhe_m( anspruchshöhe_m_bg: float, familie__anzahl_personen_bg: int, @@ -88,7 +95,7 @@ def anspruchshöhe_m( return anspruchshöhe_m_bg / familie__anzahl_personen_bg -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) def anspruchshöhe_m_bg( basisbetrag_m_bg: float, vermögen_bg: float, @@ -96,8 +103,13 @@ def anspruchshöhe_m_bg( ) -> float: """Kinderzuschlag claim at the Bedarfsgemeinschaft level.""" if vermögen_bg > vermögensfreibetrag_bg: + # Excess wealth reduces the monthly claim (a stock netted against a flow). out = max( - basisbetrag_m_bg - (vermögen_bg - vermögensfreibetrag_bg), + basisbetrag_m_bg + - cast_unit( + vermögen_bg - vermögensfreibetrag_bg, + TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, + ), 0.0, ) else: @@ -109,6 +121,7 @@ def anspruchshöhe_m_bg( start_date="2005-01-01", end_date="2022-12-31", leaf_name="vermögensfreibetrag_bg", + unit=TTSIMUnit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg_bis_2022( arbeitslosengeld_2__vermögensfreibetrag_bg: float, @@ -117,7 +130,11 @@ def vermögensfreibetrag_bg_bis_2022( return arbeitslosengeld_2__vermögensfreibetrag_bg -@policy_function(start_date="2023-01-01", leaf_name="vermögensfreibetrag_bg") +@policy_function( + start_date="2023-01-01", + leaf_name="vermögensfreibetrag_bg", + unit=TTSIMUnit.CURRENCY.PER_BG, +) def vermögensfreibetrag_bg_ab_2023( bürgergeld__vermögensfreibetrag_in_karenzzeit_bg: float, ) -> float: @@ -129,6 +146,7 @@ def vermögensfreibetrag_bg_ab_2023( start_date="2005-01-01", end_date="2008-09-30", leaf_name="basisbetrag_m_bg", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_maximales_netteinkommen( nettoeinkommen_eltern_m_bg: float, @@ -147,9 +165,9 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( (familie__anzahl_erwachsene_bg >= 1). """ - if ( - nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg - ) and familie__anzahl_erwachsene_bg >= 1: + if (nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg) and ( + familie__anzahl_erwachsene_bg >= 1 + ): out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: out = 0.0 @@ -161,6 +179,7 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( start_date="2008-10-01", end_date="2019-06-30", leaf_name="basisbetrag_m_bg", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( bruttoeinkommen_eltern_m_bg: float, @@ -185,7 +204,7 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( if ( (bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg) and (nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg) - and familie__anzahl_erwachsene_bg >= 1 + and (familie__anzahl_erwachsene_bg >= 1) ): out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: @@ -194,7 +213,11 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( return out -@policy_function(start_date="2019-07-01", leaf_name="basisbetrag_m_bg") +@policy_function( + start_date="2019-07-01", + leaf_name="basisbetrag_m_bg", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, +) def basisbetrag_m_bg_check_mindestbruttoeinkommen( bruttoeinkommen_eltern_m_bg: float, mindestbruttoeinkommen_m_bg: float, @@ -212,9 +235,9 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( (familie__anzahl_erwachsene_bg >= 1). """ - if ( - bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg - ) and familie__anzahl_erwachsene_bg >= 1: + if (bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg) and ( + familie__anzahl_erwachsene_bg >= 1 + ): out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: out = 0.0 @@ -223,7 +246,10 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( @policy_function( - leaf_name="basisbetrag_kind_m", start_date="2005-01-01", end_date="2022-12-31" + leaf_name="basisbetrag_kind_m", + start_date="2005-01-01", + end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def basisbetrag_kind_m_bis_2022( kindergeld__ist_leistungsbegründendes_kind: bool, @@ -231,12 +257,12 @@ def basisbetrag_kind_m_bis_2022( unterhalt__tatsächlich_erhaltener_betrag_m: float, unterhaltsvorschuss__betrag_m: float, arbeitslosengeld_2__anrechnungsfreies_einkommen_m: float, - satz: float, + satz_m: float, entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" out = kindergeld__ist_leistungsbegründendes_kind * ( - satz + satz_m - entzugsrate_kindeseinkommen * ( einnahmen__bruttolohn_m @@ -249,19 +275,23 @@ def basisbetrag_kind_m_bis_2022( return max(out, 0.0) -@policy_function(leaf_name="basisbetrag_kind_m", start_date="2023-01-01") +@policy_function( + leaf_name="basisbetrag_kind_m", + start_date="2023-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def basisbetrag_kind_m_ab_2023( kindergeld__ist_leistungsbegründendes_kind: bool, einnahmen__bruttolohn_m: float, unterhalt__tatsächlich_erhaltener_betrag_m: float, unterhaltsvorschuss__betrag_m: float, bürgergeld__anrechnungsfreies_einkommen_m: float, - satz: float, + satz_m: float, entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" out = kindergeld__ist_leistungsbegründendes_kind * ( - satz + satz_m - entzugsrate_kindeseinkommen * ( einnahmen__bruttolohn_m diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml index 9ad12a1426..a5d7147144 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml @@ -1,13 +1,12 @@ --- -satz: +satz_m: name: de: Maximaler Kinderzuschlagsatz pro Kind en: Maximum amount of Kinderzuschlag per child description: de: § 6a (2) BKGG. Betrag pro Kind en: Amount per child. - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2005-01-01: value: 140 @@ -34,8 +33,7 @@ satz_vorjahr_ohne_kindersofortzuschlag: description: de: § 6a (2) BKGG legt fest, dass der Kinderzuschlag nicht sinken darf en: § 6a (2) BKGG sets that the Kinderzuschlag cannot decrease. - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2021-01-01: value: 185 @@ -56,8 +54,7 @@ mindesteinkommen: description: de: § 6a (1) Nr. 2 BKGG. en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH.PER_BG type: dict 2008-10-01: single: 600 @@ -74,8 +71,7 @@ entzugsrate_elterneinkommen: Eltern gemindert wird. Bis 07/2019 wurde das Einkommen nur in 10€-Schritten berücksichtigt. en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2005-01-01: value: 0.7 @@ -96,8 +92,7 @@ entzugsrate_kindeseinkommen: Unterhaltsvorschuss. en: >- Child alimony and alimony advance payments are also attributed to the child. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2005-01-01: value: 1 @@ -118,8 +113,7 @@ parameter_existenzminimum: en: >- Every two years, the government calculates the subsistence levels 'to be allowed from taxation'. These form the basis for a number of kiz parameters. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: require_converter 2005-01-01: regelsatz: @@ -394,8 +388,7 @@ wohnbedarf_anteil_berücksichtigte_kinder: description: de: § 6a Abs. 5 S. 3 BKGG en: § 6a Abs. 5 S. 3 BKGG - unit: null - reference_period: null + unit: PERSON_COUNT type: scalar 2005-01-01: value: 10 diff --git a/src/gettsim/germany/lohnsteuer/einkommen.py b/src/gettsim/germany/lohnsteuer/einkommen.py index 6cd00148b4..539468e3da 100644 --- a/src/gettsim/germany/lohnsteuer/einkommen.py +++ b/src/gettsim/germany/lohnsteuer/einkommen.py @@ -10,6 +10,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, RoundingSpec, + TTSIMUnit, param_function, piecewise_polynomial, policy_function, @@ -17,16 +18,18 @@ @policy_function( + start_date="2002-01-01", end_date="2025-12-31", - rounding_spec=RoundingSpec(base=1, direction="down"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def einkommen_y_bis_2025( einnahmen__bruttolohn_y: float, steuerklasse: int, vorsorgepauschale_y: float, einkommensteuer__einkünfte__aus_nichtselbstständiger_arbeit__arbeitnehmerpauschbetrag: float, - einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis: float, + einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis_y: float, einkommensteuer__abzüge__sonderausgabenpauschbetrag: float, ) -> float: """Steuerbasis for Lohnsteuer (withholding tax on earnings).""" @@ -42,7 +45,7 @@ def einkommen_y_bis_2025( if steuerklasse == 2: alleinerziehendenfreibetrag = ( - einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis + einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis_y ) else: alleinerziehendenfreibetrag = 0.0 @@ -59,15 +62,16 @@ def einkommen_y_bis_2025( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(base=1, direction="down"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def einkommen_y_ab_2026( einnahmen__bruttolohn_y: float, steuerklasse: int, vorsorgepauschale_y: float, einkommensteuer__einkünfte__aus_nichtselbstständiger_arbeit__arbeitnehmerpauschbetrag: float, - einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis: float, + einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis_y: float, einkommensteuer__abzüge__sonderausgabenpauschbetrag: float, einkommensteuer__einkünfte__aus_nichtselbstständiger_arbeit__anspruchshöhe_steuerfreibetrag_aktivrente_y: float, ) -> float: @@ -90,7 +94,7 @@ def einkommen_y_ab_2026( if steuerklasse == 2: alleinerziehendenfreibetrag = ( - einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis + einkommensteuer__abzüge__alleinerziehendenfreibetrag_basis_y ) else: alleinerziehendenfreibetrag = 0.0 @@ -106,8 +110,10 @@ def einkommen_y_ab_2026( ) -@policy_function(start_date="2010-01-01", end_date="2025-12-31") -def vorsorge_krankenversicherungsbeiträge_option_a( +@policy_function( + start_date="2010-01-01", end_date="2025-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR +) +def vorsorge_krankenversicherungsbeiträge_option_a_y( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, steuerklasse: int, vorsorgepauschale_mindestanteil: float, @@ -142,7 +148,8 @@ def vorsorge_krankenversicherungsbeiträge_option_a( @policy_function( start_date="2015-01-01", end_date="2018-12-31", - leaf_name="vorsorge_krankenversicherungsbeiträge_option_b", + leaf_name="vorsorge_krankenversicherungsbeiträge_option_b_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -169,7 +176,8 @@ def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( @policy_function( start_date="2019-01-01", end_date="2025-12-31", - leaf_name="vorsorge_krankenversicherungsbeiträge_option_b", + leaf_name="vorsorge_krankenversicherungsbeiträge_option_b_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -193,7 +201,7 @@ def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( ) -@policy_function(start_date="2026-01-01") +@policy_function(start_date="2026-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def vorsorge_gesetzliche_krankenversicherungsbeiträge_y( sozialversicherung__kranken__beitrag__privat_versichert: bool, sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -216,8 +224,8 @@ def vorsorge_gesetzliche_krankenversicherungsbeiträge_y( ) -@policy_function(start_date="2026-01-01") -def vorsorge_arbeitslosenversicherungsbeiträge( +@policy_function(start_date="2026-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def vorsorge_arbeitslosenversicherungsbeiträge_y( sozialversicherung__rente__beitrag__einkommen_y: float, sozialversicherung__arbeitslosen__beitrag__beitragssatz: float, ) -> float: @@ -230,7 +238,9 @@ def vorsorge_arbeitslosenversicherungsbeiträge( @policy_function( - end_date="2022-12-31", leaf_name="vorsorge_rentenversicherungsbeiträge_y" + end_date="2022-12-31", + leaf_name="vorsorge_rentenversicherungsbeiträge_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_rentenversicherungsbeiträge_teilweise_anrechnung_y( sozialversicherung__rente__beitrag__einkommen_y: float, @@ -251,7 +261,9 @@ def vorsorge_rentenversicherungsbeiträge_teilweise_anrechnung_y( @policy_function( - start_date="2023-01-01", leaf_name="vorsorge_rentenversicherungsbeiträge_y" + start_date="2023-01-01", + leaf_name="vorsorge_rentenversicherungsbeiträge_y", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_rentenversicherungsbeiträge_volle_anrechnung_y( sozialversicherung__rente__beitrag__einkommen_y: float, @@ -271,7 +283,9 @@ def vorsorge_rentenversicherungsbeiträge_volle_anrechnung_y( ) -@param_function(start_date="2005-01-01", end_date="2022-12-31") +@param_function( + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def einführungsfaktor_rentenversicherungsaufwendungen( parameter_einführungsfaktor_rentenversicherungsaufwendungen: PiecewisePolynomialParamValue, policy_year: int, @@ -296,7 +310,8 @@ def einführungsfaktor_rentenversicherungsaufwendungen( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(base=1, direction="up"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="up"), + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_ohne_arbeitslosenversicherungsbeiträge_y( sozialversicherung__kranken__beitrag__privat_versichert: bool, @@ -324,13 +339,14 @@ def vorsorgepauschale_ohne_arbeitslosenversicherungsbeiträge_y( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(base=1, direction="up"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="up"), + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( vorsorge_rentenversicherungsbeiträge_y: float, vorsorge_gesetzliche_krankenversicherungsbeiträge_y: float, - vorsorge_arbeitslosenversicherungsbeiträge: float, - vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge: float, + vorsorge_arbeitslosenversicherungsbeiträge_y: float, + vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge_y: float, ) -> float: """Vorsorgepauschale considering unemployment insurance contributions. @@ -340,9 +356,9 @@ def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( § 39b Absatz 2 Satz 5 Nummer 3 Buchstabe e EStG. """ summe_av_kv_pv = min( - vorsorge_arbeitslosenversicherungsbeiträge + vorsorge_arbeitslosenversicherungsbeiträge_y + vorsorge_gesetzliche_krankenversicherungsbeiträge_y, - vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge, + vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge_y, ) return vorsorge_rentenversicherungsbeiträge_y + summe_av_kv_pv @@ -352,6 +368,7 @@ def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( end_date="2009-12-31", leaf_name="vorsorgepauschale_y", fail_msg_if_included="Vorsorgepauschale not implemented before 2010.", + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_y_ab_2005_bis_2009() -> float: pass @@ -361,12 +378,13 @@ def vorsorgepauschale_y_ab_2005_bis_2009() -> float: start_date="2010-01-01", end_date="2025-12-31", leaf_name="vorsorgepauschale_y", - rounding_spec=RoundingSpec(base=1, direction="up"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="up"), + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_y_ab_2010_bis_2025( vorsorge_rentenversicherungsbeiträge_y: float, - vorsorge_krankenversicherungsbeiträge_option_a: float, - vorsorge_krankenversicherungsbeiträge_option_b: float, + vorsorge_krankenversicherungsbeiträge_option_a_y: float, + vorsorge_krankenversicherungsbeiträge_option_b_y: float, ) -> float: """Vorsorgepauschale for Lohnsteuer valid since 2010. @@ -374,8 +392,8 @@ def vorsorgepauschale_y_ab_2010_bis_2025( Vorsorgeaufwendungen used when calculating Einkommensteuer. """ kranken = max( - vorsorge_krankenversicherungsbeiträge_option_a, - vorsorge_krankenversicherungsbeiträge_option_b, + vorsorge_krankenversicherungsbeiträge_option_a_y, + vorsorge_krankenversicherungsbeiträge_option_b_y, ) return vorsorge_rentenversicherungsbeiträge_y + kranken @@ -383,7 +401,8 @@ def vorsorgepauschale_y_ab_2010_bis_2025( @policy_function( start_date="2026-01-01", leaf_name="vorsorgepauschale_y", - rounding_spec=RoundingSpec(base=1, direction="up"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="up"), + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_y_ab_2026( vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y: float, diff --git a/src/gettsim/germany/lohnsteuer/einkommensgrenzwerte.yaml b/src/gettsim/germany/lohnsteuer/einkommensgrenzwerte.yaml index 184ec4bd5d..17b6e86b82 100644 --- a/src/gettsim/germany/lohnsteuer/einkommensgrenzwerte.yaml +++ b/src/gettsim/germany/lohnsteuer/einkommensgrenzwerte.yaml @@ -12,8 +12,7 @@ einkommensgrenzwerte_steuerklassen_5_6: § 39b Absatz 2 Satz 7 EStG Thresholds for withholding tax classes 5 and 6, where minimum and maximum tax rates apply. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: dict 2002-01-01: 1: 8946 diff --git a/src/gettsim/germany/lohnsteuer/inputs.py b/src/gettsim/germany/lohnsteuer/inputs.py index cc3464c7df..06bf64711a 100644 --- a/src/gettsim/germany/lohnsteuer/inputs.py +++ b/src/gettsim/germany/lohnsteuer/inputs.py @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def steuerklasse() -> int: """Tax Bracket (1 to 5) for withholding tax.""" diff --git a/src/gettsim/germany/lohnsteuer/lohnsteuer.py b/src/gettsim/germany/lohnsteuer/lohnsteuer.py index 7b26a886aa..b1a1a660c7 100644 --- a/src/gettsim/germany/lohnsteuer/lohnsteuer.py +++ b/src/gettsim/germany/lohnsteuer/lohnsteuer.py @@ -7,7 +7,9 @@ import numpy from gettsim.tt import ( + UNSET_UNIT, PiecewisePolynomialParamValue, + TTSIMUnit, param_function, piecewise_polynomial, policy_function, @@ -51,7 +53,7 @@ def basis_für_klassen_5_6( ) -@param_function(start_date="2015-01-01") +@param_function(start_date="2015-01-01", unit=UNSET_UNIT) def parameter_max_lohnsteuer_klasse_5_6( einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, einkommensgrenzwerte_steuerklassen_5_6: dict[int, float], @@ -92,8 +94,8 @@ def parameter_max_lohnsteuer_klasse_5_6( ) -@policy_function(start_date="2015-01-01") -def basistarif( +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def basistarif_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, xnp: ModuleType, @@ -106,8 +108,8 @@ def basistarif( ) -@policy_function(start_date="2015-01-01") -def splittingtarif( +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def splittingtarif_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, xnp: ModuleType, @@ -120,8 +122,8 @@ def splittingtarif( ) -@policy_function(start_date="2015-01-01") -def tarif_klassen_5_und_6( +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def tarif_klassen_5_und_6_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, parameter_max_lohnsteuer_klasse_5_6: PiecewisePolynomialParamValue, @@ -144,25 +146,25 @@ def tarif_klassen_5_und_6( return xnp.minimum(xnp.maximum(min_lohnsteuer, basis), max_lohnsteuer) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y( steuerklasse: int, - basistarif: float, - splittingtarif: float, - tarif_klassen_5_und_6: float, + basistarif_y: float, + splittingtarif_y: float, + tarif_klassen_5_und_6_y: float, ) -> float: """Withholding tax on earnings (Lohnsteuer)""" if steuerklasse == 1 or steuerklasse == 2 or steuerklasse == 4: - out = basistarif + out = basistarif_y elif steuerklasse == 3: - out = splittingtarif + out = splittingtarif_y else: - out = tarif_klassen_5_und_6 + out = tarif_klassen_5_und_6_y return max(out, 0.0) -@policy_function(start_date="2015-01-01") -def basistarif_mit_kinderfreibetrag( +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def basistarif_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, kinderfreibetrag_soli_y: float, @@ -180,8 +182,8 @@ def basistarif_mit_kinderfreibetrag( ) -@policy_function(start_date="2015-01-01") -def splittingtarif_mit_kinderfreibetrag( +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def splittingtarif_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, kinderfreibetrag_soli_y: float, @@ -199,8 +201,8 @@ def splittingtarif_mit_kinderfreibetrag( ) -@policy_function(start_date="2015-01-01") -def tarif_klassen_5_und_6_mit_kinderfreibetrag( +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) +def tarif_klassen_5_und_6_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, parameter_max_lohnsteuer_klasse_5_6: PiecewisePolynomialParamValue, @@ -230,12 +232,12 @@ def tarif_klassen_5_und_6_mit_kinderfreibetrag( return xnp.minimum(xnp.maximum(min_lohnsteuer, basis), max_lohnsteuer) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_mit_kinderfreibetrag_y( steuerklasse: int, - basistarif_mit_kinderfreibetrag: float, - splittingtarif_mit_kinderfreibetrag: float, - tarif_klassen_5_und_6_mit_kinderfreibetrag: float, + basistarif_mit_kinderfreibetrag_y: float, + splittingtarif_mit_kinderfreibetrag_y: float, + tarif_klassen_5_und_6_mit_kinderfreibetrag_y: float, ) -> float: """Withholding tax taking child allowances into account. @@ -244,15 +246,15 @@ def betrag_mit_kinderfreibetrag_y( of Solidaritätszuschlag on Lohnsteuer! """ if steuerklasse == 1 or steuerklasse == 2 or steuerklasse == 4: - out = basistarif_mit_kinderfreibetrag + out = basistarif_mit_kinderfreibetrag_y elif steuerklasse == 3: - out = splittingtarif_mit_kinderfreibetrag + out = splittingtarif_mit_kinderfreibetrag_y else: - out = tarif_klassen_5_und_6_mit_kinderfreibetrag + out = tarif_klassen_5_und_6_mit_kinderfreibetrag_y return max(out, 0.0) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_soli_y( betrag_mit_kinderfreibetrag_y: float, solidaritätszuschlag__parameter_solidaritätszuschlag: PiecewisePolynomialParamValue, @@ -266,7 +268,7 @@ def betrag_soli_y( ) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def kinderfreibetrag_soli_y( steuerklasse: int, einkommensteuer__kinderfreibetrag_y: float, diff --git a/src/gettsim/germany/lohnsteuer/minijob.yaml b/src/gettsim/germany/lohnsteuer/minijob.yaml index e5cbff86c2..6ba8f06fda 100644 --- a/src/gettsim/germany/lohnsteuer/minijob.yaml +++ b/src/gettsim/germany/lohnsteuer/minijob.yaml @@ -8,8 +8,7 @@ minijob_arbeitgeberpauschale: Pauschalierter Lohnsteuersatz des Arbeitgebers bei geringfügiger Beschäftigung (§40a II EStG) en: Fixed income tax rate for marginal employment (§40a II EStG) - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar add_jahresanfang: true 1997-01-01: diff --git a/src/gettsim/germany/lohnsteuer/vorsorge.yaml b/src/gettsim/germany/lohnsteuer/vorsorge.yaml index dfe97bb88e..587b2b80ca 100644 --- a/src/gettsim/germany/lohnsteuer/vorsorge.yaml +++ b/src/gettsim/germany/lohnsteuer/vorsorge.yaml @@ -17,9 +17,8 @@ parameter_einführungsfaktor_rentenversicherungsaufwendungen: calculation. rises between 2005 and 2025 by 4 percentage points annually. In 2023, it was prematurely set to 100 percent. - unit: Share - reference_period: null - # type: require_converter + input_unit: CALENDAR_YEAR + output_unit: DIMENSIONLESS type: piecewise_linear 2005-01-01: intervals: @@ -47,8 +46,7 @@ vorsorgepauschale_mindestanteil: 39b (2) Nr.3 EStG Minimum share of minimum contributions to health care and care insurance deducted from Mindestvorsorgepauschale - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2010-01-01: value: 0.12 @@ -69,14 +67,13 @@ maximal_absetzbare_krankenversicherungskosten: 39b (2) Nr.3 EStG. Depends on Steuerklasse. Maximum amount considered for Mindestvorsorgepauschale of contributions to health care and care insurance that can be deducted from withholding tax - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: dict 2010-01-01: steuerklasse_3: 3000 steuerklasse_nicht_3: 1900 reference: Art. 1 G. v. 16.07.2009 BGBl. I S. 1959 -vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge: +vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge_y: name: de: >- 39b (2) S.2 Nr. 5 EStG. Grenze zur Berücksichtigung von Vorsorgeaufwendungen bei @@ -93,8 +90,7 @@ vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeitr Expenses for unemployment insurance contributions are only considered if the sum of the partial amounts of expenses for health care, care insurance, pension insurance and unemployment insurance contributions does not exceed the limit. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2026-01-01: value: 1900 diff --git a/src/gettsim/germany/param_types.py b/src/gettsim/germany/param_types.py index 83d42a200b..0ceed5693d 100644 --- a/src/gettsim/germany/param_types.py +++ b/src/gettsim/germany/param_types.py @@ -1,28 +1,31 @@ from dataclasses import dataclass +from typing import Annotated + +from gettsim.tt import TTSIMUnit @dataclass(frozen=True) class Altersgrenzen: - min_alter: int - max_alter: int + min_alter: Annotated[int, TTSIMUnit.YEARS] + max_alter: Annotated[int, TTSIMUnit.YEARS] @dataclass(frozen=True) class SatzMitAltersgrenzen: - satz: float + satz: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] altersgrenzen: Altersgrenzen @dataclass(frozen=True) class ElementExistenzminimum: - single: float - paar: float - kind: float + single: Annotated[float, TTSIMUnit.CURRENCY.PER_YEAR] + paar: Annotated[float, TTSIMUnit.CURRENCY.PER_YEAR] + kind: Annotated[float, TTSIMUnit.CURRENCY.PER_YEAR] @dataclass(frozen=True) class ElementExistenzminimumNurKind: - kind: float + kind: Annotated[float, TTSIMUnit.CURRENCY.PER_YEAR] @dataclass(frozen=True) diff --git "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" index e6316775c7..b7161b6776 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" @@ -9,6 +9,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -28,7 +29,11 @@ def solidaritätszuschlagstarif( ) -@policy_function(end_date="2008-12-31", leaf_name="betrag_y_sn") +@policy_function( + end_date="2008-12-31", + leaf_name="betrag_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def betrag_y_sn_ohne_abgelt_st( einkommensteuer__betrag_mit_kinderfreibetrag_y_sn: float, familie__anzahl_personen_sn: int, @@ -57,7 +62,11 @@ def betrag_y_sn_ohne_abgelt_st( ) -@policy_function(start_date="2009-01-01", leaf_name="betrag_y_sn") +@policy_function( + start_date="2009-01-01", + leaf_name="betrag_y_sn", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, +) def betrag_y_sn_mit_abgelt_st( einkommensteuer__betrag_mit_kinderfreibetrag_y_sn: float, familie__anzahl_personen_sn: int, diff --git "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" index ded965a632..44e3f5e2f3 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" @@ -8,10 +8,10 @@ parameter_solidaritätszuschlag: Ab 1995, der upper threshold im Intervall 1 ist nach der Formel transition_threshold in soli_st.py berechnet. en: null - unit: Euros - reference_period: Year type: piecewise_linear 1991-01-01: + input_unit: DM_PER_YEAR + output_unit: DM_PER_YEAR reference: Artikel 1 G. v. 24.06.1991 BGBl. I S. 1318. intervals: - interval: (-inf, 0) @@ -27,24 +27,26 @@ parameter_solidaritätszuschlag: 1995-01-01: reference: Artikel 31 G. v. 23.06.1993 BGBl. I S. 944. intervals: - - interval: (-inf, 681) + - interval: (-inf, 1332) intercept: 0 slope: 0 - - interval: '[681, 1089.6)' + - interval: '[1332, 2131.2)' slope: 0.2 - - interval: '[1089.6, inf)' + - interval: '[2131.2, inf)' slope: 0.075 1998-01-01: reference: Artikel 1 G. v. 21.11.1997 BGBl. I S. 2743. intervals: - - interval: (-inf, 939) + - interval: (-inf, 1836) slope: 0 intercept: 0 - - interval: '[939, 1295.17)' + - interval: '[1836, 2532.41)' slope: 0.2 - - interval: '[1295.17, inf)' + - interval: '[2532.41, inf)' slope: 0.055 2002-01-01: + input_unit: EUR_PER_YEAR + output_unit: EUR_PER_YEAR reference: G. v. 15.10.2002 BGBl. I S. 4131. intervals: - interval: (-inf, 972) diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/anspruchsberechtigt.yaml b/src/gettsim/germany/sozialversicherung/arbeitslosen/anspruchsberechtigt.yaml index 7bad6e56d1..ed9543d61b 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/anspruchsberechtigt.yaml +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/anspruchsberechtigt.yaml @@ -8,8 +8,7 @@ stundengrenze: §138 (3) SGB III, früher auch §102 (2) AFG. Grenze, ab der keine Arbeitslosigkeit mehr unterstellt wird. en: null - unit: Hours - reference_period: Week + unit: HOURS_PER_WEEK type: scalar 1969-07-01: value: 20 @@ -35,8 +34,8 @@ anspruchsdauer_nach_alter: § 147 Abs. 2 SGB III The length of ALG 1 eligibility depends on age and on how many months a person was subject to compulsory insurance - unit: Months - reference_period: null + input_unit: YEARS + output_unit: MONTHS type: sparse_to_consecutive_int_lookup_table 1997-03-24: 0: 12 @@ -58,8 +57,8 @@ anspruchsdauer_nach_versicherungspflichtigen_monaten: § 147 Abs. 2 SGB III The length of ALG 1 eligibility depends on age and on how many months a person was subject to compulsory insurance - unit: Months - reference_period: null + input_unit: MONTHS + output_unit: MONTHS type: sparse_to_consecutive_int_lookup_table 1997-03-24: 0: 0 @@ -83,8 +82,7 @@ mindestversicherungsmonate: en: >- § 142 Abs. 2 SGB III Minimum number of months of insurance in the last 30 months before ALG 1 receipt - unit: Months - reference_period: null + unit: MONTHS type: scalar 1997-03-24: value: 12 diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py b/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py index 2463469c5d..4f7c604286 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py @@ -5,6 +5,7 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + TTSIMUnit, policy_function, ) @@ -16,12 +17,13 @@ end_date="1998-07-31", leaf_name="betrag_m", fail_msg_if_included="Arbeitslosengeld before August 1998 is not implemented.", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_bis_1998_07() -> float: """Calculate individual unemployment benefit.""" -@policy_function(start_date="1998-08-01") +@policy_function(start_date="1998-08-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_m( einkommensteuer__anzahl_kinderfreibeträge: int, grundsätzlich_anspruchsberechtigt: bool, @@ -45,7 +47,7 @@ def betrag_m( return out -@policy_function() +@policy_function(unit=TTSIMUnit.MONTHS) def monate_verbleibender_anspruchsdauer( alter: int, monate_sozialversicherungspflichtiger_beschäftigung_in_letzten_5_jahren: int, @@ -74,7 +76,7 @@ def monate_verbleibender_anspruchsdauer( return out -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def mindestversicherungszeit_erreicht( monate_beitragspflichtig_versichert_in_letzten_30_monaten: int, mindestversicherungsmonate: int, @@ -88,7 +90,7 @@ def mindestversicherungszeit_erreicht( ) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( arbeitssuchend: bool, monate_verbleibender_anspruchsdauer: int, @@ -105,7 +107,7 @@ def grundsätzlich_anspruchsberechtigt( ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def mean_nettoeinkommen_für_bemessungsgrundlage_bei_arbeitslosigkeit_y( sozialversicherung__rente__beitrag__beitragsbemessungsgrenze_y: float, einnahmen__bruttolohn_y: float, diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitrag.py index e92090883a..c01a489ef6 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitrag.py @@ -2,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="1999-03-31", leaf_name="betrag_versicherter_m") +@policy_function( + end_date="1999-03-31", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_bis_03_1999( sozialversicherung__rente__beitrag__einkommen_m: float, beitragssatz: float, @@ -15,7 +19,10 @@ def betrag_versicherter_m_bis_03_1999( @policy_function( - start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m" + start_date="1999-04-01", + end_date="2003-03-31", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -35,7 +42,11 @@ def betrag_versicherter_m_ohne_midijob( return out -@policy_function(start_date="2003-04-01", leaf_name="betrag_versicherter_m") +@policy_function( + start_date="2003-04-01", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, sozialversicherung__in_gleitzone: bool, @@ -54,7 +65,11 @@ def betrag_versicherter_m_mit_midijob( return out -@policy_function(end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m") +@policy_function( + end_date="1999-03-31", + leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_m_bis_03_1999( sozialversicherung__rente__beitrag__einkommen_m: float, beitragssatz: float, @@ -64,7 +79,10 @@ def betrag_arbeitgeber_m_bis_03_1999( @policy_function( - start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m" + start_date="1999-04-01", + end_date="2003-03-31", + leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -84,7 +102,11 @@ def betrag_arbeitgeber_m_ohne_midijob( return out -@policy_function(start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m") +@policy_function( + start_date="2003-04-01", + leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, sozialversicherung__in_gleitzone: bool, @@ -103,7 +125,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function(start_date="2003-04-01") +@policy_function(start_date="2003-04-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_gesamt_in_gleitzone_m( sozialversicherung__midijob_bemessungsentgelt_m: float, beitragssatz: float, @@ -118,6 +140,7 @@ def betrag_gesamt_in_gleitzone_m( start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_arbeitgeber_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_anteil_bruttolohn( einnahmen__bruttolohn_m: float, @@ -129,7 +152,11 @@ def betrag_arbeitgeber_in_gleitzone_m_anteil_bruttolohn( return einnahmen__bruttolohn_m * beitragssatz / 2 -@policy_function(start_date="2022-10-01", leaf_name="betrag_arbeitgeber_in_gleitzone_m") +@policy_function( + start_date="2022-10-01", + leaf_name="betrag_arbeitgeber_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_in_gleitzone_m_als_differenz_von_gesamt_und_versichertenbeitrag( betrag_gesamt_in_gleitzone_m: float, betrag_versicherter_in_gleitzone_m: float, @@ -142,6 +169,7 @@ def betrag_arbeitgeber_in_gleitzone_m_als_differenz_von_gesamt_und_versichertenb start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_gesamt_in_gleitzone_m: float, @@ -156,6 +184,7 @@ def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberb @policy_function( start_date="2022-10-01", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_mit_festem_beitragssatz( sozialversicherung__beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m: float, diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitragssatz.yaml b/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitragssatz.yaml index adb9e34edf..147c80e590 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitragssatz.yaml +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitragssatz.yaml @@ -10,8 +10,7 @@ beitragssatz: en: >- Contribution rate to unemployment insurance, split into employee and employer contribution. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar add_jahresanfang: true 1984-01-01: diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml index 4f19ea754d..632549414b 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml @@ -1,19 +1,18 @@ --- -freibetrag_nebeneinkommen: +freibetrag_nebeneinkommen_m: name: de: Freibetrag bei der Anrechnung von Nebeneinkommen en: Income which is not deducted from unemployment benefit. description: de: § 155 SGB III, vorher § 141 (1) S. 1 en: null - unit: Euros - reference_period: Month type: scalar 1999-08-01: - value: 161 - reference: Art. 1 G. v. 21.07.1999 BGBl. I S. 1648 - note: Originalwert 315 DM. + unit: DM_PER_MONTH + value: 315 + reference: Art. 1 Nr. 21 G. v. 21.07.1999 BGBl. I S. 1648 2002-01-01: + unit: EUR_PER_MONTH value: 165 reference: Art. 3 G. v. 21.12.2000 BGBl. I S. 1983 sozialversicherungspauschale: @@ -24,8 +23,7 @@ sozialversicherungspauschale: de: >- § 153 (1) Nr. 1 SGB III. Wird angewendet auf das Bemessungsentgelt. en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 1984-01-01: value: 0.1727 @@ -97,8 +95,7 @@ satz: Verhältnis zum letzten Nettoentgelt. Unterscheidet sich für Personen mit/ohne Kinder im Sinne des EStG. en: null - unit: Share - reference_period: null + unit: DIMENSIONLESS type: dict 1998-08-01: allgemein: 0.6 diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/inputs.py b/src/gettsim/germany/sozialversicherung/arbeitslosen/inputs.py index 48b18e324b..9db726272d 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/inputs.py +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/inputs.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def mean_nettoeinkommen_in_12_monaten_vor_arbeitslosigkeit_m() -> float: """Mean net wage in the 12 months before unemployment. @@ -15,21 +15,21 @@ def mean_nettoeinkommen_in_12_monaten_vor_arbeitslosigkeit_m() -> float: """ -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_beitragspflichtig_versichert_in_letzten_30_monaten() -> int: """Number of months of compulsory insurance in the 30 months before claiming unemployment.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def arbeitssuchend() -> bool: """Looking for employment.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_durchgängigen_bezugs_von_arbeitslosengeld() -> int: """Number of months the individual already receives Arbeitslosengeld without interruption.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_sozialversicherungspflichtiger_beschäftigung_in_letzten_5_jahren() -> int: """Months of subjection to compulsory insurance in the 5 years before claiming unemployment.""" diff --git "a/src/gettsim/germany/sozialversicherung/beitr\303\244ge.py" "b/src/gettsim/germany/sozialversicherung/beitr\303\244ge.py" index e33a47dcca..cd37a9f367 100644 --- "a/src/gettsim/germany/sozialversicherung/beitr\303\244ge.py" +++ "b/src/gettsim/germany/sozialversicherung/beitr\303\244ge.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beiträge_versicherter_m( pflege__beitrag__betrag_versicherter_m: float, kranken__beitrag__betrag_versicherter_m: float, @@ -21,7 +21,7 @@ def beiträge_versicherter_m( ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beiträge_arbeitgeber_m( pflege__beitrag__betrag_arbeitgeber_m: float, kranken__beitrag__betrag_arbeitgeber_m: float, @@ -37,7 +37,7 @@ def beiträge_arbeitgeber_m( ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beiträge_gesamt_m( beiträge_versicherter_m: float, beiträge_arbeitgeber_m: float, diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py index 59a53b0b55..6835e06dec 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py @@ -2,28 +2,32 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, ) -> float: """Public health insurance contributions paid by the insured person.""" - return betrag_versicherter_regulärer_beitragssatz + return betrag_versicherter_regulärer_beitragssatz_m @policy_function( - start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m" + start_date="1999-04-01", + end_date="2003-03-31", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_rentner_m: float, betrag_selbstständig_m: float, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, ) -> float: """Public health insurance contributions paid by the insured person. @@ -35,20 +39,24 @@ def betrag_versicherter_m_ohne_midijob( elif sozialversicherung__geringfügig_beschäftigt: out = 0.0 else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m # Add the health insurance contribution for pensions return out + betrag_rentner_m -@policy_function(start_date="2003-04-01", leaf_name="betrag_versicherter_m") +@policy_function( + start_date="2003-04-01", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_rentner_m: float, betrag_selbstständig_m: float, sozialversicherung__in_gleitzone: bool, betrag_versicherter_in_gleitzone_m: float, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, ) -> float: """Public health insurance contributions paid by the insured person. @@ -62,7 +70,7 @@ def betrag_versicherter_m_mit_midijob( elif sozialversicherung__in_gleitzone: out = betrag_versicherter_in_gleitzone_m else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m # Add the health insurance contribution for pensions return out + betrag_rentner_m @@ -71,6 +79,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_bis_03_1999( einkommen_m: float, @@ -90,6 +99,7 @@ def betrag_arbeitgeber_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -114,7 +124,11 @@ def betrag_arbeitgeber_m_ohne_midijob( return out -@policy_function(start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m") +@policy_function( + start_date="2003-04-01", + leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, sozialversicherung__in_gleitzone: bool, @@ -141,8 +155,8 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function() -def betrag_versicherter_regulärer_beitragssatz( +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) +def betrag_versicherter_regulärer_beitragssatz_m( einkommen_m: float, beitragssatz_arbeitnehmer: float, ) -> float: @@ -153,6 +167,7 @@ def betrag_versicherter_regulärer_beitragssatz( @policy_function( end_date="2005-06-30", leaf_name="betrag_selbstständig_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_mit_einheitlichen_beitragssatz( bemessungsgrundlage_selbstständig_m: float, @@ -168,6 +183,7 @@ def betrag_selbstständig_m_mit_einheitlichen_beitragssatz( start_date="2005-07-01", end_date="2008-12-31", leaf_name="betrag_selbstständig_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_ohne_ermäßigtem_beitragssatz( bemessungsgrundlage_selbstständig_m: float, @@ -185,6 +201,7 @@ def betrag_selbstständig_m_ohne_ermäßigtem_beitragssatz( start_date="2009-01-01", end_date="2014-12-31", leaf_name="betrag_selbstständig_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_ohne_zusatzbeitrag( bemessungsgrundlage_selbstständig_m: float, @@ -199,6 +216,7 @@ def betrag_selbstständig_m_ohne_zusatzbeitrag( @policy_function( start_date="2015-01-01", leaf_name="betrag_selbstständig_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_mit_zusatzbeitrag( bemessungsgrundlage_selbstständig_m: float, @@ -215,7 +233,7 @@ def betrag_selbstständig_m_mit_zusatzbeitrag( return beitrag * bemessungsgrundlage_selbstständig_m -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_rentner_m( bemessungsgrundlage_rente_m: float, beitragssatz_arbeitnehmer: float, @@ -224,7 +242,7 @@ def betrag_rentner_m( return beitragssatz_arbeitnehmer * bemessungsgrundlage_rente_m -@policy_function(start_date="2003-04-01") +@policy_function(start_date="2003-04-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_gesamt_in_gleitzone_m( sozialversicherung__midijob_bemessungsentgelt_m: float, beitragssatz_arbeitnehmer: float, @@ -243,6 +261,7 @@ def betrag_gesamt_in_gleitzone_m( start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_arbeitgeber_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_mit_festem_beitragssatz( einnahmen__bruttolohn_m: float, @@ -261,7 +280,11 @@ def betrag_arbeitgeber_in_gleitzone_m_mit_festem_beitragssatz( return out -@policy_function(start_date="2022-10-01", leaf_name="betrag_arbeitgeber_in_gleitzone_m") +@policy_function( + start_date="2022-10-01", + leaf_name="betrag_arbeitgeber_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_in_gleitzone_m_als_differenz_von_gesamt_und_versichertenbeitrag( betrag_gesamt_in_gleitzone_m: float, betrag_versicherter_in_gleitzone_m: float, @@ -282,6 +305,7 @@ def betrag_arbeitgeber_in_gleitzone_m_als_differenz_von_gesamt_und_versichertenb start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_gesamt_in_gleitzone_m: float, @@ -294,6 +318,7 @@ def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberb @policy_function( start_date="2022-10-01", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_mit_festem_beitragssatz( sozialversicherung__beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m: float, diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml index efa461ffd1..36948e3039 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml @@ -11,28 +11,28 @@ beitragsbemessungsgrenze_m: The maximum amount of income subject to health insurance contributions is uniform throughout the Federal Republic of Germany. It also applies to long-term care insurance. - unit: Euros - reference_period: Month type: scalar 1984-01-01: - value: 1994 + unit: DM_PER_MONTH + value: 3900 1985-01-01: - value: 2071 + value: 4050 1986-01-01: - value: 2147 + value: 4200 1987-01-01: - value: 2186 + value: 4275 1988-01-01: - value: 2301 + value: 4500 1989-01-01: - value: 2339 + value: 4575 1990-01-01: note: >- The Bemessungsgrenze differs between West and East Germany. See ``parameter_beitragsbemessungsgrenze_nach_wohnort``. 2001-01-01: - value: 3336 + value: 6525 2002-01-01: + unit: EUR_PER_MONTH value: 3375 2003-01-01: value: 3450 @@ -104,42 +104,46 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: en: >- The maximum amount of income subject to health insurance contributions differs between West and East Germany. It also applies to long-term care insurance. - unit: Euros - reference_period: Month type: dict 1990-01-01: - west: 2416 - ost: 1035 + unit: DM_PER_MONTH + west: 4725 + ost: 2025 + reference: § 6 Abs. 7 SGB V; Anlage 2 SGB VI. 1991-01-01: - west: 2493 - ost: 1151 + west: 4875 + ost: 2250 + 1991-07-01: + updates_previous: true + ost: 2550 + reference: § 2 V. v. 19.06.1991 BGBl. I S. 1300 (drei Viertel von 3 400). 1992-01-01: - west: 2608 - ost: 1841 + west: 5100 + ost: 3600 1993-01-01: - west: 2761 - ost: 2032 + west: 5400 + ost: 3975 1994-01-01: - west: 2914 - ost: 2262 + west: 5700 + ost: 4425 1995-01-01: - west: 2991 - ost: 2454 + west: 5850 + ost: 4800 1996-01-01: - west: 3068 - ost: 2608 + west: 6000 + ost: 5100 1997-01-01: - west: 3144 - ost: 2723 + west: 6150 + ost: 5325 1998-01-01: - west: 3221 - ost: 2684 + west: 6300 + ost: 5250 1999-01-01: - west: 3259 - ost: 2761 + west: 6375 + ost: 5400 2000-01-01: - west: 3298 - ost: 2723 + west: 6450 + ost: 5325 2001-01-01: note: >- The Bemessungsgrenze does not differ between West and East Germany. See diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py index 33610ba2fc..cd3d764801 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function -@param_function(end_date="2005-06-30") +@param_function(end_date="2005-06-30", unit=TTSIMUnit.DIMENSIONLESS) def beitragssatz_arbeitnehmer(beitragssatz: float) -> float: """Employee's health insurance contribution rate until June 2005. @@ -14,7 +14,7 @@ def beitragssatz_arbeitnehmer(beitragssatz: float) -> float: return beitragssatz / 2 -@param_function(end_date="2005-12-31") +@param_function(end_date="2005-12-31", unit=TTSIMUnit.DIMENSIONLESS) def beitragssatz_arbeitnehmer_midijob(beitragssatz_jahresanfang: float) -> float: """Employee's health insurance contribution rate for the beginning of the year until June 2005. @@ -28,6 +28,7 @@ def beitragssatz_arbeitnehmer_midijob(beitragssatz_jahresanfang: float) -> float start_date="2005-07-01", end_date="2008-12-31", leaf_name="beitragssatz_arbeitnehmer", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_voller_zusatzbeitrag_ab_07_2005_bis_2008( zusatzbeitragssatz: float, @@ -46,6 +47,7 @@ def beitragssatz_arbeitnehmer_voller_zusatzbeitrag_ab_07_2005_bis_2008( start_date="2006-01-01", end_date="2008-12-31", leaf_name="beitragssatz_arbeitnehmer_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitrag_ab_2006_bis_2008( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -64,6 +66,7 @@ def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitrag_ab_2006_bis_2008( start_date="2009-01-01", end_date="2018-12-31", leaf_name="beitragssatz_arbeitnehmer", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_voller_zusatzbeitrag_ab_2009_bis_2018( zusatzbeitragssatz: float, @@ -82,6 +85,7 @@ def beitragssatz_arbeitnehmer_voller_zusatzbeitrag_ab_2009_bis_2018( start_date="2009-01-01", end_date="2014-12-31", leaf_name="beitragssatz_arbeitnehmer_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_voller_sonderbeitragssatz( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -102,6 +106,7 @@ def beitragssatz_arbeitnehmer_midijob_voller_sonderbeitragssatz( start_date="2015-01-01", end_date="2018-12-31", leaf_name="beitragssatz_arbeitnehmer_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitragssatz( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -121,6 +126,7 @@ def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitragssatz( @policy_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitnehmer", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_paritätischer_zusatzbeitrag( zusatzbeitragssatz: float, @@ -136,6 +142,7 @@ def beitragssatz_arbeitnehmer_paritätischer_zusatzbeitrag( @param_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitnehmer_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_paritätischer_zusatzbeitrag( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -153,6 +160,7 @@ def beitragssatz_arbeitnehmer_midijob_paritätischer_zusatzbeitrag( @param_function( end_date="2005-06-30", leaf_name="beitragssatz_arbeitgeber", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_bis_06_2005(beitragssatz: float) -> float: """Employer's health insurance contribution rate.""" @@ -162,6 +170,7 @@ def beitragssatz_arbeitgeber_bis_06_2005(beitragssatz: float) -> float: @param_function( end_date="2005-12-31", leaf_name="beitragssatz_arbeitgeber_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_bis_06_2005( beitragssatz_jahresanfang: float, @@ -174,6 +183,7 @@ def beitragssatz_arbeitgeber_midijob_bis_06_2005( start_date="2005-07-01", end_date="2008-12-31", leaf_name="beitragssatz_arbeitgeber", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_ohne_zusatzbeitrag_ab_07_2005_bis_2008( parameter_beitragssatz: dict[str, float], @@ -186,6 +196,7 @@ def beitragssatz_arbeitgeber_ohne_zusatzbeitrag_ab_07_2005_bis_2008( start_date="2006-01-01", end_date="2008-12-31", leaf_name="beitragssatz_arbeitgeber_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_ohne_zusatzbeitrag_ab_06_2006_bis_2008( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -198,6 +209,7 @@ def beitragssatz_arbeitgeber_midijob_ohne_zusatzbeitrag_ab_06_2006_bis_2008( start_date="2009-01-01", end_date="2018-12-31", leaf_name="beitragssatz_arbeitgeber", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_ohne_zusatzbeitrag_ab_09_2009_bis_2018( parameter_beitragssatz: dict[str, float], @@ -210,6 +222,7 @@ def beitragssatz_arbeitgeber_ohne_zusatzbeitrag_ab_09_2009_bis_2018( start_date="2009-01-01", end_date="2018-12-31", leaf_name="beitragssatz_arbeitgeber_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_ohne_zusatzbeitrag_ab_09_2009_bis_2018( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -221,6 +234,7 @@ def beitragssatz_arbeitgeber_midijob_ohne_zusatzbeitrag_ab_09_2009_bis_2018( @policy_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitgeber", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_paritätischer_zusatzbeitrag( beitragssatz_arbeitnehmer: float, @@ -236,6 +250,7 @@ def beitragssatz_arbeitgeber_paritätischer_zusatzbeitrag( @param_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitgeber_midijob", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_paritätischer_zusatzbeitrag( beitragssatz_arbeitnehmer_midijob: float, @@ -252,6 +267,7 @@ def beitragssatz_arbeitgeber_midijob_paritätischer_zusatzbeitrag( start_date="2005-07-01", end_date="2014-12-31", leaf_name="zusatzbeitragssatz", + unit=TTSIMUnit.DIMENSIONLESS, ) def zusatzbeitragssatz_genannt_sonderbeitrag( parameter_beitragssatz: dict[str, float], @@ -263,7 +279,7 @@ def zusatzbeitragssatz_genannt_sonderbeitrag( return parameter_beitragssatz["sonderbeitrag"] -@param_function(start_date="2015-01-01") +@param_function(start_date="2015-01-01", unit=TTSIMUnit.DIMENSIONLESS) def zusatzbeitragssatz( parameter_beitragssatz: dict[str, float], ) -> float: diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.yaml b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.yaml index cc740fc356..d5e76a11c2 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.yaml +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.yaml @@ -10,8 +10,7 @@ beitragssatz: en: >- Uniform contribution rate for statutory health insurance over all insurance providers. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar add_jahresanfang: true 1984-01-01: @@ -70,8 +69,7 @@ parameter_beitragssatz: average contribution rate, 1992 to 2008 allgemein - general statutory contribution rate, since 2009 sonderbeitrag - paid by employees, Jul 2005 to 2014 ermäßigt - reduced rate zusatz - average top-up contribution rate - unit: Share - reference_period: null + unit: DIMENSIONLESS type: dict add_jahresanfang: true 2005-07-01: diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py index 7bac4042b8..e0fd02ee0a 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py @@ -2,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="1999-03-31", leaf_name="einkommen_m") +@policy_function( + end_date="1999-03-31", + leaf_name="einkommen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def einkommen_m_bis_03_1999( einkommen_bis_beitragsbemessungsgrenze_m: float, ) -> float: @@ -13,7 +17,11 @@ def einkommen_m_bis_03_1999( return einkommen_bis_beitragsbemessungsgrenze_m -@policy_function(start_date="1999-04-01", leaf_name="einkommen_m") +@policy_function( + start_date="1999-04-01", + leaf_name="einkommen_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def einkommen_m_ab_04_1999( einkommen_bis_beitragsbemessungsgrenze_m: float, sozialversicherung__regulär_beschäftigt: bool, @@ -30,7 +38,7 @@ def einkommen_m_ab_04_1999( return out -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_bis_beitragsbemessungsgrenze_m( einnahmen__bruttolohn_m: float, beitragsbemessungsgrenze_m: float, @@ -46,7 +54,7 @@ def einkommen_bis_beitragsbemessungsgrenze_m( ) -@policy_function(start_date="1990-01-01") +@policy_function(start_date="1990-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def bemessungsgrundlage_selbstständig_m( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, bezugsgröße_selbstständige_m: float, @@ -84,6 +92,7 @@ def bemessungsgrundlage_selbstständig_m( start_date="1990-01-01", end_date="2000-12-31", leaf_name="beitragsbemessungsgrenze_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def beitragsbemessungsgrenze_m_nach_wohnort( wohnort_ost_hh: bool, @@ -97,7 +106,11 @@ def beitragsbemessungsgrenze_m_nach_wohnort( ) -@policy_function(start_date="1990-01-01", end_date="2024-12-31") +@policy_function( + start_date="1990-01-01", + end_date="2024-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def bezugsgröße_selbstständige_m( wohnort_ost_hh: bool, bezugsgröße_selbstständige_nach_wohnort: dict[str, float], @@ -114,7 +127,7 @@ def bezugsgröße_selbstständige_m( ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def bemessungsgrundlage_rente_m( einnahmen__renten__gesetzliche_m: float, einnahmen__renten__betriebliche_altersvorsorge_m: float, diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/inputs.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/inputs.py index f743ae90c1..a3d2e7453e 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/inputs.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/inputs.py @@ -2,15 +2,15 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def privat_versichert() -> bool: """Has (only) a private health insurance contract.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitrag_private_basiskrankenversicherung_abzüglich_arbeitgeberanteil_m() -> float: """Monthly contribution to private basic health insurance minus (tax-exempt) employer's contribution. diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/minijob.yaml b/src/gettsim/germany/sozialversicherung/kranken/beitrag/minijob.yaml index d8f14975f5..a61d3f49ad 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/minijob.yaml @@ -10,8 +10,7 @@ minijob_arbeitgeberpauschale: Pauschalbeitrag des Arbeitgebers zur Krankenversicherung (§ 249b SGB V) bei geringfügiger Beschäftigung en: Fixed health insurance contributions for marginal employment (§ 249b SGB V) - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 1999-04-01: value: 0.1 diff --git "a/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" index 123ba8331c..e963f7a42c 100644 --- "a/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" +++ "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" @@ -6,26 +6,26 @@ bezugsgröße_selbstständige_m: description: de: §18 SGB IV ynd https://de.wikipedia.org/wiki/Bezugsgr%C3%B6%C3%9Fe en: §18 SGB IV and https://de.wikipedia.org/wiki/Bezugsgr%C3%B6%C3%9Fe - unit: Euros - reference_period: Month type: scalar 1984-01-01: - value: 1396 + unit: DM_PER_MONTH + value: 2730 1985-01-01: - value: 1432 + value: 2800 1986-01-01: - value: 1467 + value: 2870 1987-01-01: - value: 1539 + value: 3010 1988-01-01: - value: 1575 + value: 3080 1989-01-01: - value: 1611 + value: 3150 1990-01-01: note: >- Die Bezugsgröße unterscheidet sich zwischen West und Ost. Siehe ``parameter_bezugsgröße_selbstständige_nach_wohnort``. 2025-01-01: + unit: EUR_PER_MONTH value: 3745 reference: V. v. 25.11.2024 BGBl. 2024 I Nr. 365. 2026-01-01: @@ -40,47 +40,53 @@ bezugsgröße_selbstständige_nach_wohnort: description: de: §18 SGB IV und https://de.wikipedia.org/wiki/Bezugsgr%C3%B6%C3%9Fe en: §18 SGB IV and https://de.wikipedia.org/wiki/Bezugsgr%C3%B6%C3%9Fe - unit: Euros - reference_period: Month type: dict add_jahresanfang: true 1990-01-01: - west: 1682 - ost: 715.8086336747059 + unit: DM_PER_MONTH + west: 3290 + ost: 1400 1991-01-01: - west: 1718 - ost: 787.3894970421765 + west: 3360 + ost: 1540 + 1991-07-01: + updates_previous: true + ost: 1750 + reference: >- + § 1 V. v. 19.06.1991 BGBl. I S. 1300 (Zweite V. zur Anpassung der Renten). 1992-01-01: - west: 1790 - ost: 1073.712950512059 + west: 3500 + ost: 2100 1993-01-01: - west: 1897 - ost: 1395.826835665677 + west: 3710 + ost: 2730 1994-01-01: - west: 2004 - ost: 1574.778994084353 + west: 3920 + ost: 3080 1995-01-01: - west: 2076 - ost: 1682.150289135559 + west: 4060 + ost: 3290 1996-01-01: - west: 2112 - ost: 1789.521584186765 + west: 4130 + ost: 3500 1997-01-01: - west: 2183 - ost: 1861.102447554235 + west: 4270 + ost: 3640 1998-01-01: - west: 2219 - ost: 1896.892879237971 + west: 4340 + ost: 3640 + reference: V. v. 02.12.1997 BGBl. I S. 2782. 1999-01-01: - west: 2255 - ost: 1896.892879237971 + west: 4410 + ost: 3710 2000-01-01: - west: 2291 - ost: 1861.102447554235 + west: 4480 + ost: 3640 2001-01-01: updates_previous: true - ost: 1932.683310921706 + ost: 3780 2002-01-01: + unit: EUR_PER_MONTH west: 2345 ost: 1960 2003-01-01: @@ -171,8 +177,7 @@ mindestanteil_bezugsgröße_selbstständige: §240 SGB V Abs. 4 Health Insurance contributions have to be payed, at the minimum, on the ninetieth part of the monthly Bezugsgröße for each calender day - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 1990-01-01: note: Exact date of introduction of this parameter unclear (was in place in 2006) diff --git a/src/gettsim/germany/sozialversicherung/midijob.py b/src/gettsim/germany/sozialversicherung/midijob.py index 46852cee6f..256424d325 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.py +++ b/src/gettsim/germany/sozialversicherung/midijob.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function -@policy_function(start_date="2003-04-01") +@policy_function(start_date="2003-04-01", unit=TTSIMUnit.DIMENSIONLESS) def in_gleitzone( einnahmen__bruttolohn_m: float, geringfügig_beschäftigt: bool, - midijobgrenze: float, + midijobgrenze_m: float, ) -> bool: """Individual's income is in Midijob range. @@ -19,22 +19,24 @@ def in_gleitzone( Legal reference: § 20 Abs. 2 SGB IV """ - return (einnahmen__bruttolohn_m <= midijobgrenze) and (not geringfügig_beschäftigt) + return (einnahmen__bruttolohn_m <= midijobgrenze_m) and ( + not geringfügig_beschäftigt + ) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( einnahmen__bruttolohn_m: float, - minijobgrenze: float, - midijobgrenze: float, + minijobgrenze_m: float, + midijobgrenze_m: float, ) -> float: """Income subject to employee social insurance contributions for Bruttolöhne in Gleitzone. Legal reference: § 20 SGB IV ("Gesonderte beitragspflichtige Einnahmen") """ - quotient = midijobgrenze / (midijobgrenze - minijobgrenze) - einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze + quotient = midijobgrenze_m / (midijobgrenze_m - minijobgrenze_m) + einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze_m return quotient * einkommen_diff @@ -43,6 +45,7 @@ def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( start_date="2003-04-01", end_date="2004-12-31", leaf_name="midijob_faktor_f", + unit=TTSIMUnit.DIMENSIONLESS, ) def midijob_faktor_f_mit_minijob_steuerpauschale_bis_2004( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -85,6 +88,7 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_bis_2004( start_date="2005-01-01", end_date="2022-09-30", leaf_name="midijob_faktor_f", + unit=TTSIMUnit.DIMENSIONLESS, ) def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -126,6 +130,7 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( @param_function( start_date="2022-10-01", leaf_name="midijob_faktor_f", + unit=TTSIMUnit.DIMENSIONLESS, ) def midijob_faktor_f_ohne_minijob_steuerpauschale( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -171,12 +176,13 @@ def midijob_faktor_f_ohne_minijob_steuerpauschale( start_date="2003-04-01", end_date="2022-09-30", leaf_name="midijob_bemessungsentgelt_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def midijob_bemessungsentgelt_m_bis_09_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, - minijobgrenze: float, - midijobgrenze: float, + minijobgrenze_m: float, + midijobgrenze_m: float, ) -> float: """Income subject to social insurance contributions for midijob until September 2022. @@ -188,21 +194,25 @@ def midijob_bemessungsentgelt_m_bis_09_2022( """ # Now use the factor to calculate the overall bemessungsentgelt - minijob_anteil = midijob_faktor_f * minijobgrenze - lohn_über_mini = einnahmen__bruttolohn_m - minijobgrenze - gewichtete_midijob_rate = (midijobgrenze / (midijobgrenze - minijobgrenze)) - ( - minijobgrenze / (midijobgrenze - minijobgrenze) * midijob_faktor_f - ) + minijob_anteil = midijob_faktor_f * minijobgrenze_m + lohn_über_mini = einnahmen__bruttolohn_m - minijobgrenze_m + gewichtete_midijob_rate = ( + midijobgrenze_m / (midijobgrenze_m - minijobgrenze_m) + ) - (minijobgrenze_m / (midijobgrenze_m - minijobgrenze_m) * midijob_faktor_f) return minijob_anteil + lohn_über_mini * gewichtete_midijob_rate -@policy_function(start_date="2022-10-01", leaf_name="midijob_bemessungsentgelt_m") +@policy_function( + start_date="2022-10-01", + leaf_name="midijob_bemessungsentgelt_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def midijob_bemessungsentgelt_m_ab_10_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, - minijobgrenze: float, - midijobgrenze: float, + minijobgrenze_m: float, + midijobgrenze_m: float, ) -> float: """Total income subject to social insurance contributions for midijobs since October 2022. @@ -215,11 +225,11 @@ def midijob_bemessungsentgelt_m_ab_10_2022( Legal reference: Changes in § 20 SGB IV from 01.10.2022 """ - quotient1 = (midijobgrenze) / (midijobgrenze - minijobgrenze) - quotient2 = (minijobgrenze) / (midijobgrenze - minijobgrenze) - einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze + quotient1 = (midijobgrenze_m) / (midijobgrenze_m - minijobgrenze_m) + quotient2 = (minijobgrenze_m) / (midijobgrenze_m - minijobgrenze_m) + einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze_m - faktor1 = midijob_faktor_f * minijobgrenze + faktor1 = midijob_faktor_f * minijobgrenze_m faktor2 = (quotient1 - quotient2 * midijob_faktor_f) * einkommen_diff return faktor1 + faktor2 diff --git a/src/gettsim/germany/sozialversicherung/midijob.yaml b/src/gettsim/germany/sozialversicherung/midijob.yaml index d98c5194a3..39d9f13485 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.yaml +++ b/src/gettsim/germany/sozialversicherung/midijob.yaml @@ -1,13 +1,12 @@ --- -midijobgrenze: +midijobgrenze_m: name: de: Midijobgrenze en: Midijob threshold description: de: § 20 (2) SGB IV en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2003-04-01: value: 800 diff --git a/src/gettsim/germany/sozialversicherung/mindestlohn.yaml b/src/gettsim/germany/sozialversicherung/mindestlohn.yaml index 274ecb672a..55864ebbf3 100644 --- a/src/gettsim/germany/sozialversicherung/mindestlohn.yaml +++ b/src/gettsim/germany/sozialversicherung/mindestlohn.yaml @@ -13,8 +13,7 @@ mindestlohn: §1 (2) Mindestlohngesetz The minimum wage is the lowest hourly wage that an employer must pay for a regular, not more than 45 hours weekly work. - unit: Euros - reference_period: Hour + unit: EUR_PER_HOURS type: scalar 2015-01-01: value: 8.5 diff --git a/src/gettsim/germany/sozialversicherung/minijob.py b/src/gettsim/germany/sozialversicherung/minijob.py index d410002bc1..e7e25f9455 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.py +++ b/src/gettsim/germany/sozialversicherung/minijob.py @@ -2,30 +2,32 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def geringfügig_beschäftigt( einnahmen__bruttolohn_m: float, - minijobgrenze: float, + minijobgrenze_m: float, ) -> bool: """Individual earns less than marginal employment threshold. Legal reference: § 8 Abs. 1 Satz 1 and 2 SGB IV """ - return einnahmen__bruttolohn_m <= minijobgrenze + return einnahmen__bruttolohn_m <= minijobgrenze_m @policy_function( start_date="1990-01-01", end_date="1999-12-31", - leaf_name="minijobgrenze", + leaf_name="minijobgrenze_m", rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def minijobgrenze_unterscheidung_ost_west( wohnort_ost_hh: bool, @@ -44,12 +46,14 @@ def minijobgrenze_unterscheidung_ost_west( @policy_function( start_date="2022-10-01", - leaf_name="minijobgrenze", + leaf_name="minijobgrenze_m", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def minijobgrenze_abgeleitet_von_mindestlohn( mindestlohn: float, diff --git a/src/gettsim/germany/sozialversicherung/minijob.yaml b/src/gettsim/germany/sozialversicherung/minijob.yaml index f9a5b649a7..c6b9ed0a14 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/minijob.yaml @@ -1,33 +1,33 @@ --- -minijobgrenze: +minijobgrenze_m: name: de: Minijobgrenze en: Thresholds for marginal employment (minijobs) description: de: Minijob § 8 (1) Nr. 1 SGB IV en: Minijob § 8 (1) Nr. 1 SGB IV - unit: Euros - reference_period: Month type: scalar 1984-01-01: - value: 199 + unit: DM_PER_MONTH + value: 390 1985-01-01: - value: 205 + value: 400 1986-01-01: - value: 210 + value: 410 1987-01-01: - value: 220 + value: 430 1988-01-01: - value: 225 + value: 440 1989-01-01: - value: 230 + value: 450 1990-01-01: note: >- Minijobgrenze differs between West and East Germany. See ``parameter_minijobgrenze_ost_west_unterschied``. 2000-01-01: - value: 322 + value: 630 2002-01-01: + unit: EUR_PER_MONTH value: 325 2003-04-01: value: 400 @@ -43,39 +43,52 @@ parameter_minijobgrenze_ost_west_unterschied: description: de: Minijob § 8 (1) Nr. 1 SGB IV en: Minijob § 8 (1) Nr. 1 SGB IV - unit: Euros - reference_period: Month + unit: DM_PER_MONTH type: dict 1990-01-01: - west: 240 - ost: 102 + west: 470 + ost: 200 1991-01-01: - west: 245 - ost: 120 + west: 480 + ost: 220 + reference: § 8 Abs. 1 Nr. 1 SGB IV. + note: >- + Ein Siebtel der Bezugsgröße (West 3 360, Ost 1 540 Deutsche Mark). Die + Bezugsgröße (Ost) für das erste Halbjahr 1991 beruht auf dem Gesetz über die + Sozialversicherung der DDR v. 28.06.1990 (GBl. I Nr. 38 S. 486) und steht nicht + im Bundesgesetzblatt. + 1991-07-01: + updates_previous: true + ost: 250 + reference: >- + § 1 V. v. 19.06.1991 BGBl. I S. 1300 (Zweite V. zur Anpassung der Renten). + note: >- + Die Bezugsgröße (Ost) steigt zum 1. Juli 1991 von 1 540 auf 1 750 Deutsche Mark; + die Grenze ist ein Siebtel davon (§ 8 Abs. 1 Nr. 1 SGB IV). 1992-01-01: - west: 256 - ost: 153 + west: 500 + ost: 300 1993-01-01: - west: 271 - ost: 199 + west: 530 + ost: 390 1994-01-01: - west: 286 - ost: 225 + west: 560 + ost: 440 1995-01-01: - west: 297 - ost: 240 + west: 580 + ost: 470 1996-01-01: - west: 302 - ost: 256 + west: 590 + ost: 500 1997-01-01: - west: 312 - ost: 266 + west: 610 + ost: 520 1998-01-01: updates_previous: true - west: 317 + west: 620 1999-01-01: - west: 322 - ost: 271 + west: 630 + ost: 530 2000-01-01: note: >- Minijob thresholds do not differ between West and East Germany. See @@ -89,8 +102,9 @@ faktoren_minijobformel: description: de: §8 (1a) SGB IV en: §8 (1a) SGB IV - unit: null - reference_period: null + unit: + zähler: HOURS + nenner: MONTHS type: dict 2022-10-01: zähler: 130 diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py index 14142542c5..ced452d87a 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py @@ -2,30 +2,32 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, ) -> float: """Long-term care insurance contributions paid by the insured person.""" - return betrag_versicherter_regulärer_beitragssatz + return betrag_versicherter_regulärer_beitragssatz_m @policy_function( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, betrag_selbstständig_m: float, sozialversicherung__geringfügig_beschäftigt: bool, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, betrag_rentner_m: float, ) -> float: """Long-term care insurance contributions paid by the insured person. @@ -38,7 +40,7 @@ def betrag_versicherter_m_ohne_midijob( elif sozialversicherung__geringfügig_beschäftigt: out = 0.0 else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m # Add the care insurance contribution for pensions return out + betrag_rentner_m @@ -47,6 +49,7 @@ def betrag_versicherter_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_mit_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -54,7 +57,7 @@ def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, sozialversicherung__in_gleitzone: bool, betrag_versicherter_in_gleitzone_m: float, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, betrag_rentner_m: float, ) -> float: """Long-term care insurance contributions paid by the insured person.""" @@ -65,7 +68,7 @@ def betrag_versicherter_m_mit_midijob( elif sozialversicherung__in_gleitzone: out = betrag_versicherter_in_gleitzone_m else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m # Add the care insurance contribution for pensions return out + betrag_rentner_m @@ -74,6 +77,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_bis_03_1999( betrag_arbeitgeber_regulärer_beitragssatz_m: float, @@ -86,6 +90,7 @@ def betrag_arbeitgeber_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -110,6 +115,7 @@ def betrag_arbeitgeber_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -135,7 +141,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function(start_date="1995-01-01") +@policy_function(start_date="1995-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_selbstständig_m( sozialversicherung__kranken__beitrag__bemessungsgrundlage_selbstständig_m: float, beitragssatz_arbeitnehmer: float, @@ -151,8 +157,8 @@ def betrag_selbstständig_m( ) -@policy_function(start_date="1995-01-01") -def betrag_versicherter_regulärer_beitragssatz( +@policy_function(start_date="1995-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) +def betrag_versicherter_regulärer_beitragssatz_m( sozialversicherung__kranken__beitrag__einkommen_m: float, beitragssatz_arbeitnehmer: float, ) -> float: @@ -162,7 +168,7 @@ def betrag_versicherter_regulärer_beitragssatz( return sozialversicherung__kranken__beitrag__einkommen_m * beitragssatz_arbeitnehmer -@policy_function(start_date="1995-01-01") +@policy_function(start_date="1995-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_arbeitgeber_regulärer_beitragssatz_m( sozialversicherung__kranken__beitrag__einkommen_m: float, beitragssatz_arbeitgeber: float, @@ -176,6 +182,7 @@ def betrag_arbeitgeber_regulärer_beitragssatz_m( @policy_function( start_date="2003-04-01", end_date="2022-09-30", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_gesamt_in_gleitzone_m( sozialversicherung__midijob_bemessungsentgelt_m: float, @@ -192,6 +199,7 @@ def betrag_gesamt_in_gleitzone_m( start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_arbeitgeber_in_gleitzone_m: float, @@ -205,6 +213,7 @@ def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberb start_date="2022-10-01", end_date="2023-06-30", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_direkt( sozialversicherung__beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m: float, @@ -220,6 +229,7 @@ def betrag_versicherter_in_gleitzone_m_direkt( @policy_function( start_date="2023-07-01", leaf_name="betrag_versicherter_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_midijob_m_mit_verringertem_beitrag_für_eltern_mit_mehreren_kindern( anzahl_kinder_bis_24: int, @@ -256,6 +266,7 @@ def betrag_versicherter_midijob_m_mit_verringertem_beitrag_für_eltern_mit_mehre start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_arbeitgeber_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_als_anteil_des_bruttolohns( einnahmen__bruttolohn_m: float, @@ -265,7 +276,11 @@ def betrag_arbeitgeber_in_gleitzone_m_als_anteil_des_bruttolohns( return einnahmen__bruttolohn_m * beitragssatz_arbeitgeber -@policy_function(start_date="2022-10-01", leaf_name="betrag_arbeitgeber_in_gleitzone_m") +@policy_function( + start_date="2022-10-01", + leaf_name="betrag_arbeitgeber_in_gleitzone_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_in_gleitzone_m_als_anteil_der_beitragspflichtigen_einnahmen( sozialversicherung__midijob_bemessungsentgelt_m: float, sozialversicherung__beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m: float, @@ -285,6 +300,7 @@ def betrag_arbeitgeber_in_gleitzone_m_als_anteil_der_beitragspflichtigen_einnahm start_date="1995-01-01", end_date="2004-03-31", leaf_name="betrag_rentner_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_rentner_m_reduzierter_beitrag( sozialversicherung__kranken__beitrag__bemessungsgrundlage_rente_m: float, @@ -304,6 +320,7 @@ def betrag_rentner_m_reduzierter_beitrag( start_date="2004-04-01", end_date="2004-12-31", leaf_name="betrag_rentner_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_rentner_m_ohne_zusatz_für_kinderlose( sozialversicherung__kranken__beitrag__bemessungsgrundlage_rente_m: float, @@ -318,7 +335,11 @@ def betrag_rentner_m_ohne_zusatz_für_kinderlose( ) -@policy_function(start_date="2005-01-01", leaf_name="betrag_rentner_m") +@policy_function( + start_date="2005-01-01", + leaf_name="betrag_rentner_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_rentner_m_mit_zusatz_für_kinderlose( sozialversicherung__kranken__beitrag__bemessungsgrundlage_rente_m: float, beitragssatz_arbeitnehmer: float, diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py index 51df505a2d..eb5bf0c9bc 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py @@ -4,13 +4,18 @@ from gettsim.tt import ( AggType, + TTSIMUnit, agg_by_p_id_function, param_function, policy_function, ) -@param_function(start_date="1995-01-01", end_date="2004-12-31") +@param_function( + start_date="1995-01-01", + end_date="2004-12-31", + unit=TTSIMUnit.DIMENSIONLESS, +) def beitragssatz_arbeitnehmer(beitragssatz: float) -> float: """Employee's long-term care insurance contribution rate.""" return beitragssatz / 2 @@ -20,6 +25,7 @@ def beitragssatz_arbeitnehmer(beitragssatz: float) -> float: start_date="2005-01-01", end_date="2023-06-30", leaf_name="beitragssatz_arbeitnehmer", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_zusatz_kinderlos_dummy( zahlt_zusatzbetrag_kinderlos: bool, @@ -44,6 +50,7 @@ def beitragssatz_arbeitnehmer_zusatz_kinderlos_dummy( @policy_function( start_date="2023-07-01", leaf_name="beitragssatz_arbeitnehmer", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_mit_abschlag_nach_kinderzahl( anzahl_kinder_bis_24: int, @@ -69,7 +76,7 @@ def beitragssatz_arbeitnehmer_mit_abschlag_nach_kinderzahl( return base + add -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def zahlt_zusatzbetrag_kinderlos( hat_kinder: bool, alter: int, @@ -83,7 +90,9 @@ def zahlt_zusatzbetrag_kinderlos( return (not hat_kinder) and alter >= zusatz_kinderlos_mindestalter -@agg_by_p_id_function(agg_type=AggType.SUM, start_date="2005-01-01") +@agg_by_p_id_function( + agg_type=AggType.SUM, start_date="2005-01-01", unit=TTSIMUnit.PERSON_COUNT +) def anzahl_kinder_bis_24_elternteil_1( alter_bis_24: bool, einkommensteuer__p_id_kinderfreibetragsempfänger_1: int, @@ -92,7 +101,9 @@ def anzahl_kinder_bis_24_elternteil_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM, start_date="2005-01-01") +@agg_by_p_id_function( + agg_type=AggType.SUM, start_date="2005-01-01", unit=TTSIMUnit.PERSON_COUNT +) def anzahl_kinder_bis_24_elternteil_2( alter_bis_24: bool, einkommensteuer__p_id_kinderfreibetragsempfänger_2: int, @@ -101,7 +112,7 @@ def anzahl_kinder_bis_24_elternteil_2( pass -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.PERSON_COUNT) def anzahl_kinder_bis_24( anzahl_kinder_bis_24_elternteil_1: int, anzahl_kinder_bis_24_elternteil_2: int, @@ -114,13 +125,18 @@ def anzahl_kinder_bis_24( start_date="1995-01-01", end_date="2004-12-31", leaf_name="beitragssatz_arbeitgeber", + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_einheitliche_basis(beitragssatz: float) -> float: """Employer's long-term care insurance contribution rate.""" return beitragssatz / 2 -@param_function(start_date="2005-01-01", leaf_name="beitragssatz_arbeitgeber") +@param_function( + start_date="2005-01-01", + leaf_name="beitragssatz_arbeitgeber", + unit=TTSIMUnit.DIMENSIONLESS, +) def beitragssatz_arbeitgeber_basis_nach_kinderzahl( beitragssatz_nach_kinderzahl: dict[str, float], ) -> float: diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.yaml b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.yaml index 35cfde1707..71de0e816f 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.yaml +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.yaml @@ -8,8 +8,7 @@ beitragssatz: Beitragssatz ist unabhängig von der Anzahl der Kinder. en: >- Contribution rate is independent of the number of children. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar add_jahresanfang: true 1995-01-01: @@ -29,8 +28,7 @@ beitragssatz_nach_kinderzahl: Beitragssatz ist abhängig von der Anzahl der Kinder. en: >- Contribution rate is dependent on the number of children. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: dict add_jahresanfang: true 2005-01-01: @@ -82,8 +80,7 @@ zusatz_kinderlos_mindestalter: § 55 Abs. 3 SGB XI, KiBG Art. 1 Childless members of the social care insurance, who have reached the age of 23, have to pay a higher contribution rate since January 1, 2005. - unit: Years - reference_period: null + unit: YEARS type: scalar 2005-01-01: value: 23 diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/inputs.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/inputs.py index 81ae2fdbf2..e305cf35b6 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/inputs.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/inputs.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def hat_kinder() -> bool: """Parent of at least one child (including children in other households, adopted, adult, and deceased children). diff --git "a/src/gettsim/germany/sozialversicherung/regul\303\244r_besch\303\244ftigt.py" "b/src/gettsim/germany/sozialversicherung/regul\303\244r_besch\303\244ftigt.py" index 47e837577b..96acf97dc9 100644 --- "a/src/gettsim/germany/sozialversicherung/regul\303\244r_besch\303\244ftigt.py" +++ "b/src/gettsim/germany/sozialversicherung/regul\303\244r_besch\303\244ftigt.py" @@ -2,24 +2,32 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2003-03-31", leaf_name="regulär_beschäftigt") +@policy_function( + end_date="2003-03-31", + leaf_name="regulär_beschäftigt", + unit=TTSIMUnit.DIMENSIONLESS, +) def regulär_beschäftigt_vor_midijob( einnahmen__bruttolohn_m: float, - minijobgrenze: float, + minijobgrenze_m: float, ) -> bool: """Employee is in regular employment, earning more than the marginal employment threshold. """ - return einnahmen__bruttolohn_m >= minijobgrenze + return einnahmen__bruttolohn_m >= minijobgrenze_m -@policy_function(start_date="2003-04-01", leaf_name="regulär_beschäftigt") +@policy_function( + start_date="2003-04-01", + leaf_name="regulär_beschäftigt", + unit=TTSIMUnit.DIMENSIONLESS, +) def regulär_beschäftigt_mit_midijob( einnahmen__bruttolohn_m: float, - midijobgrenze: float, + midijobgrenze_m: float, ) -> bool: """Employee is in regular employment, earning more than the midijob threshold.""" - return einnahmen__bruttolohn_m >= midijobgrenze + return einnahmen__bruttolohn_m >= midijobgrenze_m diff --git a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py index 5c3b47afba..a63f4b1568 100644 --- a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py +++ b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py @@ -4,10 +4,10 @@ from ttsim.unit_converters import m_to_y -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.YEARS) def alter_bei_renteneintritt( jahr_renteneintritt: int, monat_renteneintritt: int, diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py index 0e209df717..4bf45e3d30 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py @@ -6,7 +6,7 @@ from ttsim.unit_converters import m_to_y -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function if TYPE_CHECKING: from types import ModuleType @@ -15,6 +15,7 @@ @policy_function( end_date="2011-12-31", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_arbeitslosigkeit_frauen_ohne_besonders_langjährig( wegen_arbeitslosigkeit__grundsätzlich_anspruchsberechtigt: bool, @@ -51,6 +52,7 @@ def altersgrenze_mit_arbeitslosigkeit_frauen_ohne_besonders_langjährig( start_date="2012-01-01", end_date="2017-12-31", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_arbeitslosigkeit_frauen_besonders_langjährig( für_frauen__grundsätzlich_anspruchsberechtigt: bool, @@ -98,6 +100,7 @@ def altersgrenze_mit_arbeitslosigkeit_frauen_besonders_langjährig( @policy_function( start_date="2018-01-01", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_besonders_langjährig_ohne_arbeitslosigkeit_frauen( besonders_langjährig__grundsätzlich_anspruchsberechtigt: bool, @@ -129,6 +132,7 @@ def altersgrenze_mit_besonders_langjährig_ohne_arbeitslosigkeit_frauen( @policy_function( end_date="2017-12-31", leaf_name="altersgrenze_vorzeitig", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_arbeitslosigkeit_frauen( wegen_arbeitslosigkeit__grundsätzlich_anspruchsberechtigt: bool, @@ -165,7 +169,9 @@ def altersgrenze_vorzeitig_mit_arbeitslosigkeit_frauen( return out -@policy_function(start_date="2018-01-01", leaf_name="altersgrenze_vorzeitig") +@policy_function( + start_date="2018-01-01", leaf_name="altersgrenze_vorzeitig", unit=TTSIMUnit.YEARS +) def altersgrenze_vorzeitig_ohne_arbeitslosigkeit_frauen( langjährig__grundsätzlich_anspruchsberechtigt: bool, langjährig__altersgrenze_vorzeitig: float, @@ -189,6 +195,7 @@ def altersgrenze_vorzeitig_ohne_arbeitslosigkeit_frauen( @policy_function( end_date="2017-12-31", leaf_name="vorzeitig_grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, ) def vorzeitig_grundsätzlich_anspruchsberechtigt_mit_arbeitslosigkeit_frauen( für_frauen__grundsätzlich_anspruchsberechtigt: bool, @@ -212,6 +219,7 @@ def vorzeitig_grundsätzlich_anspruchsberechtigt_mit_arbeitslosigkeit_frauen( @policy_function( start_date="2018-01-01", leaf_name="vorzeitig_grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, ) def vorzeitig_grundsätzlich_anspruchsberechtigt_vorzeitig_ohne_arbeitslosigkeit_frauen( langjährig__grundsätzlich_anspruchsberechtigt: bool, @@ -223,7 +231,9 @@ def vorzeitig_grundsätzlich_anspruchsberechtigt_vorzeitig_ohne_arbeitslosigkeit return langjährig__grundsätzlich_anspruchsberechtigt -@policy_function(end_date="2017-12-31", leaf_name="referenzalter_abschlag") +@policy_function( + end_date="2017-12-31", leaf_name="referenzalter_abschlag", unit=TTSIMUnit.YEARS +) def referenzalter_abschlag_mit_arbeitslosigkeit_frauen( wegen_arbeitslosigkeit__grundsätzlich_anspruchsberechtigt: bool, wegen_arbeitslosigkeit__altersgrenze: float, @@ -291,7 +301,9 @@ def referenzalter_abschlag_mit_arbeitslosigkeit_frauen( return out -@policy_function(start_date="2018-01-01", leaf_name="referenzalter_abschlag") +@policy_function( + start_date="2018-01-01", leaf_name="referenzalter_abschlag", unit=TTSIMUnit.YEARS +) def referenzalter_abschlag_ohne_arbeitslosigkeit_frauen( langjährig__grundsätzlich_anspruchsberechtigt: bool, langjährig__altersgrenze: float, @@ -310,7 +322,7 @@ def referenzalter_abschlag_ohne_arbeitslosigkeit_frauen( return out -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def hat_regelaltersgrenze_erreicht( alter_monate: int, sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze: float, @@ -325,7 +337,7 @@ def hat_regelaltersgrenze_erreicht( ) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def älter_als_regelaltersgrenze( alter_monate: int, sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze: float, @@ -337,5 +349,6 @@ def älter_als_regelaltersgrenze( # Floating comparison may fail due to rounding errors if alter == Regelaltersgrenze. # Hence, we add a number << 1 / 12 to the RHS. return m_to_y(alter_monate) > ( - sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze + 0.00001 + sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze + + cast_unit(0.00001, TTSIMUnit.YEARS) ) diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py index 74f4e2980e..91ebfa4fd6 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py @@ -2,19 +2,40 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function @policy_function( + end_date="2001-12-31", + rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_MONTH, + base=0.01, + direction="nearest", + reference="§ 123 SGB VI Abs. 1", + ), + leaf_name="betrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) +def betrag_m_bis_2001( + bruttorente_m: float, + sozialversicherung__rente__bezieht_rente: bool, +) -> float: + return bruttorente_m if sozialversicherung__rente__bezieht_rente else 0.0 + + +@policy_function( + start_date="2002-01-01", end_date="2020-12-31", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) -def betrag_m( +def betrag_m_ab_2002( bruttorente_m: float, sozialversicherung__rente__bezieht_rente: bool, ) -> float: @@ -24,11 +45,13 @@ def betrag_m( @policy_function( start_date="2021-01-01", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_mit_grundrente( bruttorente_m: float, @@ -47,6 +70,7 @@ def betrag_m_mit_grundrente( start_date="1992-01-01", end_date="2023-06-30", leaf_name="bruttorente_basisbetrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_basisbetrag_m_nach_wohnort( zugangsfaktor: float, @@ -78,12 +102,12 @@ def bruttorente_basisbetrag_m_nach_wohnort( return out -@policy_function(start_date="2023-07-01") +@policy_function(start_date="2023-07-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttorente_basisbetrag_m( zugangsfaktor: float, sozialversicherung__rente__entgeltpunkte: float, sozialversicherung__rente__bezieht_rente: bool, - sozialversicherung__rente__rentenwert: float, + sozialversicherung__rente__rentenwert_m: float, ) -> float: """Old-Age Pensions claim. The function follows the following equation: @@ -98,7 +122,7 @@ def bruttorente_basisbetrag_m( if sozialversicherung__rente__bezieht_rente: out = ( sozialversicherung__rente__entgeltpunkte - * sozialversicherung__rente__rentenwert + * sozialversicherung__rente__rentenwert_m * zugangsfaktor ) else: @@ -107,7 +131,7 @@ def bruttorente_basisbetrag_m( return out -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def zugangsfaktor( sozialversicherung__rente__alter_bei_renteneintritt: float, regelaltersrente__altersgrenze: float, diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/altersgrenze.yaml" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/altersgrenze.yaml" index 215e58238e..95350c2b67 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/altersgrenze.yaml" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/altersgrenze.yaml" @@ -10,8 +10,7 @@ altersgrenze: en: >- § 38 SGB VI https://sozialversicherung-kompetent.de/rentenversicherung/leistungsrecht/249-altersrente-fuer-besonders-langjaehrig-versicherte.html - unit: Years - reference_period: null + unit: YEARS type: scalar 2007-04-30: reference: RV-Altersgrenzenanpassungsgesetz 2007. BGBl. I S. 554 2007 @@ -63,8 +62,8 @@ altersgrenze_gestaffelt: age, we need the actually feasible retirement ages as inputs. The inputs therefore require monthly precision up to cohort 1952. From then we need annual precision. - unit: Years - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: YEARS type: year_based_phase_inout_of_age_thresholds 2014-06-23: reference: RV-Leistungsverbesserungsgesetz 2014. BGBl. I S. 787 2014 diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/besonders_langj\303\244hrig.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/besonders_langj\303\244hrig.py" index 9456aca974..a741d6fa0d 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/besonders_langj\303\244hrig.py" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/besonders_langj\303\244hrig.py" @@ -2,12 +2,13 @@ from __future__ import annotations -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, TTSIMUnit, policy_function @policy_function( start_date="2014-06-23", end_date="2028-12-31", + unit=TTSIMUnit.YEARS, ) def altersgrenze( geburtsjahr: int, @@ -26,7 +27,7 @@ def altersgrenze( return altersgrenze_gestaffelt.look_up(geburtsjahr) -@policy_function(start_date="2012-01-01") +@policy_function(start_date="2012-01-01", unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( sozialversicherung__rente__wartezeit_45_jahre_erfüllt: bool, ) -> bool: diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/altersgrenze.yaml" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/altersgrenze.yaml" index c938b461a2..185a60bf38 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/altersgrenze.yaml" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/altersgrenze.yaml" @@ -20,8 +20,7 @@ altersgrenze: waiting period of 15 years and 10 years of contributions after age 40). The age threshold was increase by one month for each birthmonth up to age 65 for cohort 1945. - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 60 @@ -51,8 +50,8 @@ altersgrenze_gestaffelt: waiting period of 15 years and 10 years of contributions after age 40). The age threshold was increase by one month for each birthmonth up to age 65 for cohort 1945. - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 1989-12-18: reference: Rentenreformgesetz 1992. BGBl. I S. 2261 1989 § 41 @@ -465,8 +464,7 @@ altersgrenze_vorzeitig: § 237a SGB VI Earliest possible age to receive pension for women (with deductions). https://www.sozialgesetzbuch-sgb.de/sgbvi/237a.html - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 60.0 @@ -495,8 +493,8 @@ altersgrenze_vorzeitig_gestaffelt: § 237a SGB VI Earliest possible age to receive pension for women (with deductions). https://www.sozialgesetzbuch-sgb.de/sgbvi/237a.html - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 1989-12-18: reference: Rentenreformgesetz 1992. BGBl. I S. 2261 1989 § 41 diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/anspruch.yaml" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/anspruch.yaml" index 7b9ed877d5..29c4ff2ebe 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/anspruch.yaml" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/anspruch.yaml" @@ -10,8 +10,7 @@ kohorte_abschaffung: en: >- Cohort from which pension for women has been abolished https://www.sozialgesetzbuch-sgb.de/sgbvi/237a.html - unit: Years - reference_period: null + unit: CALENDAR_YEAR type: scalar 1997-12-16: reference: § 237a SGB VI, Rentenreformgesetz 1999. BGBl. I 1997 S. 2998 @@ -33,8 +32,7 @@ mindestpflichtbeitragsjahre_ab_alter_40: for pension for women. § 237a SGB VI https://www.sozialgesetzbuch-sgb.de/sgbvi/237a.html - unit: Years - reference_period: null + unit: YEARS type: scalar 1950-01-01: value: 10 diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/f\303\274r_frauen.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/f\303\274r_frauen.py" index 2cc94ea781..190d06273a 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/f\303\274r_frauen.py" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/f\303\274r_frauen.py" @@ -7,13 +7,18 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ( + ConsecutiveIntLookupTableParamValue, + TTSIMUnit, + policy_function, +) @policy_function( start_date="1989-12-18", end_date="2017-12-31", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_staffelung( geburtsjahr: int, @@ -34,6 +39,7 @@ def altersgrenze_mit_staffelung( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_staffelung( geburtsjahr: int, @@ -50,7 +56,11 @@ def altersgrenze_vorzeitig_mit_staffelung( return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) -@policy_function(end_date="1997-12-15", leaf_name="grundsätzlich_anspruchsberechtigt") +@policy_function( + end_date="1997-12-15", + leaf_name="grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, +) def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( weiblich: bool, sozialversicherung__rente__wartezeit_15_jahre_erfüllt: bool, @@ -75,6 +85,7 @@ def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( start_date="1997-12-16", end_date="2017-12-31", leaf_name="grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_mit_prüfung_geburtsjahr( weiblich: bool, diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/inputs.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/inputs.py" index 60c3bdcfa6..c29293f109 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/inputs.py" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/inputs.py" @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2017-12-31") +@policy_input(end_date="2017-12-31", unit=TTSIMUnit.YEARS) def pflichtsbeitragsjahre_ab_alter_40() -> float: """Total years of mandatory contributions after age 40.""" diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py index bb015335b7..85b924da8e 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py @@ -1,18 +1,55 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function @policy_function( + end_date="2001-12-31", + rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_MONTH, + base=0.01, + direction="nearest", + reference="§ 123 SGB VI Abs. 1", + ), + leaf_name="bruttorente_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) +def bruttorente_m_mit_harter_hinzuverdienstgrenze_bis_2001( + alter: int, + regelaltersrente__altersgrenze: float, + einnahmen__bruttolohn_m: float, + bruttorente_basisbetrag_m: float, + hinzuverdienstgrenze_m: float, +) -> float: + """Pension benefits after earnings test for early retirees. + + If earnings are above an earnings limit, the pension is fully deducted. + """ + # TODO (@MImmesberger): Use age with monthly precision. + # https://github.com/ttsim-dev/gettsim/issues/781 + if (alter >= regelaltersrente__altersgrenze) or ( + einnahmen__bruttolohn_m <= hinzuverdienstgrenze_m + ): + out = bruttorente_basisbetrag_m + else: + out = 0.0 + + return out + + +@policy_function( + start_date="2002-01-01", end_date="2017-06-30", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="bruttorente_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) -def bruttorente_m_mit_harter_hinzuverdienstgrenze( +def bruttorente_m_mit_harter_hinzuverdienstgrenze_ab_2002( alter: int, regelaltersrente__altersgrenze: float, einnahmen__bruttolohn_m: float, @@ -40,10 +77,12 @@ def bruttorente_m_mit_harter_hinzuverdienstgrenze( end_date="2022-12-31", leaf_name="bruttorente_m", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_m_mit_hinzuverdienstdeckel( alter: int, @@ -77,6 +116,7 @@ def bruttorente_m_mit_hinzuverdienstdeckel( @policy_function( start_date="2017-07-01", end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def zahlbetrag_ohne_deckel_m( einnahmen__bruttolohn_m: float, @@ -110,6 +150,7 @@ def zahlbetrag_ohne_deckel_m( @policy_function( start_date="2017-07-01", end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def differenz_bruttolohn_hinzuverdienstgrenze_m( einnahmen__bruttolohn_m: float, @@ -125,6 +166,7 @@ def differenz_bruttolohn_hinzuverdienstgrenze_m( @policy_function( start_date="2017-07-01", end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def differenz_bruttolohn_hinzuverdienstdeckel_m( einnahmen__bruttolohn_m: float, @@ -144,10 +186,12 @@ def differenz_bruttolohn_hinzuverdienstdeckel_m( start_date="2023-01-01", leaf_name="bruttorente_m", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_m_ohne_einkommensanrechnung( bruttorente_basisbetrag_m: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.yaml b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.yaml index a07b33d0bc..d16260e4ca 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.yaml @@ -10,8 +10,7 @@ abzugsrate_hinzuverdienst: en: >- Deduction rate for additional earnings during early retirement § 34 SGB VI; Artikel 1 G. v. 08.12.2016 BGBl. I S. 2838 - unit: Years - reference_period: null + unit: DIMENSIONLESS type: scalar 2017-07-01: value: 0.4 @@ -26,8 +25,7 @@ hinzuverdienstgrenze_m: § 34 SGB VI, Hinzuverdienstgrenze vor der Regelaltersgrenze en: >- § 34 SGB VI, additional earnings threshold during early retirement - unit: Euros - reference_period: Year + unit: EUR_PER_MONTH type: scalar 2002-01-01: value: 350.0 @@ -46,8 +44,7 @@ hinzuverdienstgrenze_y: § 34 SGB VI, Hinzuverdienstgrenze vor der Regelaltersgrenze en: >- § 34 SGB VI, additional earnings threshold during early retirement - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2017-01-01: value: 6300.0 diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/inputs.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/inputs.py index 82fb7652c7..7aafd0dd49 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/inputs.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/inputs.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2022-12-31") +@policy_input(end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR) def höchster_bruttolohn_letzte_15_jahre_vor_rente_y() -> float: """Highest gross income from regular employment in the last 15 years before pension benefit claiming. Relevant to determine pension benefit deductions for retirees in diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/altersgrenze.yaml" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/altersgrenze.yaml" index 00c029a23d..f06ba9d21e 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/altersgrenze.yaml" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/altersgrenze.yaml" @@ -12,8 +12,7 @@ altersgrenze: Entry age for long term insured (35 insurance years) without deductions (FRA) § 236 SGB VI https://sozialversicherung-kompetent.de/rentenversicherung/leistungsrecht/242-altersrente-fuer-langjaehrig-versicherte-altersgrenzen.html - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 63.0 @@ -33,8 +32,8 @@ altersgrenze_gestaffelt: Entry age for long term insured (35 insurance years) without deductions (FRA) § 236 SGB VI https://sozialversicherung-kompetent.de/rentenversicherung/leistungsrecht/242-altersrente-fuer-langjaehrig-versicherte-altersgrenzen.html - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 1989-12-18: reference: Rentenreformgesetz 1992. BGBl. I S. 2261 1989 § 41 @@ -301,8 +300,7 @@ altersgrenze_vorzeitig: Earliest possible age to receive pension for long term insured (with deductions). § 236 SGB VI https://www.sozialgesetzbuch-sgb.de/sgbvi/236.html - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 63.0 @@ -339,8 +337,8 @@ altersgrenze_vorzeitig_gestaffelt: Earliest possible age to receive pension for long term insured (with deductions). § 236 SGB VI https://www.sozialgesetzbuch-sgb.de/sgbvi/236.html - unit: Years - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: YEARS type: year_based_phase_inout_of_age_thresholds 1989-12-18: reference: Rentenreformgesetz 1992. BGBl. I S. 2261 1989 § 41 diff --git "a/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/langj\303\244hrig.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/langj\303\244hrig.py" index 4ca06532ae..1792fca763 100644 --- "a/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/langj\303\244hrig.py" +++ "b/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/langj\303\244hrig.py" @@ -4,12 +4,17 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ( + ConsecutiveIntLookupTableParamValue, + TTSIMUnit, + policy_function, +) @policy_function( start_date="1989-12-18", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_gestaffelt_ab_1989( geburtsjahr: int, @@ -34,6 +39,7 @@ def altersgrenze_gestaffelt_ab_1989( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_gestaffelt_ab_1989_bis_1996( geburtsjahr: int, @@ -46,7 +52,7 @@ def altersgrenze_vorzeitig_gestaffelt_ab_1989_bis_1996( return altersgrenze_vorzeitig_gestaffelt.look_up(geburtsjahr) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( sozialversicherung__rente__wartezeit_35_jahre_erfüllt: bool, ) -> bool: diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/altersgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/altersgrenze.yaml index bba4de9d0c..e3c0f57be8 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/altersgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/altersgrenze.yaml @@ -14,8 +14,7 @@ altersgrenze: Normal retirement age from which pension can be received. If retirement benefits are claimed earlier or later, the Zugangsfaktor and thus the pension entitlement is higher or lower unless special regulations apply. - unit: Years - reference_period: null + unit: YEARS type: scalar 1957-02-26: reference: Rentenreformgesetz 1957 BGBl. I S. 88 @@ -42,8 +41,8 @@ altersgrenze_gestaffelt: Normal retirement age from which pension can be received. If retirement benefits are claimed earlier or later, the Zugangsfaktor and thus the pension entitlement is higher or lower unless special regulations apply. - unit: Years - reference_period: null + input_unit: CALENDAR_YEAR + output_unit: YEARS type: year_based_phase_inout_of_age_thresholds 2007-04-20: reference: RV-Altersgrenzenanpassungsgesetz 20.04.2007. BGBl. I S. 554 diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/regelaltersrente.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/regelaltersrente.py index 254cdea1b2..4fdc8d3650 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/regelaltersrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/regelaltersrente.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, TTSIMUnit, policy_function -@policy_function(start_date="2007-04-20", end_date="2030-12-31") +@policy_function(start_date="2007-04-20", end_date="2030-12-31", unit=TTSIMUnit.YEARS) def altersgrenze( geburtsjahr: int, altersgrenze_gestaffelt: ConsecutiveIntLookupTableParamValue, @@ -23,7 +23,7 @@ def altersgrenze( return altersgrenze_gestaffelt.look_up(geburtsjahr) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( sozialversicherung__rente__mindestwartezeit_erfüllt: bool, ) -> bool: diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/altersgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/altersgrenze.yaml index c958034cbc..516ded54b3 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/altersgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/altersgrenze.yaml @@ -13,8 +13,7 @@ altersgrenze: Earliest possible age to receive pension for unemployed without deductions. § 237 SGB VI https://www.gesetze-im-internet.de/sgb_6/__237.html - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 60.0 @@ -36,8 +35,8 @@ altersgrenze_gestaffelt: Earliest possible age to receive pension for unemployed without deductions. § 237 SGB VI https://www.gesetze-im-internet.de/sgb_6/__237.html - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 1989-12-18: reference: Rentenreformgesetz 1992. BGBl. I S. 2261 1989 § 41 @@ -650,8 +649,8 @@ altersgrenze_gestaffelt_vertrauensschutz: en: >- Trust protection rules protect certain groups of people from the increase of the age threshold. - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 1996-07-29: reference: Ruhestandsförderungsgesetz 1996. BGBl. I S. 1078 1996. @@ -723,8 +722,7 @@ altersgrenze_vorzeitig: § 237 SGB VI https://www.gesetze-im-internet.de/sgb_6/__237.html https://www.buzer.de/Anlage_19_SGB_VI.htm - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 60.0 @@ -758,8 +756,8 @@ altersgrenze_vorzeitig_gestaffelt: § 237 SGB VI https://www.gesetze-im-internet.de/sgb_6/__237.html https://www.buzer.de/Anlage_19_SGB_VI.htm - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 1989-12-18: reference: Rentenreformgesetz 1992. BGBl. I S. 2261 1989 § 41 @@ -1071,8 +1069,7 @@ altersgrenze_vorzeitig_mit_vertrauensschutz: en: >- Trust protection rules protect certain groups of people from the increase of the age threshold. - unit: null - reference_period: null + unit: YEARS type: scalar 1996-07-29: reference: Ruhestandsförderungsgesetz 1996. BGBl. I S. 1078 1996. diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/anspruch.yaml b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/anspruch.yaml index de1379de02..ec0d004742 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/anspruch.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/anspruch.yaml @@ -7,8 +7,7 @@ kohorte_abschaffung: de: >- Erster Geburtsjahrgang ohne Rente für Arbeitslose Rentenreformgesetz 1999. BGBl. I S. 2998 1997 - unit: Years - reference_period: null + unit: CALENDAR_YEAR type: scalar 1997-12-16: value: 1952 diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/inputs.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/inputs.py index 26894e9780..e00d0db7bd 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/inputs.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/inputs.py @@ -2,27 +2,31 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2017-12-31") +@policy_input(end_date="2017-12-31", unit=TTSIMUnit.DIMENSIONLESS) def arbeitslos_für_1_jahr_nach_alter_58_ein_halb() -> bool: """Has been unemployed at least 1 year after age 58.5.""" -@policy_input(end_date="2017-12-31") +@policy_input(end_date="2017-12-31", unit=TTSIMUnit.DIMENSIONLESS) def pflichtbeitragsjahre_8_von_10() -> bool: """Has at least 8 contribution years in past 10 years.""" -@policy_input(start_date="1996-07-29", end_date="2009-12-31") +@policy_input( + start_date="1996-07-29", end_date="2009-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def vertrauensschutz_1997() -> bool: """Is covered by Vertrauensschutz rules for the Altersrente wegen Arbeitslosigkeit implemented in 1997 (§ 237 SGB VI Abs. 4). """ -@policy_input(start_date="2004-07-26", end_date="2017-12-31") +@policy_input( + start_date="2004-07-26", end_date="2017-12-31", unit=TTSIMUnit.DIMENSIONLESS +) def vertrauensschutz_2004() -> bool: """Is covered by Vertrauensschutz rules for the Altersrente wegen Arbeitslosigkeit enacted in July 2004 (§ 237 SGB VI Abs. 5). diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/wegen_arbeitslosigkeit.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/wegen_arbeitslosigkeit.py index 7474260e78..d89625834e 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/wegen_arbeitslosigkeit.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/wegen_arbeitslosigkeit.py @@ -11,13 +11,18 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ( + ConsecutiveIntLookupTableParamValue, + TTSIMUnit, + policy_function, +) @policy_function( start_date="1989-12-18", end_date="1996-07-28", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_bis_1996( geburtsjahr: int, @@ -37,6 +42,7 @@ def altersgrenze_bis_1996( start_date="1996-07-29", end_date="2009-12-31", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_vertrauensschutzprüfung( vertrauensschutz_1997: bool, @@ -60,6 +66,7 @@ def altersgrenze_mit_vertrauensschutzprüfung( start_date="2010-01-01", end_date="2017-12-31", leaf_name="altersgrenze", + unit=TTSIMUnit.YEARS, ) def altersgrenze_ab_2010( altersgrenze_ohne_vertrauensschutz: float, @@ -78,6 +85,7 @@ def altersgrenze_ab_2010( start_date="1989-12-18", end_date="1996-07-28", leaf_name="altersgrenze_vorzeitig", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( geburtsjahr: int, @@ -97,6 +105,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( start_date="1996-07-29", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_1996_bis_09_1996( vertrauensschutz_1997: bool, @@ -119,6 +128,7 @@ def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_1996_bis_09_1996( start_date="2004-07-26", end_date="2017-12-31", leaf_name="altersgrenze_vorzeitig", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_2004( vertrauensschutz_2004: bool, @@ -139,7 +149,7 @@ def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_2004( return altersgrenze_vorzeitig_ohne_vertrauensschutz -@policy_function(start_date="1989-12-18", end_date="2017-12-31") +@policy_function(start_date="1989-12-18", end_date="2017-12-31", unit=TTSIMUnit.YEARS) def altersgrenze_ohne_vertrauensschutz( geburtsjahr: int, geburtsmonat: int, @@ -156,7 +166,7 @@ def altersgrenze_ohne_vertrauensschutz( return altersgrenze_gestaffelt.look_up(birth_month_since_ad) -@policy_function(start_date="1996-07-29", end_date="2009-12-31") +@policy_function(start_date="1996-07-29", end_date="2009-12-31", unit=TTSIMUnit.YEARS) def altersgrenze_mit_vertrauensschutz( geburtsjahr: int, geburtsmonat: int, @@ -172,6 +182,7 @@ def altersgrenze_mit_vertrauensschutz( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig_ohne_vertrauensschutz", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( geburtsjahr: int, @@ -193,6 +204,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( start_date="2004-07-26", end_date="2017-12-31", leaf_name="altersgrenze_vorzeitig_ohne_vertrauensschutz", + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( geburtsjahr: int, @@ -210,7 +222,11 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) -@policy_function(end_date="2007-04-29", leaf_name="grundsätzlich_anspruchsberechtigt") +@policy_function( + end_date="2007-04-29", + leaf_name="grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, +) def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( arbeitslos_für_1_jahr_nach_alter_58_ein_halb: bool, sozialversicherung__rente__wartezeit_15_jahre_erfüllt: bool, @@ -235,6 +251,7 @@ def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( start_date="2007-04-30", end_date="2017-12-31", leaf_name="grundsätzlich_anspruchsberechtigt", + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_mit_prüfung_geburtsjahr( arbeitslos_für_1_jahr_nach_alter_58_ein_halb: bool, diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py index fad076a130..936129bf9b 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py @@ -2,23 +2,30 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="1999-03-31", leaf_name="betrag_versicherter_m") +@policy_function( + end_date="1999-03-31", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_bis_03_1999( - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, ) -> float: """Public pension insurance contributions paid by the insured person.""" - return betrag_versicherter_regulärer_beitragssatz + return betrag_versicherter_regulärer_beitragssatz_m @policy_function( - start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m" + start_date="1999-04-01", + end_date="2003-03-31", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, ) -> float: """Public pension insurance contributions paid by the insured person. @@ -28,16 +35,20 @@ def betrag_versicherter_m_ohne_midijob( if sozialversicherung__geringfügig_beschäftigt: out = 0.0 else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m return out -@policy_function(start_date="2003-04-01", leaf_name="betrag_versicherter_m") +@policy_function( + start_date="2003-04-01", + leaf_name="betrag_versicherter_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_in_gleitzone_arbeitnehmer_m: float, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, sozialversicherung__in_gleitzone: bool, ) -> float: """Public pension insurance contributions paid by the insured person. @@ -52,13 +63,13 @@ def betrag_versicherter_m_mit_midijob( elif sozialversicherung__in_gleitzone: out = betrag_in_gleitzone_arbeitnehmer_m else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m return out -@policy_function() -def betrag_versicherter_regulärer_beitragssatz( +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) +def betrag_versicherter_regulärer_beitragssatz_m( einkommen_m: float, beitragssatz: float, ) -> float: @@ -69,25 +80,27 @@ def betrag_versicherter_regulärer_beitragssatz( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_arbeitgeberpauschale( - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, ) -> float: """Employer's public pension insurance contribution. Before Minijobs were subject to pension contributions. """ - return betrag_versicherter_regulärer_beitragssatz + return betrag_versicherter_regulärer_beitragssatz_m @policy_function( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( sozialversicherung__geringfügig_beschäftigt: bool, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, einnahmen__bruttolohn_m: float, minijob_arbeitgeberpauschale: float, ) -> float: @@ -99,16 +112,20 @@ def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( if sozialversicherung__geringfügig_beschäftigt: out = einnahmen__bruttolohn_m * minijob_arbeitgeberpauschale else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m return out -@policy_function(start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m") +@policy_function( + start_date="2003-04-01", + leaf_name="betrag_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_in_gleitzone_arbeitgeber_m: float, - betrag_versicherter_regulärer_beitragssatz: float, + betrag_versicherter_regulärer_beitragssatz_m: float, sozialversicherung__in_gleitzone: bool, einnahmen__bruttolohn_m: float, minijob_arbeitgeberpauschale: float, @@ -122,12 +139,12 @@ def betrag_arbeitgeber_m_mit_midijob( elif sozialversicherung__in_gleitzone: out = betrag_in_gleitzone_arbeitgeber_m else: - out = betrag_versicherter_regulärer_beitragssatz + out = betrag_versicherter_regulärer_beitragssatz_m return out -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_m( einnahmen__bruttolohn_m: float, beitragsbemessungsgrenze_m: float, @@ -143,6 +160,7 @@ def einkommen_m( start_date="1990-01-01", end_date="2024-12-31", leaf_name="beitragsbemessungsgrenze_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def beitragsbemessungsgrenze_m_nach_wohnort( wohnort_ost_hh: bool, @@ -156,7 +174,7 @@ def beitragsbemessungsgrenze_m_nach_wohnort( ) -@policy_function(start_date="2003-04-01") +@policy_function(start_date="2003-04-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_in_gleitzone_gesamt_m( sozialversicherung__midijob_bemessungsentgelt_m: float, beitragssatz: float, @@ -171,6 +189,7 @@ def betrag_in_gleitzone_gesamt_m( start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_in_gleitzone_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_in_gleitzone_arbeitgeber_m_mit_festem_beitragssatz( einnahmen__bruttolohn_m: float, @@ -180,7 +199,11 @@ def betrag_in_gleitzone_arbeitgeber_m_mit_festem_beitragssatz( return einnahmen__bruttolohn_m * beitragssatz / 2 -@policy_function(start_date="2022-10-01", leaf_name="betrag_in_gleitzone_arbeitgeber_m") +@policy_function( + start_date="2022-10-01", + leaf_name="betrag_in_gleitzone_arbeitgeber_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_in_gleitzone_arbeitgeber_m_als_differenz_von_gesamt_und_arbeitnehmerbeitrag( betrag_in_gleitzone_gesamt_m: float, betrag_in_gleitzone_arbeitnehmer_m: float, @@ -193,6 +216,7 @@ def betrag_in_gleitzone_arbeitgeber_m_als_differenz_von_gesamt_und_arbeitnehmerb start_date="2003-04-01", end_date="2022-09-30", leaf_name="betrag_in_gleitzone_arbeitnehmer_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_in_gleitzone_arbeitnehmer_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_in_gleitzone_arbeitgeber_m: float, @@ -205,6 +229,7 @@ def betrag_in_gleitzone_arbeitnehmer_m_als_differenz_von_gesamt_und_arbeitgeberb @policy_function( start_date="2022-10-01", leaf_name="betrag_in_gleitzone_arbeitnehmer_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_in_gleitzone_arbeitnehmer_m_mit_festem_beitragssatz( sozialversicherung__beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml index 1fd8b6644d..6f52442fa5 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml @@ -10,147 +10,109 @@ beitragsbemessungsgrenze_y: en: >- Maximum amount of income subject to statutory pension insurance contributions (Anlage 2 SGB VI). - unit: Euros - reference_period: Year type: scalar 1949-01-01: value: 3600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 - note: Anlage 2 SGB VI, Zeitraum 1.3.1947-31.5.1949 (RM/DM). 1949-06-01: value: 7200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 - note: Anlage 2 SGB VI, Zeitraum 1.6.1949-31.8.1952. 1952-09-01: value: 9000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 - note: Anlage 2 SGB VI, Zeitraum 1.9.1952-31.12.1958. 1959-01-01: value: 9600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1960-01-01: value: 10200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1961-01-01: value: 10800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1962-01-01: value: 11400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1963-01-01: value: 12000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 13200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 14400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 15600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 16800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 19200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 20400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 21600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 22800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 25200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 27600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 30000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 33600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 37200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 40800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 44400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 48000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 50400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 52800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 56400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 60000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 62400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 64800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 67200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 68400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 72000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1989-01-01: value: 73200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1990-01-01: note: >- @@ -158,11 +120,10 @@ beitragsbemessungsgrenze_y: ``parameter_beitragsbemessungsgrenze_nach_wohnort``. 2025-01-01: value: 96600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 25.11.2024 BGBl. 2024 I Nr. 365 2026-01-01: value: 101400 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -177,48 +138,70 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: en: >- Maximum amount of income subject to statutory pension insurance contributions, with different values for West and East Germany. - unit: Euros - reference_period: Month type: dict 1990-01-01: - west: 3221 - ost: 1380 + unit: DM_PER_MONTH + west: 6300 + ost: 2700 + reference: Anlage 2 SGB VI i. d. F. des § 3 V. v. 18.12.1991 BGBl. I S. 2331 (West). + note: >- + Die Werte für das Beitrittsgebiet 1990 und für das erste Halbjahr 1991 beruhen auf + dem Gesetz über die Sozialversicherung der DDR v. 28.06.1990 (GBl. I Nr. 38 + S. 486) und stehen nicht im Bundesgesetzblatt. 1991-01-01: - west: 3323 - ost: 1534 + west: 6500 + ost: 3000 + reference: Anlage 2 SGB VI i. d. F. des § 3 V. v. 18.12.1991 BGBl. I S. 2331 (West). + 1991-07-01: + updates_previous: true + ost: 3400 + reference: § 2 V. v. 19.06.1991 BGBl. I S. 1300. 1992-01-01: - west: 3477 - ost: 2454 + west: 6800 + ost: 4800 + reference: >- + § 3 V. v. 18.12.1991 BGBl. I S. 2331; § 2 V. v. 19.12.1991 BGBl. I S. 2344. 1993-01-01: - west: 3681 - ost: 2710 + west: 7200 + ost: 5300 + reference: V. v. 22.12.1992 BGBl. I S. 2474. 1994-01-01: - west: 3886 - ost: 3017 + west: 7600 + ost: 5900 + reference: V. v. 01.12.1993 BGBl. I S. 1987. 1995-01-01: - west: 3988 - ost: 3272 + west: 7800 + ost: 6400 + reference: V. v. 12.12.1994 BGBl. I S. 3805. 1996-01-01: - west: 4090 - ost: 3477 + west: 8000 + ost: 6800 + reference: V. v. 04.12.1995 BGBl. I S. 1577. 1997-01-01: - west: 4193 - ost: 3630 + west: 8200 + ost: 7100 + reference: V. v. 11.12.1996 BGBl. I S. 1870. 1998-01-01: - west: 4295 - ost: 3579 + west: 8400 + ost: 7000 + reference: V. v. 02.12.1997 BGBl. I S. 2782. 1999-01-01: - west: 4339 - ost: 3681 + west: 8500 + ost: 7200 + reference: V. v. 18.12.1998 BGBl. I S. 3823. 2000-01-01: - west: 4397 - ost: 3630 + west: 8600 + ost: 7100 + reference: V. v. 29.11.1999 BGBl. I S. 2375. 2001-01-01: - west: 4448 - ost: 3732 + west: 8700 + ost: 7300 + reference: V. v. 13.12.2000 BGBl. I S. 1710. 2002-01-01: + unit: EUR_PER_MONTH west: 4500 ost: 3750 + reference: V. v. 03.12.2001 BGBl. I S. 3302. 2003-01-01: west: 5100 ost: 4250 @@ -308,142 +291,109 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: en: >- Maximum amount of income subject to statutory miners' pension insurance contributions (West). - unit: Euros - reference_period: Year type: scalar 1949-01-01: value: 7200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 note: Anlage 2 SGB VI, Zeitraum 1.3.1947-31.5.1949. 1949-06-01: value: 8400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 note: Anlage 2 SGB VI, Zeitraum 1.6.1949-31.8.1952. 1952-09-01: value: 12000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 note: >- Anlage 2 SGB VI, Zeitraum 1.9.1952-31.12.1958. Der Wert bleibt laut Anlage 2 auch 1959 und 1960 unverändert. 1961-01-01: value: 13200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 note: Der Wert bleibt laut Anlage 2 SGB VI auch 1962 unverändert. 1963-01-01: value: 14400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 16800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 18000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 19200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 20400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 22800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 24000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 25200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 27600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 30000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 33600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 37200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 40800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 45600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 50400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 55200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 57600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 61200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 64800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 69600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 73200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 76800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 80400 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 82800 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 85200 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 87600 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1989-01-01: value: 90000 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1990-01-01: value: 93600 - unit: DM reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 note: >- Die ursprüngliche Anlage 2 SGB VI (Art. 1 G. v. 18.12.1989 BGBl. I S. 2261) endet @@ -451,163 +401,128 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: Sozialversicherungs-Rechengrößenverordnung 1992 ergänzt. 1991-01-01: value: 96000 - unit: DM reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 1992-01-01: value: 100800 - unit: DM reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 1993-01-01: value: 106800 - unit: DM reference: V. v. 22.12.1992 BGBl. I S. 2474 1994-01-01: value: 112800 - unit: DM reference: V. v. 01.12.1993 BGBl. I S. 1987 1995-01-01: value: 115200 - unit: DM reference: V. v. 12.12.1994 BGBl. I S. 3806 1996-01-01: value: 117600 - unit: DM reference: V. v. 04.12.1995 BGBl. I S. 1577 1997-01-01: value: 121200 - unit: DM reference: V. v. 11.12.1996 BGBl. I S. 1870 1998-01-01: value: 123600 - unit: DM reference: V. v. 02.12.1997 BGBl. I S. 2782 1999-01-01: value: 124800 - unit: DM reference: V. v. 18.12.1998 BGBl. I S. 3823 2000-01-01: value: 127200 - unit: DM reference: V. v. 29.11.1999 BGBl. I S. 2375 2001-01-01: value: 128400 - unit: DM reference: V. v. 13.12.2000 BGBl. I S. 1710 2002-01-01: value: 66600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 03.12.2001 BGBl. I S. 3302 2003-01-01: value: 75000 - unit: Euros reference: V. v. 17.12.2002 BGBl. I S. 4561 2004-01-01: value: 76200 - unit: Euros reference: V. v. 09.12.2003 BGBl. I S. 2497 2005-01-01: value: 76800 - unit: Euros reference: V. v. 29.11.2004 BGBl. I S. 3098 2006-01-01: value: 77400 - unit: Euros reference: V. v. 21.12.2005 BGBl. I S. 3627 2007-01-01: value: 77400 - unit: Euros reference: G. v. 02.12.2006 BGBl. I S. 2742 2008-01-01: value: 78600 - unit: Euros reference: V. v. 05.12.2007 BGBl. I S. 2797 2009-01-01: value: 79800 - unit: Euros reference: V. v. 02.12.2008 BGBl. I S. 2336 2010-01-01: value: 81600 - unit: Euros reference: V. v. 07.12.2009 BGBl. I S. 3846 2011-01-01: value: 81000 - unit: Euros reference: V. v. 03.12.2010 BGBl. I S. 1761 2012-01-01: value: 82800 - unit: Euros reference: V. v. 02.12.2011 BGBl. I S. 2421 2013-01-01: value: 85200 - unit: Euros reference: V. v. 26.11.2012 BGBl. I S. 2361 2014-01-01: value: 87600 - unit: Euros reference: V. v. 02.12.2013 BGBl. I S. 4038 2015-01-01: value: 89400 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2015 vom 1. Dezember 2014 BGBl. I S. 1957 2016-01-01: value: 91800 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2016 vom 30. November 2015 BGBl. I S. 2137 2017-01-01: value: 94200 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2017 vom 28. November 2016 BGBl. I S. 2665 2018-01-01: value: 96000 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2018 vom 16. November 2017 BGBl. I S. 3778 2019-01-01: value: 98400 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2019 vom 27. November 2018 BGBl. I S. 2024 2020-01-01: value: 101400 - unit: Euros reference: Art. 3 V. v. 17.12.2019 BGBl I S. 2848. 2021-01-01: value: 104400 - unit: Euros reference: §3 V. v. 30.11.2020 BGBl. I S. 2612. 2022-01-01: value: 103800 - unit: Euros reference: §3 V. v. 30.11.2021, BGBl. I S. 5044. 2023-01-01: value: 107400 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2023 vom 28. November 2022 BGBl. I S. 2128 2024-01-01: value: 111600 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2024 vom 24. November 2023 BGBl. 2023 I Nr. 322 2025-01-01: value: 118800 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2025 vom 25. November 2024 BGBl. 2024 I Nr. 365 2026-01-01: value: 124800 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -624,167 +539,130 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_ost_y: en: >- Maximum amount of income subject to statutory miners' pension insurance contributions in the territory of the former GDR (Anlage 2a SGB VI). - unit: Euros - reference_period: Year type: scalar 1990-01-01: value: 32400 - unit: DM reference: Art. 1 Nr. 144 G. v. 25.07.1991 BGBl. I S. 1606 note: Anlage 2a SGB VI, eingefügt durch das Renten-Überleitungsgesetz. 1991-01-01: value: 36000 - unit: DM reference: Art. 1 Nr. 144 G. v. 25.07.1991 BGBl. I S. 1606 note: Anlage 2a SGB VI, Zeitraum 1.1.1991-30.6.1991. 1991-07-01: value: 40800 - unit: DM reference: Art. 1 Nr. 144 G. v. 25.07.1991 BGBl. I S. 1606 note: Anlage 2a SGB VI, Zeitraum 1.7.1991-31.12.1991. 1992-01-01: value: 70800 - unit: DM reference: § 2 V. v. 19.12.1991 BGBl. I S. 2344 (3. Rentenanpassungsverordnung) 1993-01-01: value: 78000 - unit: DM reference: V. v. 22.12.1992 BGBl. I S. 2474 1994-01-01: value: 87600 - unit: DM reference: V. v. 01.12.1993 BGBl. I S. 1987 1995-01-01: value: 93600 - unit: DM reference: V. v. 12.12.1994 BGBl. I S. 3806 1996-01-01: value: 100800 - unit: DM reference: V. v. 04.12.1995 BGBl. I S. 1577 1997-01-01: value: 104400 - unit: DM reference: V. v. 11.12.1996 BGBl. I S. 1870 1998-01-01: value: 103200 - unit: DM reference: V. v. 02.12.1997 BGBl. I S. 2782 1999-01-01: value: 105600 - unit: DM reference: V. v. 18.12.1998 BGBl. I S. 3823 2000-01-01: value: 104400 - unit: DM reference: V. v. 29.11.1999 BGBl. I S. 2375 2001-01-01: value: 108000 - unit: DM reference: V. v. 13.12.2000 BGBl. I S. 1710 2002-01-01: value: 55800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 03.12.2001 BGBl. I S. 3302 2003-01-01: value: 63000 - unit: Euros reference: V. v. 17.12.2002 BGBl. I S. 4561 2004-01-01: value: 64200 - unit: Euros reference: V. v. 09.12.2003 BGBl. I S. 2497 2005-01-01: value: 64800 - unit: Euros reference: V. v. 29.11.2004 BGBl. I S. 3098 2006-01-01: value: 64800 - unit: Euros reference: V. v. 21.12.2005 BGBl. I S. 3627 2007-01-01: value: 66600 - unit: Euros reference: G. v. 02.12.2006 BGBl. I S. 2742 2008-01-01: value: 66600 - unit: Euros reference: V. v. 05.12.2007 BGBl. I S. 2797 2009-01-01: value: 67200 - unit: Euros reference: V. v. 02.12.2008 BGBl. I S. 2336 2010-01-01: value: 68400 - unit: Euros reference: V. v. 07.12.2009 BGBl. I S. 3846 2011-01-01: value: 70800 - unit: Euros reference: V. v. 03.12.2010 BGBl. I S. 1761 2012-01-01: value: 70800 - unit: Euros reference: V. v. 02.12.2011 BGBl. I S. 2421 2013-01-01: value: 72600 - unit: Euros reference: V. v. 26.11.2012 BGBl. I S. 2361 2014-01-01: value: 73800 - unit: Euros reference: V. v. 02.12.2013 BGBl. I S. 4038 2015-01-01: value: 76200 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2015 vom 1. Dezember 2014 BGBl. I S. 1957 2016-01-01: value: 79800 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2016 vom 30. November 2015 BGBl. I S. 2137 2017-01-01: value: 84000 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2017 vom 28. November 2016 BGBl. I S. 2665 2018-01-01: value: 85800 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2018 vom 16. November 2017 BGBl. I S. 3778 2019-01-01: value: 91200 - unit: Euros reference: >- Sozialversicherungs-Rechengrößenverordnung 2019 vom 27. November 2018 BGBl. I S. 2024 2020-01-01: value: 94800 - unit: Euros reference: V. v. 17.12.2019 BGBl. I S. 2848 2021-01-01: value: 99000 - unit: Euros reference: V. v. 30.11.2020 BGBl. I S. 2612 2022-01-01: value: 100200 - unit: Euros reference: V. v. 30.11.2021 BGBl. I S. 5044 2023-01-01: value: 104400 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2023 vom 28. November 2022 BGBl. I S. 2128 2024-01-01: value: 110400 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2024 vom 24. November 2023 BGBl. 2023 I Nr. 322 diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragssatz.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragssatz.yaml index 19c2a80a9c..19f26a4b82 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragssatz.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragssatz.yaml @@ -10,8 +10,7 @@ beitragssatz: en: >- Contribution rate to statutory pension insurance, which is shared equally by employees and employers. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar add_jahresanfang: true 1984-01-01: @@ -58,8 +57,7 @@ beitragssatz_knappschaftliche_rentenversicherung: description: de: Beitragssatz zur knappschaftlichen Rentenversicherung. en: Contribution rate to statutory pension insurance. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 2015-01-01: value: 0.248 diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/minijob.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/minijob.yaml index 78a7a4e52d..c003b01be4 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/minijob.yaml @@ -13,8 +13,7 @@ minijob_arbeitgeberpauschale: en: >- Fixed pension insurance contributions for marginal employment (§ 168 I Nr. 1b SGB VI) - unit: Share - reference_period: null + unit: DIMENSIONLESS type: scalar 1999-04-01: value: 0.12 diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml index 6f344983e3..4ccad1f14e 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml @@ -12,8 +12,7 @@ alpha: §68 Abs. 4 S. 6 SGB VI Part of the sustainability factor in the pension adjustment formula which modifies the ratio of pensioners to contributors - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2002-01-01: value: 0.25 @@ -24,8 +23,7 @@ altersvorsorgeanteil: description: de: §68 Abs. 5 SGB VI (Teil des Riesterfaktors in der Rentenanpassungsformel) en: §68 Abs. 5 SGB VI (Part of the Riesterfaktor in the pension adjustment formula) - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2002-01-01: value: 0.5 @@ -55,32 +53,32 @@ beitragsvolumen: en: >- Sum of contributions to the pension insurance of all employees subject to pension insurance, marginally employed and recipients of ALG. - unit: Euros - reference_period: Year type: scalar 1991-01-01: - value: 108688000 + unit: DM_PER_YEAR + value: 212575251 1992-01-01: - value: 117359000 + value: 229534253 1993-01-01: - value: 120559000 + value: 235792909 1994-01-01: - value: 132938000 + value: 260004129 1995-01-01: - value: 139921000 + value: 273661689 1996-01-01: - value: 146160000 + value: 285864113 1997-01-01: - value: 153658000 + value: 300528926 1998-01-01: - value: 153763000 + value: 300734288 1999-01-01: - value: 160506000 + value: 313922450 2000-01-01: - value: 163367000 + value: 319518080 2001-01-01: - value: 164694000 + value: 322113466 2002-01-01: + unit: EUR_PER_YEAR value: 165481000 2003-01-01: value: 169425000 @@ -123,8 +121,7 @@ durchschnittslohn: description: de: Durchschnittsbruttolohn aller Arbeitnehmer:innen in einem Jahr en: Mean gross wage of all employees per year - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2005-01-01: value: 28468.23 @@ -157,32 +154,33 @@ gesamtes_rentenvolumen: description: de: Gesamtvolumen der ausgezahlten Renten en: Total amount of paid pensions - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 1991-01-01: - value: 117912000 + unit: DM_PER_YEAR + value: 230615827 1992-01-01: - value: 130901000 + value: 256020103 1993-01-01: - value: 141180000 + value: 276124079 1994-01-01: - value: 152798000 + value: 298846912 1995-01-01: - value: 162625000 + value: 318066854 1996-01-01: - value: 168955000 + value: 330447258 1997-01-01: - value: 174479000 + value: 341251263 1998-01-01: - value: 180323800 + value: 352682698 1999-01-01: - value: 184139000 + value: 360144580 2000-01-01: - value: 190198000 + value: 371994954 2001-01-01: - value: 195776000 + value: 382904574 2002-01-01: + unit: EUR_PER_YEAR value: 202355000 2003-01-01: value: 207749000 diff --git a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py index 34260445bb..9e47e1bc02 100644 --- a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py +++ b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py @@ -1,9 +1,13 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(end_date="2024-12-31", leaf_name="neue_entgeltpunkte_y") +@policy_function( + end_date="2024-12-31", + leaf_name="neue_entgeltpunkte_y", + unit=TTSIMUnit.DIMENSIONLESS.PER_YEAR, +) def neue_entgeltpunkte_nach_wohnort( einnahmen__bruttolohn_y: float, wohnort_ost_hh: bool, @@ -32,7 +36,11 @@ def neue_entgeltpunkte_nach_wohnort( ) -@policy_function(start_date="2025-01-01", leaf_name="neue_entgeltpunkte_y") +@policy_function( + start_date="2025-01-01", + leaf_name="neue_entgeltpunkte_y", + unit=TTSIMUnit.DIMENSIONLESS.PER_YEAR, +) def neue_entgeltpunkte_einheitlich( einnahmen__bruttolohn_y: float, beitrag__beitragsbemessungsgrenze_y: float, @@ -50,7 +58,12 @@ def neue_entgeltpunkte_einheitlich( ) -@policy_function(start_date="1992-01-01", end_date="2023-06-30", leaf_name="rentenwert") +@policy_function( + start_date="1992-01-01", + end_date="2023-06-30", + leaf_name="rentenwert_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def rentenwert_nach_wohnort( wohnort_ost_hh: bool, sozialversicherung__rente__parameter_rentenwert_nach_wohnort: dict[str, float], diff --git a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml index c62a7d6d8d..11c4723859 100644 --- a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml @@ -10,168 +10,127 @@ beitragspflichtiges_durchschnittsentgelt_y: en: >- Anlage 1 SGB VI, Mean wage of all insured people in the sense of the German social insurance, which is needed to calculate the Entgeltpunkte. - unit: Euros - reference_period: Year type: scalar 1949-01-01: value: 2838 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1950-01-01: value: 3161 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1951-01-01: value: 3579 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1952-01-01: value: 3852 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1953-01-01: value: 4061 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1954-01-01: value: 4234 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1955-01-01: value: 4548 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1956-01-01: value: 4844 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1957-01-01: value: 5043 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1958-01-01: value: 5330 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1959-01-01: value: 5602 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1960-01-01: value: 6101 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1961-01-01: value: 6723 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1962-01-01: value: 7328 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1963-01-01: value: 7775 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 8467 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 9229 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 9893 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 10219 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 10842 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 11839 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 13343 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 14931 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 16335 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 18295 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 20381 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 21808 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 23335 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 24945 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 26242 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 27685 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 29485 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 30900 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 32198 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 33293 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 34292 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 35286 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 36627 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 37726 - unit: DM reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 38896 - unit: DM reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 note: >- Die ursprüngliche Anlage 1 SGB VI (Art. 1 G. v. 18.12.1989 BGBl. I S. 2261) endet @@ -179,145 +138,108 @@ beitragspflichtiges_durchschnittsentgelt_y: Sozialversicherungs-Rechengrößenverordnung 1992 ergänzt. 1989-01-01: value: 40063 - unit: DM reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 1990-01-01: value: 41946 - unit: DM reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 1991-01-01: value: 44421 - unit: DM reference: V. v. 22.12.1992 BGBl. I S. 2474 1992-01-01: value: 46820 - unit: DM reference: V. v. 01.12.1993 BGBl. I S. 1987 1993-01-01: value: 48178 - unit: DM reference: V. v. 12.12.1994 BGBl. I S. 3806 1994-01-01: value: 49142 - unit: DM reference: V. v. 04.12.1995 BGBl. I S. 1577 1995-01-01: value: 50665 - unit: DM reference: V. v. 11.12.1996 BGBl. I S. 1870 1996-01-01: value: 51678 - unit: DM reference: V. v. 02.12.1997 BGBl. I S. 2782 1997-01-01: value: 52143 - unit: DM reference: V. v. 18.12.1998 BGBl. I S. 3823 1998-01-01: value: 52925 - unit: DM reference: V. v. 29.11.1999 BGBl. I S. 2375 1999-01-01: value: 53507 - unit: DM reference: V. v. 13.12.2000 BGBl. I S. 1710 2000-01-01: value: 54256 - unit: DM reference: V. v. 03.12.2001 BGBl. I S. 3302 2001-01-01: value: 55216 - unit: DM reference: V. v. 17.12.2002 BGBl. I S. 4561 2002-01-01: value: 28626 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 09.12.2003 BGBl. I S. 2497 2003-01-01: value: 28938 - unit: Euros reference: V. v. 29.11.2004 BGBl. I S. 3098 2004-01-01: value: 29060 - unit: Euros reference: V. v. 21.12.2005 BGBl. I S. 3627 2005-01-01: value: 29202 - unit: Euros 2006-01-01: value: 29494 - unit: Euros 2007-01-01: value: 29951 - unit: Euros 2008-01-01: value: 30625 - unit: Euros 2009-01-01: value: 30506 - unit: Euros 2010-01-01: value: 31144 - unit: Euros 2011-01-01: value: 32100 - unit: Euros 2012-01-01: value: 33002 - unit: Euros 2013-01-01: value: 33659 - unit: Euros 2014-01-01: value: 34514 - unit: Euros 2015-01-01: value: 35363 - unit: Euros 2016-01-01: value: 36187 - unit: Euros 2017-01-01: value: 37077 - unit: Euros 2018-01-01: value: 38212 - unit: Euros reference: V. v. 17.12.2019 BGBl. I S. 2848. 2019-01-01: value: 39301 - unit: Euros reference: V. v. 30.11.2020 BGBl. I S. 2612. 2020-01-01: value: 39167 - unit: Euros reference: §1 V. v. 30.11.2021, BGBl. I S. 5044. 2021-01-01: value: 40463 - unit: Euros reference: §3 V. v. 28.11.2022 BGBl. I S. 2128 (Nr. 47). 2022-01-01: value: 42053 - unit: Euros reference: §3 V. v. 24.11.2023 BGBl. 2023 I Nr. 322 2023-01-01: value: 44732 - unit: Euros reference: §3 V. v. 25.11.2024 BGBl. 2024 I Nr. 365. 2024-01-01: value: 47085 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 2025-01-01: value: 50493 - unit: Euros reference: §3 V. v. 25.11.2024 BGBl. 2024 I Nr. 365. note: Vorläufiges Durchschnittsentgelt 2026-01-01: value: 51944 - unit: Euros reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -335,8 +257,7 @@ umrechnung_entgeltpunkte_beitrittsgebiet: §256a SGB VI and Anlage 10 SGB VI To calculate the Entgeltpunkte, income in the former GDR is increased by this factor. - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 1945-01-01: value: 1.0000 diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/altersgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/altersgrenze.yaml index 7aa3a6a99d..3f89c60cdd 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/altersgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/altersgrenze.yaml @@ -12,8 +12,7 @@ altersgrenze: § 77 SGB VI Age limit up to which one can claim the public disability insurance without deductions. - unit: Years - reference_period: null + unit: YEARS type: scalar 2001-01-01: value: 63 @@ -35,8 +34,8 @@ altersgrenze_gestaffelt: Age limit up to which one can claim the public disability insurance without deductions. Up to 2012, the standard retirement age was 63. From then on gradual increase until 65. - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 2012-01-01: reference: Art. 4 G. v. 05.12.2012 BGBl. I S. 2474 @@ -129,8 +128,7 @@ altersgrenze_langjährig_versichert: § 77 Abs. 4 SGB VI Age limit up to which one can claim public disability insurance without deductions under certain time conditions. These conditions are defined in § 77 4 SGB VI. - unit: Years - reference_period: null + unit: YEARS type: scalar 2001-01-01: value: 63 diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/anspruch.yaml b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/anspruch.yaml index f1df28c2b2..cf3cb51d55 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/anspruch.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/anspruch.yaml @@ -8,8 +8,7 @@ mindestpflichtbeitragszeiten_monate: ... en: >- ... - unit: Months - reference_period: null + unit: MONTHS type: scalar 2001-01-01: value: 36 diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py index b96efecba0..56e89bfa50 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py @@ -6,13 +6,18 @@ from ttsim.unit_converters import m_to_y, y_to_m -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function if TYPE_CHECKING: from gettsim.tt import ConsecutiveIntLookupTableParamValue -@policy_function(start_date="2001-01-01", end_date="2023-06-30", leaf_name="betrag_m") +@policy_function( + start_date="2001-01-01", + end_date="2023-06-30", + leaf_name="betrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def betrag_m_nach_wohnort( zugangsfaktor: float, entgeltpunkte_west: float, @@ -44,13 +49,15 @@ def betrag_m_nach_wohnort( return out -@policy_function(start_date="2023-07-01", leaf_name="betrag_m") +@policy_function( + start_date="2023-07-01", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def betrag_m_einheitlich( zugangsfaktor: float, entgeltpunkte: float, rentenartfaktor: float, grundsätzlich_anspruchsberechtigt: bool, - sozialversicherung__rente__rentenwert: float, + sozialversicherung__rente__rentenwert_m: float, ) -> float: """Erwerbsminderungsrente (public disability insurance). @@ -60,7 +67,7 @@ def betrag_m_einheitlich( out = ( entgeltpunkte * zugangsfaktor - * sozialversicherung__rente__rentenwert + * sozialversicherung__rente__rentenwert_m * rentenartfaktor ) else: @@ -68,7 +75,7 @@ def betrag_m_einheitlich( return out -@policy_function(start_date="2001-01-01") +@policy_function(start_date="2001-01-01", unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( voll_erwerbsgemindert: bool, teilweise_erwerbsgemindert: bool, @@ -89,7 +96,9 @@ def grundsätzlich_anspruchsberechtigt( ) -@policy_function(start_date="2001-01-01", end_date="2023-06-30") +@policy_function( + start_date="2001-01-01", end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS +) def entgeltpunkte_west( sozialversicherung__rente__entgeltpunkte_west: float, zusätzliche_entgeltpunkte_durch_zurechnungszeit: float, @@ -106,7 +115,9 @@ def entgeltpunkte_west( ) -@policy_function(start_date="2001-01-01", end_date="2023-06-30") +@policy_function( + start_date="2001-01-01", end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS +) def entgeltpunkte_ost( sozialversicherung__rente__entgeltpunkte_ost: float, zusätzliche_entgeltpunkte_durch_zurechnungszeit: float, @@ -125,7 +136,7 @@ def entgeltpunkte_ost( ) -@policy_function(start_date="2023-07-01") +@policy_function(start_date="2023-07-01", unit=TTSIMUnit.DIMENSIONLESS) def entgeltpunkte( sozialversicherung__rente__entgeltpunkte: float, zusätzliche_entgeltpunkte_durch_zurechnungszeit: float, @@ -148,6 +159,7 @@ def entgeltpunkte( start_date="2000-12-23", end_date="2014-06-30", leaf_name="zusätzliche_entgeltpunkte_durch_zurechnungszeit", + unit=TTSIMUnit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_bis_06_2014( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -173,7 +185,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren ) return ( altersgrenze_zurechnungszeit - - (sozialversicherung__rente__alter_bei_renteneintritt) + - sozialversicherung__rente__alter_bei_renteneintritt ) * mean_entgeltpunkte_pro_bewertungsmonat @@ -181,6 +193,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren start_date="2014-07-01", end_date="2017-07-16", leaf_name="zusätzliche_entgeltpunkte_durch_zurechnungszeit", + unit=TTSIMUnit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgrenze( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -201,7 +214,9 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre @policy_function( - start_date="2017-07-17", leaf_name="zusätzliche_entgeltpunkte_durch_zurechnungszeit" + start_date="2017-07-17", + leaf_name="zusätzliche_entgeltpunkte_durch_zurechnungszeit", + unit=TTSIMUnit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_ab_07_2017( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -231,7 +246,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren ) * mean_entgeltpunkte_pro_bewertungsmonat -@policy_function(start_date="2001-01-01") +@policy_function(start_date="2001-01-01", unit=TTSIMUnit.DIMENSIONLESS) def rentenartfaktor( teilweise_erwerbsgemindert: bool, parameter_rentenartfaktor: dict[str, float], @@ -246,7 +261,9 @@ def rentenartfaktor( return parameter_rentenartfaktor["voll"] -@policy_function(end_date="2011-12-31", leaf_name="zugangsfaktor") +@policy_function( + end_date="2011-12-31", leaf_name="zugangsfaktor", unit=TTSIMUnit.DIMENSIONLESS +) def zugangsfaktor_ohne_gestaffelte_altersgrenze( sozialversicherung__rente__alter_bei_renteneintritt: float, altersgrenze: float, @@ -276,7 +293,9 @@ def zugangsfaktor_ohne_gestaffelte_altersgrenze( return max(zugangsfaktor, min_zugangsfaktor) -@policy_function(start_date="2012-01-01", leaf_name="zugangsfaktor") +@policy_function( + start_date="2012-01-01", leaf_name="zugangsfaktor", unit=TTSIMUnit.DIMENSIONLESS +) def zugangsfaktor_mit_gestaffelter_altersgrenze( sozialversicherung__rente__alter_bei_renteneintritt: float, wartezeit_langjährig_versichert_erfüllt: bool, @@ -326,7 +345,7 @@ def zugangsfaktor_mit_gestaffelter_altersgrenze( # TODO(@MImmesberger): Reuse Altersrente Wartezeiten for Erwerbsminderungsrente # https://github.com/ttsim-dev/gettsim/issues/838 -@policy_function(start_date="2001-01-01") +@policy_function(start_date="2001-01-01", unit=TTSIMUnit.DIMENSIONLESS) def wartezeit_langjährig_versichert_erfüllt( sozialversicherung__rente__pflichtbeitragsmonate: float, sozialversicherung__rente__freiwillige_beitragsmonate: float, @@ -369,7 +388,7 @@ def wartezeit_langjährig_versichert_erfüllt( ) -@policy_function(end_date="2023-06-30") +@policy_function(end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS) def anteil_entgeltpunkte_ost( sozialversicherung__rente__entgeltpunkte_west: float, sozialversicherung__rente__entgeltpunkte_ost: float, @@ -390,7 +409,9 @@ def anteil_entgeltpunkte_ost( @policy_function( - end_date="2023-06-30", leaf_name="mean_entgeltpunkte_pro_bewertungsmonat" + end_date="2023-06-30", + leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", + unit=TTSIMUnit.DIMENSIONLESS, ) def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( sozialversicherung__rente__entgeltpunkte_west: float, @@ -413,11 +434,16 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( return ( sozialversicherung__rente__entgeltpunkte_west + sozialversicherung__rente__entgeltpunkte_ost - ) / belegungsfähiger_gesamtzeitraum + ) / cast_unit( + belegungsfähiger_gesamtzeitraum, + TTSIMUnit.DIMENSIONLESS, + ) @policy_function( - start_date="2023-07-01", leaf_name="mean_entgeltpunkte_pro_bewertungsmonat" + start_date="2023-07-01", + leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", + unit=TTSIMUnit.DIMENSIONLESS, ) def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( sozialversicherung__rente__entgeltpunkte: float, @@ -436,4 +462,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( - altersgrenze_grundbewertung ) - return sozialversicherung__rente__entgeltpunkte / belegungsfähiger_gesamtzeitraum + return sozialversicherung__rente__entgeltpunkte / cast_unit( + belegungsfähiger_gesamtzeitraum, + TTSIMUnit.DIMENSIONLESS, + ) diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/formel.yaml b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/formel.yaml index 0129994b7d..3c9238fe9f 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/formel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/formel.yaml @@ -10,8 +10,7 @@ zurechnungszeitgrenze: en: >- § 59 SGB VI (after July 2014) Supplementary periods are granted up to this age limit. - unit: Years - reference_period: null + unit: YEARS type: scalar 2014-07-01: value: 62 @@ -29,8 +28,8 @@ zurechnungszeitgrenze_gestaffelt: en: >- § 253a (Anlage 23 until 2014) Supplementary periods are granted up to this age limit. - unit: Years - reference_period: null + input_unit: CALENDAR_MONTH + output_unit: YEARS type: month_based_phase_inout_of_age_thresholds 2000-12-23: reference: Anlage 23, G. v. 20.12.2000 BGBl. I S. 1827 @@ -261,8 +260,7 @@ min_zugangsfaktor: § 77 SGB VI, Rentenreformgesetz 1999 (RRG 1999) http://www.portal-sozialpolitik.de/index.php?page=rentenversicherung en: Deductions for early retirement are capped at 10.8%. - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2000-01-01: value: 0.892 @@ -282,8 +280,7 @@ parameter_rentenartfaktor: determines the security target of the pension type in relation to an old-age pension. https://sozialversicherung-kompetent.de/rentenversicherung/leistungsrecht/1051-rentenartfaktor.html - unit: null - reference_period: null + unit: DIMENSIONLESS type: dict 2001-01-01: teilweise: 0.5 @@ -301,8 +298,7 @@ altersgrenze_grundbewertung: SGB VI § 72 As part of the "Grundbewertung" the "belegungsfähige Gesamtzeitraum" will be calculated, which is the period from the age of 17 until the start of the pension. - unit: Years - reference_period: null + unit: YEARS type: scalar 2001-01-01: value: 16 diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/inputs.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/inputs.py index 8ae399bb9f..66eb99d7bb 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/inputs.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/inputs.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def teilweise_erwerbsgemindert() -> bool: """Able to provide at least 3 but no more than 6 hours of market labor per day.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def voll_erwerbsgemindert() -> bool: """Unable to provide more than 3 hours of market labor per day..""" diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/wartezeit.yaml b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/wartezeit.yaml index 8e6bc4a030..f373104059 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/wartezeit.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/wartezeit.yaml @@ -12,8 +12,7 @@ wartezeitgrenze_langjährig_versicherte: § 264d SGB VI Number of waiting years in accordance with § 51 Absatz 3a SGB VI, which must be proven for a public disability pension at 63 without deductions. - unit: Years - reference_period: null + unit: YEARS type: scalar 2001-01-01: value: 35 diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/einkommen.yaml b/src/gettsim/germany/sozialversicherung/rente/grundrente/einkommen.yaml index c581d0af7a..f545f2e809 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/einkommen.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/einkommen.yaml @@ -12,8 +12,8 @@ anzurechnendes_einkommen_ohne_partner: § 97a Abs. 4 S. 2, 4 SGB VI Values are multiplied with the Rentenwert to compute the thresholds of the income crediting rule of Grundrentenzuschlag - unit: Share - reference_period: null + input_unit: DIMENSIONLESS + output_unit: DIMENSIONLESS type: piecewise_linear 2021-01-01: intervals: @@ -37,8 +37,8 @@ anzurechnendes_einkommen_mit_partner: § 97a Abs. 4 S. 2, 4 SGB VI Values are multiplied with the Rentenwert to compute the thresholds of the income crediting rule of Grundrentenzuschlag - unit: Share - reference_period: null + input_unit: DIMENSIONLESS + output_unit: DIMENSIONLESS type: piecewise_linear 2021-01-01: intervals: diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py index 32e953d778..68cfbe5cc1 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py @@ -5,6 +5,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, RoundingSpec, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -15,11 +16,13 @@ @policy_function( rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m(basisbetrag_m: float, anzurechnendes_einkommen_m: float) -> float: """Additional monthly pensions payments (Grundrentenzuschlag).""" @@ -27,7 +30,7 @@ def betrag_m(basisbetrag_m: float, anzurechnendes_einkommen_m: float) -> float: return max(out, 0.0) -@policy_function(start_date="2021-01-01") +@policy_function(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_m( gesamteinnahmen_aus_renten_vorjahr_m: float, bruttolohn_vorjahr_m: float, @@ -64,30 +67,33 @@ def einkommen_m( def _anzurechnendes_einkommen_m( einkommen_m_ehe: float, - rentenwert: float, + rentenwert_m: float, parameter_anzurechnendes_einkommen: PiecewisePolynomialParamValue, xnp: ModuleType, ) -> float: """The isolated function for the relevant income for the Grundrentezuschlag.""" - return rentenwert * piecewise_polynomial( - x=einkommen_m_ehe / rentenwert, + return rentenwert_m * piecewise_polynomial( + x=einkommen_m_ehe / rentenwert_m, parameters=parameter_anzurechnendes_einkommen, xnp=xnp, ) @policy_function( + verify_units=False, rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anzurechnendes_einkommen_m( einkommen_m_ehe: float, familie__anzahl_personen_ehe: int, - sozialversicherung__rente__rentenwert: float, + sozialversicherung__rente__rentenwert_m: float, anzurechnendes_einkommen_ohne_partner: PiecewisePolynomialParamValue, anzurechnendes_einkommen_mit_partner: PiecewisePolynomialParamValue, xnp: ModuleType, @@ -103,19 +109,19 @@ def anzurechnendes_einkommen_m( """ # Calculate relevant income following the crediting rules using the values for # singles and those for married subjects - # Note: Thresholds are defined relativ to rentenwert which is implemented by - # dividing the income by rentenwert and multiply rentenwert to the result. + # Note: Thresholds are defined relativ to rentenwert_m which is implemented by + # dividing the income by rentenwert_m and multiply rentenwert_m to the result. if familie__anzahl_personen_ehe == 1: out = _anzurechnendes_einkommen_m( einkommen_m_ehe=einkommen_m_ehe, - rentenwert=sozialversicherung__rente__rentenwert, + rentenwert_m=sozialversicherung__rente__rentenwert_m, parameter_anzurechnendes_einkommen=anzurechnendes_einkommen_ohne_partner, xnp=xnp, ) else: out = _anzurechnendes_einkommen_m( einkommen_m_ehe=einkommen_m_ehe, - rentenwert=sozialversicherung__rente__rentenwert, + rentenwert_m=sozialversicherung__rente__rentenwert_m, parameter_anzurechnendes_einkommen=anzurechnendes_einkommen_mit_partner, xnp=xnp, ) @@ -124,16 +130,18 @@ def anzurechnendes_einkommen_m( @policy_function( rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def basisbetrag_m( - mean_entgeltpunkte_zuschlag: float, + mean_entgeltpunkte_zuschlag_m: float, bewertungszeiten_monate: int, - sozialversicherung__rente__rentenwert: float, + sozialversicherung__rente__rentenwert_m: float, sozialversicherung__rente__altersrente__zugangsfaktor: float, maximaler_zugangsfaktor: float, berücksichtigte_wartezeit_monate: dict[str, int], @@ -153,15 +161,15 @@ def basisbetrag_m( ) return ( - mean_entgeltpunkte_zuschlag + mean_entgeltpunkte_zuschlag_m * bewertungszeiten - * sozialversicherung__rente__rentenwert + * sozialversicherung__rente__rentenwert_m * zugangsfaktor ) -@policy_function(start_date="2021-01-01") -def mean_entgeltpunkte_pro_bewertungsmonat( +@policy_function(start_date="2021-01-01", unit=TTSIMUnit.DIMENSIONLESS.PER_MONTH) +def mean_entgeltpunkte_pro_bewertungsmonat_m( mean_entgeltpunkte: float, bewertungszeiten_monate: int, ) -> float: @@ -183,6 +191,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat( reference="§76g SGB VI Abs. 4 Nr. 4", ), start_date="2021-01-01", + unit=TTSIMUnit.DIMENSIONLESS.PER_MONTH, ) def höchstbetrag_m( grundrentenzeiten_monate: int, @@ -211,9 +220,10 @@ def höchstbetrag_m( reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=TTSIMUnit.DIMENSIONLESS.PER_MONTH, ) -def mean_entgeltpunkte_zuschlag( - mean_entgeltpunkte_pro_bewertungsmonat: float, +def mean_entgeltpunkte_zuschlag_m( + mean_entgeltpunkte_pro_bewertungsmonat_m: float, höchstbetrag_m: float, grundrentenzeiten_monate: int, berücksichtigte_wartezeit_monate: dict[str, int], @@ -233,22 +243,22 @@ def mean_entgeltpunkte_zuschlag( out = 0.0 else: # Case 1: Entgeltpunkte less than half of Höchstwert - if mean_entgeltpunkte_pro_bewertungsmonat <= (0.5 * höchstbetrag_m): - out = mean_entgeltpunkte_pro_bewertungsmonat + if mean_entgeltpunkte_pro_bewertungsmonat_m <= (0.5 * höchstbetrag_m): + out = mean_entgeltpunkte_pro_bewertungsmonat_m # Case 2: Entgeltpunkte more than half of Höchstwert, but below Höchstwert - elif mean_entgeltpunkte_pro_bewertungsmonat < höchstbetrag_m: - out = höchstbetrag_m - mean_entgeltpunkte_pro_bewertungsmonat + elif mean_entgeltpunkte_pro_bewertungsmonat_m < höchstbetrag_m: + out = höchstbetrag_m - mean_entgeltpunkte_pro_bewertungsmonat_m # Case 3: Entgeltpunkte above Höchstwert - elif mean_entgeltpunkte_pro_bewertungsmonat > höchstbetrag_m: + elif mean_entgeltpunkte_pro_bewertungsmonat_m > höchstbetrag_m: out = 0.0 # Multiply additional Engeltpunkte by factor return out * bonusfaktor -@policy_function(start_date="2021-01-01") +@policy_function(start_date="2021-01-01", unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( grundrentenzeiten_monate: int, berücksichtigte_wartezeit_monate: dict[str, int], @@ -257,7 +267,7 @@ def grundsätzlich_anspruchsberechtigt( return grundrentenzeiten_monate >= berücksichtigte_wartezeit_monate["min"] -@policy_function(start_date="2021-01-01") +@policy_function(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def gesamteinnahmen_aus_renten_für_einkommensberechnung_im_folgejahr_m( einnahmen__renten__betrag_gesamt_m: float, ) -> float: diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/inputs.py b/src/gettsim/germany/sozialversicherung/rente/grundrente/inputs.py index c5cc1bd91c..05af59a2ef 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/inputs.py +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/inputs.py @@ -2,25 +2,25 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.MONTHS) def bewertungszeiten_monate() -> int: """Number of months determining amount of Grundrente.""" -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.MONTHS) def grundrentenzeiten_monate() -> int: """Number of months determining eligibility for Grundrente.""" -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.DIMENSIONLESS) def mean_entgeltpunkte() -> float: """Mean Entgeltpunkte during Bewertungszeiten.""" -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def gesamteinnahmen_aus_renten_vorjahr_m() -> float: """Income from private and public pensions in the previous calendar year. @@ -29,7 +29,7 @@ def gesamteinnahmen_aus_renten_vorjahr_m() -> float: """ -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def bruttolohn_vorjahr_y() -> float: """Earnings in the previous calendar year. @@ -37,7 +37,7 @@ def bruttolohn_vorjahr_y() -> float: """ -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def einnahmen_aus_selbstständiger_arbeit_vorvorjahr_y() -> float: """Earnings from self-employment 2 years before. @@ -45,7 +45,7 @@ def einnahmen_aus_selbstständiger_arbeit_vorvorjahr_y() -> float: """ -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def einnahmen_aus_vermietung_und_verpachtung_vorvorjahr_y() -> float: """Earnings from rental income 2 years before. @@ -53,7 +53,7 @@ def einnahmen_aus_vermietung_und_verpachtung_vorvorjahr_y() -> float: """ -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def einnahmen_aus_kapitalvermögen_vorvorjahr_y() -> float: """Earnings from capital income 2 years before. diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml b/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml index 17846c05d6..de06fb8c7c 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml @@ -12,8 +12,9 @@ höchstwert_der_entgeltpunkte: § 76g Abs. 4 S. 3, 4 SGB VI constant to determine Höchstwert of additional Entgeltpunkte and effect of an additional month of Grundrentenzeiten on Höchstwert. - unit: null - reference_period: null + unit: + base: DIMENSIONLESS + increment: DIMENSIONLESS_PER_MONTH type: dict 2021-01-01: base: 0.0334 @@ -25,8 +26,7 @@ maximaler_zugangsfaktor: description: de: § 77 Abs. 2 SGB VI, Der Zugangsfaktor für die Grundrente ist auf 1 begrenzt. en: § 77 Abs. 2 SGB VI, The entry factor for the basic pension is capped at 1. - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2021-01-01: value: 1 @@ -43,8 +43,7 @@ bonusfaktor: §§ 76g Abs. 4 S. 3, 4 SGB VI The additional Entgeltpunkte from the basic pension are multiplied with this factor. - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2021-01-01: value: 0.875 diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/wartezeit.yaml b/src/gettsim/germany/sozialversicherung/rente/grundrente/wartezeit.yaml index d69d763e72..5ae5c62f56 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/wartezeit.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/wartezeit.yaml @@ -13,8 +13,7 @@ berücksichtigte_wartezeit_monate: § 76g Abs. 4 S. 5,6 / Abs. 1 S. 1 SGB VI Minimal number of Grundrentenzeiten required to be entitled to Grundrente and maximum number of months that are considered for Grundrente. - unit: Months - reference_period: null + unit: MONTHS type: dict 2021-01-01: min: 396 diff --git a/src/gettsim/germany/sozialversicherung/rente/inputs.py b/src/gettsim/germany/sozialversicherung/rente/inputs.py index 23ec5a51bd..2396eca5a8 100644 --- a/src/gettsim/germany/sozialversicherung/rente/inputs.py +++ b/src/gettsim/germany/sozialversicherung/rente/inputs.py @@ -2,105 +2,105 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def bezieht_rente() -> bool: """Draws public pension benefits.""" -@policy_input(end_date="2023-06-30") +@policy_input(end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS) def entgeltpunkte_ost() -> float: """Earnings points for public pension claim accumulated in the new Länder (Beitrittsgebiet).""" -@policy_input(end_date="2023-06-30") +@policy_input(end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS) def entgeltpunkte_west() -> float: """Earnings points for public pension claim accumulated in the old Länder (non-Beitrittsgebiet).""" -@policy_input(start_date="2023-07-01") +@policy_input(start_date="2023-07-01", unit=TTSIMUnit.DIMENSIONLESS) def entgeltpunkte() -> float: """Earnings points for public pension claim.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def ersatzzeiten_monate() -> float: """Total months during military, persecution/escape, internment, and consecutive sickness. """ -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def freiwillige_beitragsmonate() -> float: """Total months of voluntary pensioninsurance contributions.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CALENDAR_YEAR) def jahr_renteneintritt() -> int: """Year of pension claiming.""" -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def monat_renteneintritt() -> int: """Month of retirement.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def kinderberücksichtigungszeiten_monate() -> float: """Total months of childcare till age 10.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def krankheitszeiten_ab_16_bis_24_monate() -> float: """Total months of sickness between age 16 and 24.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_geringfügiger_beschäftigung() -> float: """Total months of marginal employment (w/o mandatory contributions).""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_arbeitslosigkeit() -> float: """Total months of unemployment (registered).""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_arbeitsunfähigkeit() -> float: """Total months of sickness, rehabilitation, measures for worklife participation(Teilhabe). """ -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_ausbildungssuche() -> float: """Total months of apprenticeship search.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_mutterschutz() -> float: """Total months of maternal protections.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_schulausbildung() -> float: """Months of schooling (incl college, unifrom age 17, max. 8 years).""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def monate_mit_bezug_entgeltersatzleistungen_wegen_arbeitslosigkeit() -> float: """Total months of unemployment (only time of Entgeltersatzleistungen, not ALGII),i.e. Arbeitslosengeld, Unterhaltsgeld, Übergangsgeld. """ -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def pflichtbeitragsmonate() -> float: """Total months of mandatory pension insurance contributions.""" -@policy_input() +@policy_input(unit=TTSIMUnit.MONTHS) def pflegeberücksichtigungszeiten_monate() -> float: """Total months of home care provision (01.01.1992-31.03.1995).""" diff --git a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml index 0366cfeb06..de4e8cd7e5 100644 --- a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml @@ -14,8 +14,9 @@ zugangsfaktor_veränderung_pro_jahr: Factor with which the Zugangsfaktor / "access factor" for receiving the statutory pension is increased/decreased for each year of less/more work. Careful: There are many exceptions to this rule! - unit: null - reference_period: Year + unit: + vorzeitiger_renteneintritt: DIMENSIONLESS_PER_YEAR + späterer_renteneintritt: DIMENSIONLESS_PER_YEAR type: dict 2001-01-01: vorzeitiger_renteneintritt: 0.036 @@ -33,57 +34,81 @@ parameter_rentenwert_nach_wohnort: statistik-rente.de/drv, § 68 SGB VI The current pension value expresses the amount of monthly pension paid for one Entgeltpunkt. - unit: Euros - reference_period: null type: dict 1992-01-01: - west: 21.19 - ost: 12.05 + unit: DM_PER_MONTH + west: 41.44 + ost: 23.57 + reference: § 68 Abs. 1 SGB VI; Art. 1 V. v. 19.12.1991 BGBl. I S. 2344 (Ost). 1992-07-01: - west: 21.80 - ost: 13.59 + west: 42.63 + ost: 26.57 + reference: V. v. 05.06.1992 BGBl. I S. 1017. 1993-01-01: updates_previous: true - ost: 14.41 + ost: 28.19 + reference: V. v. 08.12.1992 BGBl. I S. 1998. 1993-07-01: - west: 22.75 - ost: 16.45 + west: 44.49 + ost: 32.17 + reference: V. v. 09.06.1993 BGBl. I S. 917. 1994-01-01: updates_previous: true - ost: 17.05 + ost: 33.34 + reference: § 2 V. v. 01.12.1993 BGBl. I S. 1987. 1994-07-01: - west: 23.52 - ost: 17.63 + west: 46.00 + ost: 34.49 + reference: V. v. 10.06.1994 BGBl. I S. 1224. 1995-01-01: updates_previous: true - ost: 18.13 + ost: 35.45 + reference: V. v. 12.12.1994 BGBl. I S. 3805. 1995-07-01: - west: 23.64 - ost: 18.58 + west: 46.23 + ost: 36.33 + reference: V. v. 01.06.1995 BGBl. I S. 772. 1996-01-01: updates_previous: true - ost: 19.39 + ost: 37.92 + reference: V. v. 04.12.1995 BGBl. I S. 1582. 1996-07-01: - west: 23.86 - ost: 19.62 + west: 46.67 + ost: 38.38 + reference: V. v. 10.06.1996 BGBl. I S. 813. 1997-07-01: - west: 24.26 - ost: 20.71 + west: 47.44 + ost: 40.51 + reference: V. v. 10.06.1997 BGBl. I S. 1352. 1998-07-01: - west: 24.36 - ost: 20.90 + west: 47.65 + ost: 40.87 + reference: V. v. 20.05.1998 BGBl. I S. 1166. 1999-07-01: - west: 24.69 - ost: 21.48 + west: 48.29 + ost: 42.01 + reference: V. v. 27.05.1999 BGBl. I S. 1078. 2000-07-01: - west: 24.84 - ost: 21.61 + west: 48.58 + ost: 42.26 + reference: V. v. 31.05.2000 BGBl. I S. 788. 2001-07-01: - west: 25.31 - ost: 22.06 + west: 49.51 + ost: 43.15 + reference: V. v. 14.06.2001 BGBl. I S. 1040. + 2002-01-01: + unit: EUR_PER_MONTH + west: 25.31406 + ost: 22.06224 + reference: § 1 V. v. 14.06.2001 BGBl. I S. 1040; § 255d SGB VI. + note: >- + § 255d SGB VI verlangt, den zum 1. Januar 2002 in Euro umgerechneten aktuellen + Rentenwert mit fünf Dezimalstellen in der Rentenanpassungsverordnung 2001 + bekannt zu geben. 2002-07-01: west: 25.86 ost: 22.70 + reference: V. v. 07.06.2002 BGBl. I S. 1799. 2003-07-01: west: 26.13 ost: 22.97 @@ -133,8 +158,8 @@ parameter_rentenwert_nach_wohnort: west: 36.02 ost: 35.52 2023-07-01: - note: Rentenwert einheitlich. Siehe `rentenwert`. -rentenwert: + note: Rentenwert einheitlich. Siehe `rentenwert_m`. +rentenwert_m: name: de: Rentenwert (Wert eines Entgeltpunktes). en: Value of one Entgeltpunkt. @@ -147,8 +172,7 @@ rentenwert: statistik-rente.de/drv, § 68 SGB VI The current pension value expresses the amount of monthly pension paid for one Entgeltpunkt. - unit: Euros - reference_period: null + unit: EUR_PER_MONTH type: scalar 2023-07-01: value: 37.60 diff --git a/src/gettsim/germany/sozialversicherung/rente/wartezeit.py b/src/gettsim/germany/sozialversicherung/rente/wartezeit.py index cae88efe60..016724988b 100644 --- a/src/gettsim/germany/sozialversicherung/rente/wartezeit.py +++ b/src/gettsim/germany/sozialversicherung/rente/wartezeit.py @@ -4,10 +4,10 @@ from ttsim.unit_converters import m_to_y -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def mindestwartezeit_erfüllt( pflichtbeitragsmonate: float, freiwillige_beitragsmonate: float, @@ -21,7 +21,7 @@ def mindestwartezeit_erfüllt( ) -@policy_function(end_date="2017-12-31") +@policy_function(end_date="2017-12-31", unit=TTSIMUnit.DIMENSIONLESS) def wartezeit_15_jahre_erfüllt( pflichtbeitragsmonate: float, freiwillige_beitragsmonate: float, @@ -35,7 +35,7 @@ def wartezeit_15_jahre_erfüllt( ) -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def wartezeit_35_jahre_erfüllt( pflichtbeitragsmonate: float, freiwillige_beitragsmonate: float, @@ -62,7 +62,7 @@ def wartezeit_35_jahre_erfüllt( ) -@policy_function(start_date="2012-01-01") +@policy_function(start_date="2012-01-01", unit=TTSIMUnit.DIMENSIONLESS) def wartezeit_45_jahre_erfüllt( pflichtbeitragsmonate: float, freiwillige_beitragsmonate: float, @@ -101,7 +101,7 @@ def wartezeit_45_jahre_erfüllt( ) -@policy_function() +@policy_function(unit=TTSIMUnit.MONTHS) def anrechnungsmonate_35_jahre_wartezeit( monate_in_arbeitsunfähigkeit: float, krankheitszeiten_ab_16_bis_24_monate: float, @@ -125,7 +125,7 @@ def anrechnungsmonate_35_jahre_wartezeit( ) -@policy_function(start_date="2012-01-01") +@policy_function(start_date="2012-01-01", unit=TTSIMUnit.MONTHS) def anrechnungsmonate_45_jahre_wartezeit( monate_in_arbeitsunfähigkeit: float, monate_mit_bezug_entgeltersatzleistungen_wegen_arbeitslosigkeit: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/wartezeit.yaml b/src/gettsim/germany/sozialversicherung/rente/wartezeit.yaml index 5e53d06f39..1f864c7784 100644 --- a/src/gettsim/germany/sozialversicherung/rente/wartezeit.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/wartezeit.yaml @@ -8,8 +8,7 @@ wartezeitgrenzen: Zeitgrenzen, die für Erfüllung einer Wartezeit notwendig sind (in Jahren). en: >- Time thresholds for accomplishing waiting times (in years). - unit: Years - reference_period: null + unit: YEARS type: dict 1980-01-01: wartezeit_5: 5 @@ -32,8 +31,7 @@ mindestpflichtbeitragsjahre_für_anrechenbarkeit_freiwilliger_beitragszeiten: en: >- § 51 Abs. 3a SGB VI https://www.gesetze-im-internet.de/sgb_6/__51.html - unit: Years - reference_period: null + unit: YEARS type: scalar 1980-01-01: value: 18 diff --git a/src/gettsim/germany/unterhalt/inputs.py b/src/gettsim/germany/unterhalt/inputs.py index 54de541bf6..ffe505b75b 100644 --- a/src/gettsim/germany/unterhalt/inputs.py +++ b/src/gettsim/germany/unterhalt/inputs.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def anspruch_m() -> float: """Monthly gross alimony payments to be received as determined by the court.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def tatsächlich_erhaltener_betrag_m() -> float: """Alimony payments the recipient actually receives.""" diff --git a/src/gettsim/germany/unterhalt/unterhalt.py b/src/gettsim/germany/unterhalt/unterhalt.py index cb02e81d33..97059da83f 100644 --- a/src/gettsim/germany/unterhalt/unterhalt.py +++ b/src/gettsim/germany/unterhalt/unterhalt.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def kind_festgelegter_zahlbetrag_m( anspruch_m: float, kindergeld__betrag_m: float, diff --git a/src/gettsim/germany/unterhalt/unterhalt.yaml b/src/gettsim/germany/unterhalt/unterhalt.yaml index 50dd0f4dcc..67fdcc9d9c 100644 --- a/src/gettsim/germany/unterhalt/unterhalt.yaml +++ b/src/gettsim/germany/unterhalt/unterhalt.yaml @@ -17,8 +17,7 @@ abzugsrate_kindergeld: the child receives the child benefit for a minor child, the other parent liable for child alimony payments can deduct half of the child benefit when calculating alimony. - unit: Share - reference_period: null + unit: DIMENSIONLESS type: dict 2008-01-01: minderjährig: 0.5 diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py index 523ee4450b..7ec4c509d9 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py @@ -8,9 +8,11 @@ from gettsim.germany.param_types import Altersgrenzen, SatzMitAltersgrenzen from gettsim.tt import ( + UNSET_UNIT, AggType, ConsecutiveIntLookupTableParamValue, RoundingSpec, + TTSIMUnit, agg_by_p_id_function, join, param_function, @@ -23,7 +25,7 @@ from gettsim.typing import BoolColumn, IntColumn, RawParamValue -@agg_by_p_id_function(agg_type=AggType.SUM) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.CURRENCY.PER_MONTH) def an_elternteil_auszuzahlender_betrag_m( betrag_m: float, kindergeld__p_id_empfänger: int, @@ -35,10 +37,12 @@ def an_elternteil_auszuzahlender_betrag_m( @policy_function( start_date="2009-01-01", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=1, direction="up", reference="§ 9 Abs. 3 UhVorschG", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m( unterhalt__tatsächlich_erhaltener_betrag_m: float, @@ -70,7 +74,7 @@ def betrag_m( return out -@policy_function(vectorization_strategy="not_required") +@policy_function(vectorization_strategy="not_required", unit=TTSIMUnit.DIMENSIONLESS) def elternteil_alleinerziehend( kindergeld__p_id_empfänger: IntColumn, p_id: IntColumn, @@ -91,20 +95,27 @@ def elternteil_alleinerziehend( @policy_function( + start_date="2002-01-01", end_date="2008-12-31", leaf_name="betrag_m", rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH, base=1, direction="down", reference="§ 9 Abs. 3 UhVorschG", ), fail_msg_if_included="Unterhaltsvorschuss is not implemented prior to 2009.", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_bis_2008() -> float: pass -@param_function(start_date="2023-01-01", leaf_name="kindergeld_erstes_kind_m") +@param_function( + start_date="2023-01-01", + leaf_name="kindergeld_erstes_kind_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def kindergeld_erstes_kind_ohne_staffelung_m( kindergeld__satz: float, ) -> float: @@ -112,7 +123,11 @@ def kindergeld_erstes_kind_ohne_staffelung_m( return kindergeld__satz -@param_function(end_date="2022-12-31", leaf_name="kindergeld_erstes_kind_m") +@param_function( + end_date="2022-12-31", + leaf_name="kindergeld_erstes_kind_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def kindergeld_erstes_kind_gestaffelt_m( kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, ) -> float: @@ -124,6 +139,7 @@ def kindergeld_erstes_kind_gestaffelt_m( start_date="2009-01-01", end_date="2014-12-31", leaf_name="anspruchshöhe_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def unterhaltsvorschuss_anspruch_m_2009_bis_2014( alter: int, @@ -173,6 +189,7 @@ def unterhaltsvorschuss_anspruch_m_2009_bis_2014( start_date="2015-01-01", end_date="2015-12-31", leaf_name="anspruchshöhe_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anspruchshöhe_m_anwendungsvors( alter: int, @@ -205,6 +222,7 @@ def anspruchshöhe_m_anwendungsvors( start_date="2016-01-01", end_date="2017-06-30", leaf_name="anspruchshöhe_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anspruchshöhe_m_2016_bis_2017_06( alter: int, @@ -235,7 +253,11 @@ def anspruchshöhe_m_2016_bis_2017_06( return out -@policy_function(start_date="2017-07-01", leaf_name="anspruchshöhe_m") +@policy_function( + start_date="2017-07-01", + leaf_name="anspruchshöhe_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def anspruchshöhe_m_ab_2017_07( alter: int, elternteil_mindesteinkommen_erreicht: bool, @@ -269,7 +291,11 @@ def anspruchshöhe_m_ab_2017_07( return out -@policy_function(start_date="2017-07-01", vectorization_strategy="not_required") +@policy_function( + start_date="2017-07-01", + vectorization_strategy="not_required", + unit=TTSIMUnit.DIMENSIONLESS, +) def elternteil_mindesteinkommen_erreicht( kindergeld__p_id_empfänger: IntColumn, p_id: IntColumn, @@ -288,16 +314,16 @@ def elternteil_mindesteinkommen_erreicht( ) -@policy_function(start_date="2017-07-01") +@policy_function(start_date="2017-07-01", unit=TTSIMUnit.DIMENSIONLESS) def mindesteinkommen_erreicht( einkommen_m: float, - mindesteinkommen: float, + mindesteinkommen_m: float, ) -> bool: """Check if income is above the threshold for advance alimony payments.""" - return einkommen_m >= mindesteinkommen + return einkommen_m >= mindesteinkommen_m -@policy_function(start_date="2017-07-01") +@policy_function(start_date="2017-07-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -319,7 +345,7 @@ def einkommen_m( ) -@param_function(start_date="2008-01-01", end_date="2017-06-30") +@param_function(start_date="2008-01-01", end_date="2017-06-30", unit=UNSET_UNIT) def berechtigte_altersgruppen( raw_berechtigte_altersgruppen: RawParamValue, ) -> dict[str, Altersgrenzen]: @@ -335,7 +361,7 @@ def berechtigte_altersgruppen( } -@param_function(start_date="2016-01-01") +@param_function(start_date="2016-01-01", unit=UNSET_UNIT) def mindestunterhalt_nach_alter( raw_mindestunterhalt: RawParamValue, ) -> dict[str, SatzMitAltersgrenzen]: diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml index 06bdc6cb2e..733d450590 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml @@ -10,8 +10,19 @@ raw_mindestunterhalt: en: >- Minimum Child Alimony depending on age of child (0 - 5 years, 6 - 11 years, 12 - 17 years). - unit: Euros - reference_period: Month + unit: + kleinkind: + satz: EUR_PER_MONTH + min_alter: YEARS + max_alter: YEARS + schulkind: + satz: EUR_PER_MONTH + min_alter: YEARS + max_alter: YEARS + jugendliche: + satz: EUR_PER_MONTH + min_alter: YEARS + max_alter: YEARS type: require_converter 2016-01-01: kleinkind: @@ -117,7 +128,7 @@ raw_mindestunterhalt: jugendliche: satz: 653 reference: Artikel 1 V. v. 21.11.2024 BGBl. 2024 I Nr. 359 -mindesteinkommen: +mindesteinkommen_m: name: de: >- Monatliches Mindesteinkommen, um Unterhaltsvorschuss für Jugendliche (Kinder von @@ -128,8 +139,7 @@ mindesteinkommen: description: de: § 1 (1a) Nr. 2 Unterhaltsvorschussgesetz en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2017-07-01: value: 600 @@ -147,8 +157,7 @@ raw_berechtigte_altersgruppen: § 1 Abs. 1, 1a UhVorschG Children under the age of 12 living with a single parent are entitled to alimony payments. - unit: Years - reference_period: null + unit: YEARS type: require_converter 2008-01-01: kleinkind: @@ -173,8 +182,7 @@ faktor_jüngste_altersgruppe: § 1612a Abs. 1 BGB Factor by which the sächliche Existenzminimum is multiplied to calculate the advance child alimony for children of the youngest age group. - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 2009-01-01: value: 0.87 @@ -203,8 +211,7 @@ unterhaltsvorschuss_nach_anwendungsvorschrift: apply, which can be based on unchanged values for Kindergeld or child child allowance can be assumed. Here, the corresponding values for the advance child alimony (i.e. after deduction of the assumed Kindergeld) are used. - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: dict 2015-01-01: kleinkind: 133 diff --git "a/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" "b/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" index 9f5e7b4767..c395db2f6b 100644 --- "a/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" +++ "b/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" @@ -3,13 +3,14 @@ from __future__ import annotations from gettsim.germany import WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function @policy_function( leaf_name="wohngeld_kinderzuschlag_vorrangig_oder_günstiger", end_date="2022-12-31", warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC, + unit=TTSIMUnit.DIMENSIONLESS, ) def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( arbeitslosengeld_2__regelbedarf_m_bg: float, @@ -27,7 +28,7 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( # https://github.com/ttsim-dev/gettsim/issues/1165 return ( arbeitslosengeld_2__anzurechnendes_einkommen_m_bg - + wohngeld__anspruchshöhe_m_wthh + + cast_unit(wohngeld__anspruchshöhe_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg >= arbeitslosengeld_2__regelbedarf_m_bg ) @@ -37,6 +38,7 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( leaf_name="wohngeld_kinderzuschlag_vorrangig_oder_günstiger", start_date="2023-01-01", warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC, + unit=TTSIMUnit.DIMENSIONLESS, ) def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( bürgergeld__regelbedarf_m_bg: float, @@ -54,7 +56,7 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( # https://github.com/ttsim-dev/gettsim/issues/1165 return ( bürgergeld__anzurechnendes_einkommen_m_bg - + wohngeld__anspruchshöhe_m_wthh + + cast_unit(wohngeld__anspruchshöhe_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg >= bürgergeld__regelbedarf_m_bg ) diff --git a/src/gettsim/germany/wohnen/inputs.py b/src/gettsim/germany/wohnen/inputs.py index fec02cf65c..f4ce7cf48a 100644 --- a/src/gettsim/germany/wohnen/inputs.py +++ b/src/gettsim/germany/wohnen/inputs.py @@ -2,29 +2,29 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2008-12-31") +@policy_input(end_date="2008-12-31", unit=TTSIMUnit.CALENDAR_YEAR.PER_HH) def baujahr_immobilie_hh() -> int: """Year of construction of the household dwelling.""" -@policy_input(start_date="2005-01-01") +@policy_input(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS.PER_HH) def bewohnt_eigentum_hh() -> bool: """Owner-occupied housing.""" -@policy_input() +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH) def bruttokaltmiete_m_hh() -> float: """Rent expenses excluding utilities.""" -@policy_input(start_date="2005-01-01") +@policy_input(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH) def heizkosten_m_hh() -> float: """Heating expenses.""" -@policy_input(start_date="2005-01-01") +@policy_input(start_date="2005-01-01", unit=TTSIMUnit.SQUARE_METER.PER_HH) def wohnfläche_hh() -> float: """Size of household dwelling in square meters.""" diff --git a/src/gettsim/germany/wohngeld/einkommen.py b/src/gettsim/germany/wohngeld/einkommen.py index c0bb38e6a5..425a2c035a 100644 --- a/src/gettsim/germany/wohngeld/einkommen.py +++ b/src/gettsim/germany/wohngeld/einkommen.py @@ -7,9 +7,11 @@ from ttsim.unit_converters import per_y_to_per_m from gettsim.tt import ( + UNSET_UNIT, AggType, ConsecutiveIntLookupTableParamValue, PiecewisePolynomialParamValue, + TTSIMUnit, agg_by_p_id_function, get_consecutive_int_lookup_table_param_value, param_function, @@ -23,7 +25,9 @@ from gettsim.germany.grundsicherung.bedarfe import Regelbedarfsstufen -@agg_by_p_id_function(agg_type=AggType.SUM, end_date="2015-12-31") +@agg_by_p_id_function( + agg_type=AggType.SUM, end_date="2015-12-31", unit=TTSIMUnit.PERSON_COUNT +) def alleinerziehendenbonus( kindergeld__kind_bis_10_mit_kindergeld: bool, kindergeld__p_id_empfänger: int, @@ -32,21 +36,25 @@ def alleinerziehendenbonus( pass -@param_function() -def min_einkommen_lookup_table( - min_einkommen: dict[int, float], +@param_function(unit=UNSET_UNIT) +def mindesteinkommen_nach_haushaltsgröße_m_wthh_lookup_table( + mindesteinkommen_nach_haushaltsgröße_m_wthh: dict[int, float], xnp: ModuleType, ) -> ConsecutiveIntLookupTableParamValue: """Create a LookupTable for the min income thresholds.""" - return get_consecutive_int_lookup_table_param_value(raw=min_einkommen, xnp=xnp) + return get_consecutive_int_lookup_table_param_value( + raw=mindesteinkommen_nach_haushaltsgröße_m_wthh, xnp=xnp + ) -@policy_function() +@policy_function( + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, +) def einkommen_m_wthh( anzahl_personen_wthh: int, freibetrag_m_wthh: float, einkommen_vor_freibetrag_m_wthh: float, - min_einkommen_lookup_table: ConsecutiveIntLookupTableParamValue, + mindesteinkommen_nach_haushaltsgröße_m_wthh_lookup_table: ConsecutiveIntLookupTableParamValue, xnp: ModuleType, ) -> float: """Income relevant for Wohngeld calculation. @@ -54,17 +62,19 @@ def einkommen_m_wthh( Reference: § 13 WoGG """ einkommen_ohne_freibetrag = einkommen_vor_freibetrag_m_wthh - freibetrag_m_wthh - mindesteinkommen = min_einkommen_lookup_table.look_up( + mindesteinkommen = mindesteinkommen_nach_haushaltsgröße_m_wthh_lookup_table.look_up( xnp.minimum( anzahl_personen_wthh, - min_einkommen_lookup_table.values_to_look_up.shape[0], + mindesteinkommen_nach_haushaltsgröße_m_wthh_lookup_table.values_to_look_up.shape[ + 0 + ], ) ) return xnp.maximum(einkommen_ohne_freibetrag, mindesteinkommen) -@policy_function() +@policy_function(verify_units=False, unit=TTSIMUnit.DIMENSIONLESS) def abzugsanteil_vom_einkommen_für_steuern_sozialversicherung( einkommensteuer__betrag_y_sn: float, sozialversicherung__rente__beitrag__betrag_versicherter_y: float, @@ -88,7 +98,11 @@ def abzugsanteil_vom_einkommen_für_steuern_sozialversicherung( return abzugsbeträge_steuern_sozialversicherung.look_up(stufe) -@policy_function(end_date="2006-12-31", leaf_name="einkommen_vor_freibetrag_m") +@policy_function( + end_date="2006-12-31", + leaf_name="einkommen_vor_freibetrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def einkommen_vor_freibetrag_m_ohne_elterngeld( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, einkommensteuer__einkünfte__aus_nichtselbstständiger_arbeit__einnahmen_nach_abzug_werbungskosten_m: float, @@ -126,7 +140,11 @@ def einkommen_vor_freibetrag_m_ohne_elterngeld( return (1 - abzugsanteil_vom_einkommen_für_steuern_sozialversicherung) * eink_ind -@policy_function(start_date="2007-01-01", leaf_name="einkommen_vor_freibetrag_m") +@policy_function( + start_date="2007-01-01", + leaf_name="einkommen_vor_freibetrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, +) def einkommen_vor_freibetrag_m_mit_elterngeld( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, einkommensteuer__einkünfte__aus_nichtselbstständiger_arbeit__einnahmen_nach_abzug_werbungskosten_m: float, @@ -170,7 +188,9 @@ def einkommen_vor_freibetrag_m_mit_elterngeld( return (1 - abzugsanteil_vom_einkommen_für_steuern_sozialversicherung) * eink_ind -@policy_function(end_date="2015-12-31", leaf_name="freibetrag_m") +@policy_function( + end_date="2015-12-31", leaf_name="freibetrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def freibetrag_m_bis_2015( einnahmen__bruttolohn_m: float, ist_kind_mit_erwerbseinkommen: bool, @@ -210,6 +230,7 @@ def freibetrag_m_bis_2015( start_date="2016-01-01", end_date="2020-12-31", leaf_name="freibetrag_m", + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def freibetrag_m_ab_2016_bis_2020( einnahmen__bruttolohn_m: float, @@ -237,7 +258,9 @@ def freibetrag_m_ab_2016_bis_2020( return freibetrag_bei_behinderung + freibetrag_kinder -@policy_function(start_date="2021-01-01", leaf_name="freibetrag_m") +@policy_function( + start_date="2021-01-01", leaf_name="freibetrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH +) def freibetrag_m_ab_2021( einnahmen__bruttolohn_m: float, einnahmen__renten__gesetzliche_m: float, @@ -295,7 +318,7 @@ def freibetrag_m_ab_2021( return freibetrag_bei_behinderung + freibetrag_kinder + freibetrag_grundrente -@policy_function() +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_mit_erwerbseinkommen( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, diff --git a/src/gettsim/germany/wohngeld/einkommen.yaml b/src/gettsim/germany/wohngeld/einkommen.yaml index 4f68071771..02c0f57200 100644 --- a/src/gettsim/germany/wohngeld/einkommen.yaml +++ b/src/gettsim/germany/wohngeld/einkommen.yaml @@ -1,5 +1,5 @@ --- -min_einkommen: +mindesteinkommen_nach_haushaltsgröße_m_wthh: name: de: Minimalwert für Parameter Y en: null @@ -15,10 +15,9 @@ min_einkommen: Parameter Y is dependent on the number of household members (in the Wohngeld sense). Keys in the parameter dicts refer to the number of household members. If there are more than 12 members, the value for 12 members is used. - unit: Euros - reference_period: Month type: dict 1984-01-01: + unit: DM_PER_MONTH_PER_WTHH 1: 0 2: 0 3: 0 @@ -32,6 +31,25 @@ min_einkommen: 11: 0 12: 0 2001-01-01: + 1: 234.70 + 2: 293.37 + 3: 391.17 + 4: 488.96 + 5: 557.41 + 6: 625.87 + 7: 694.32 + 8: 752.99 + 9: 1085.49 + 10: 1427.76 + 11: 1955.83 + 12: 2298.10 + reference: Art. 5 G. v. 22.12.1999, BGBl I S. 2671 (Anlage 2 Nr. 3). + note: >- + Anlage 2 nennt die Mindestwerte für „Y“ in Euro und schreibt vor, ein in + Deutsche Mark ermitteltes Einkommen zuvor durch 1,95583 zu teilen; hier in + Deutsche Mark umgerechnet. + 2002-01-01: + unit: EUR_PER_MONTH_PER_WTHH 1: 120 2: 150 3: 200 @@ -44,6 +62,7 @@ min_einkommen: 10: 730 11: 1000 12: 1175 + reference: Art. 6 G. v. 22.12.1999, BGBl I S. 2671 (Anlage 2 Nr. 3). 2009-01-01: 1: 205 2: 245 @@ -125,8 +144,8 @@ abzugsbeträge_steuern_sozialversicherung: Kriterien sind entrichtete Steuern / entrichtete GKV- und GPV-Beiträge / entrichtete GRV-Beiträge en: null - unit: Share - reference_period: null + input_unit: DIMENSIONLESS + output_unit: DIMENSIONLESS type: consecutive_int_lookup_table 1984-01-01: 0: 0.06 @@ -151,18 +170,25 @@ freibetrag_kinder_m: description: de: § 17 (4/5) WoGG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: dict 1984-01-01: - alleinerziehend: 51 + unit: DM_PER_MONTH + alleinerziehend: 100 arbeitendes_kind: 0 + reference: § 15 Abs. 2 WoGG, Neufassung v. 11.02.1993 BGBl I S. 183. + note: Das Gesetz nennt 1 200 Deutsche Mark im Jahr. 2001-01-01: updates_previous: true - arbeitendes_kind: 51 + arbeitendes_kind: 100 + reference: § 15 Abs. 3 WoGG, Neufassung v. 11.02.1993 BGBl I S. 183. + note: Das Gesetz nennt 1 200 Deutsche Mark im Jahr. 2002-01-01: + unit: EUR_PER_MONTH alleinerziehend: 50 arbeitendes_kind: 50 + reference: Art. 6 G. v. 22.12.1999 BGBl I S. 2671. + note: Das Gesetz nennt 600 Euro im Jahr. 2016-01-01: note: >- neu §17 3. WoGG a) Alleinerziehend b) Kind unter 18 und neu §17 4. WoGG Kind noch @@ -178,32 +204,33 @@ freibetrag_bei_behinderung_gestaffelt_y: de: >- § 17 (2) WoGG Der Betrag ist abhängig vom Behinderungsgrad der jeweiligen Person. - Achtung: Die Zahlen vor 1991 erscheinen falsch. Senkung in 1986 unwahrscheinlich, - im Zweifel wurde dort eher die Stufe mit Behinderungsgrad 1-80% eingeführt. + Bis 1990 gilt ein einheitlicher Freibetrag ab einem Grad der Behinderung von 80; + die gestaffelten Beträge kommen 1991 hinzu. en: null - unit: Euros - reference_period: Year + input_unit: DIMENSIONLESS + output_unit: EUR_PER_YEAR type: piecewise_constant 1984-01-01: + output_unit: DM_PER_YEAR + reference: >- + § 16 Abs. 3 WoGG i. d. F. der Bekanntmachung v. 11.07.1985 BGBl I S. 1421. intervals: - interval: (-inf, 80) intercept: 0 - interval: '[80, inf)' - intercept: 1224 - 1986-01-01: - updates_previous: true - intervals: - - interval: '[80, inf)' - intercept: 612 + intercept: 2400 1991-01-01: + reference: § 16 Abs. 2 WoGG, Neufassung v. 11.02.1993 BGBl I S. 183. intervals: - interval: (-inf, 1) intercept: 0 - interval: '[1, 80)' - intercept: 1224 + intercept: 2400 - interval: '[80, inf)' - intercept: 1536 + intercept: 3000 2002-01-01: + output_unit: EUR_PER_YEAR + reference: Art. 6 G. v. 22.12.1999 BGBl I S. 2671. intervals: - interval: (-inf, 1) intercept: 0 @@ -224,8 +251,7 @@ freibetrag_bei_behinderung_pauschal_y: gem. §14 SGB XI. und gleichzeitig Häusliche/teilstationäre/Kurzzeit-Pflege vorliegen. Dies ist aktuell nicht implementiert. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 2016-01-01: reference: 2 Art. 1 G. v. 08.10.2015 BGBl Nr.38 S.1612 @@ -252,8 +278,8 @@ anrechnungsfreier_anteil_gesetzliche_rente: SGB VI with at least 33 years of Grundrentenzeiten: € 100 base plus 30 % of pension income above € 100, capped at 50 % of Regelbedarfsstufe 1 (Anlage zu § 28 SGB XII). - unit: Share - reference_period: null + input_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH type: piecewise_linear 2021-01-01: intervals: diff --git a/src/gettsim/germany/wohngeld/inputs.py b/src/gettsim/germany/wohngeld/inputs.py index f5b01f016b..14a2fc8f71 100644 --- a/src/gettsim/germany/wohngeld/inputs.py +++ b/src/gettsim/germany/wohngeld/inputs.py @@ -2,9 +2,9 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input() +@policy_input(unit=TTSIMUnit.DIMENSIONLESS.PER_HH) def mietstufe_hh() -> int: """Municipality's rent classification.""" diff --git a/src/gettsim/germany/wohngeld/miete.py b/src/gettsim/germany/wohngeld/miete.py index af9197118b..3dad4f7801 100644 --- a/src/gettsim/germany/wohngeld/miete.py +++ b/src/gettsim/germany/wohngeld/miete.py @@ -6,7 +6,9 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, ConsecutiveIntLookupTableParamValue, + TTSIMUnit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -28,6 +30,7 @@ class LookupTableBaujahr: start_date="1984-01-01", end_date="2008-12-31", leaf_name="max_miete_m_lookup", + unit=UNSET_UNIT, ) def max_miete_m_lookup_mit_baujahr( raw_max_miete_m_nach_baujahr: dict[int | str, dict[int, dict[int, float]]], @@ -60,7 +63,9 @@ def max_miete_m_lookup_mit_baujahr( ) -@param_function(start_date="2009-01-01", leaf_name="max_miete_m_lookup") +@param_function( + start_date="2009-01-01", leaf_name="max_miete_m_lookup", unit=UNSET_UNIT +) def max_miete_m_lookup_ohne_baujahr( raw_max_miete_m: dict[int | str, dict[int, float]], max_anzahl_personen: dict[str, int], @@ -81,7 +86,7 @@ def max_miete_m_lookup_ohne_baujahr( return get_consecutive_int_lookup_table_param_value(raw=expanded, xnp=xnp) # ty: ignore[invalid-argument-type] -@param_function(start_date="1984-01-01") +@param_function(start_date="1984-01-01", unit=UNSET_UNIT) def min_miete_lookup( raw_min_miete_m: dict[int, float], max_anzahl_personen: dict[str, int], @@ -103,7 +108,7 @@ def min_miete_lookup( return get_consecutive_int_lookup_table_param_value(raw=expanded, xnp=xnp) -@param_function(start_date="2021-01-01") +@param_function(start_date="2021-01-01", unit=UNSET_UNIT) def heizkostenentlastung_m_lookup( raw_heizkostenentlastung_m: dict[int | str, float], max_anzahl_personen: dict[str, int], @@ -122,7 +127,7 @@ def heizkostenentlastung_m_lookup( return get_consecutive_int_lookup_table_param_value(raw=expanded, xnp=xnp) # ty: ignore[invalid-argument-type] -@param_function(start_date="2023-01-01") +@param_function(start_date="2023-01-01", unit=UNSET_UNIT) def dauerhafte_heizkostenkomponente_m_lookup( raw_dauerhafte_heizkostenkomponente_m: dict[int | str, float], max_anzahl_personen: dict[str, int], @@ -141,7 +146,7 @@ def dauerhafte_heizkostenkomponente_m_lookup( return get_consecutive_int_lookup_table_param_value(raw=expanded, xnp=xnp) # ty: ignore[invalid-argument-type] -@param_function(start_date="2023-01-01") +@param_function(start_date="2023-01-01", unit=UNSET_UNIT) def klimakomponente_m_lookup( raw_klimakomponente_m: dict[int | str, float], max_anzahl_personen: dict[str, int], @@ -160,7 +165,7 @@ def klimakomponente_m_lookup( return get_consecutive_int_lookup_table_param_value(raw=expanded, xnp=xnp) # ty: ignore[invalid-argument-type] -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def miete_m_wthh( miete_m_hh: float, anzahl_personen_wthh: int, @@ -172,7 +177,7 @@ def miete_m_wthh( return miete_m_hh * (anzahl_personen_wthh / anzahl_personen_hh) -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def min_miete_m_hh( anzahl_personen_hh: int, min_miete_lookup: ConsecutiveIntLookupTableParamValue, @@ -185,6 +190,7 @@ def min_miete_m_hh( start_date="1984-01-01", end_date="2008-12-31", leaf_name="miete_m_hh", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_mit_baujahr( mietstufe_hh: int, @@ -211,6 +217,7 @@ def miete_m_hh_mit_baujahr( start_date="2009-01-01", end_date="2020-12-31", leaf_name="miete_m_hh", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_ohne_baujahr_ohne_heizkostenentlastung( mietstufe_hh: int, @@ -229,6 +236,7 @@ def miete_m_hh_ohne_baujahr_ohne_heizkostenentlastung( start_date="2021-01-01", end_date="2022-12-31", leaf_name="miete_m_hh", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_mit_heizkostenentlastung( mietstufe_hh: int, @@ -252,6 +260,7 @@ def miete_m_hh_mit_heizkostenentlastung( @policy_function( start_date="2023-01-01", leaf_name="miete_m_hh", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_mit_heizkostenentlastung_dauerhafte_heizkostenkomponente_klimakomponente( mietstufe_hh: int, diff --git a/src/gettsim/germany/wohngeld/miete.yaml b/src/gettsim/germany/wohngeld/miete.yaml index b64859905b..f9105ac7ab 100644 --- a/src/gettsim/germany/wohngeld/miete.yaml +++ b/src/gettsim/germany/wohngeld/miete.yaml @@ -14,23 +14,28 @@ raw_min_miete_m: Parameter is dependent on the number of household members. Keys in the parameter dicts refer to the number of household members. If there are more than 12 members, the value for 12 members is used. - unit: Euros - reference_period: Month type: dict - 1984-01-01: - 1: 0 - 2: 0 - 3: 0 - 4: 0 - 5: 0 - 6: 0 - 7: 0 - 8: 0 - 9: 0 - 10: 0 - 11: 0 - 12: 0 2001-01-01: + unit: DM_PER_MONTH_PER_WTHH + 1: 44.01 + 2: 44.01 + 3: 53.79 + 4: 63.56 + 5: 63.56 + 6: 63.56 + 7: 68.45 + 8: 68.45 + 9: 73.34 + 10: 73.34 + 11: 146.69 + 12: 303.15 + reference: Art. 5 G. v. 22.12.1999, BGBl I S. 2671 (Anlage 2 Nr. 3). + note: >- + Anlage 2 nennt die Mindestwerte für „M“ in Euro und schreibt vor, eine in + Deutsche Mark angegebene Miete zuvor durch 1,95583 zu teilen; daher hier in + Deutsche Mark umgerechnet. + 2002-01-01: + unit: EUR_PER_MONTH 1: 22.5 2: 22.5 3: 27.5 @@ -43,6 +48,7 @@ raw_min_miete_m: 10: 37.5 11: 75 12: 155 + reference: Art. 6 G. v. 22.12.1999, BGBl I S. 2671 (Anlage 2 Nr. 3). 2009-01-01: 1: 45 2: 55 @@ -110,763 +116,901 @@ raw_max_miete_m_nach_baujahr: - maximales Baujahr des Hauses - Mietstufe en: null - unit: Euros - reference_period: Month type: require_converter 1981-01-01: + unit: DM_PER_MONTH 1: 1965: - 1: 130 - 2: 135 - 3: 143 + 1: 255 + 2: 265 + 3: 280 1971: - 1: 148 - 2: 153 - 3: 161 + 1: 290 + 2: 300 + 3: 315 1977: - 1: 161 - 2: 166 - 3: 174 + 1: 315 + 2: 325 + 3: 340 2100: - 1: 169 - 2: 179 - 3: 189 + 1: 330 + 2: 350 + 3: 370 2: 1965: - 1: 164 - 2: 171 - 3: 182 + 1: 320 + 2: 335 + 3: 355 1971: - 1: 189 - 2: 197 - 3: 207 + 1: 370 + 2: 385 + 3: 405 1977: - 1: 210 - 2: 217 - 3: 228 + 1: 410 + 2: 425 + 3: 445 2100: - 1: 225 - 2: 235 - 3: 245 + 1: 440 + 2: 460 + 3: 480 3: 1965: - 1: 199 - 2: 207 - 3: 215 + 1: 390 + 2: 405 + 3: 420 1971: - 1: 233 - 2: 240 - 3: 251 + 1: 455 + 2: 470 + 3: 490 1977: - 1: 256 - 2: 263 - 3: 274 + 1: 500 + 2: 515 + 3: 535 2100: - 1: 276 - 2: 286 - 3: 297 + 1: 540 + 2: 560 + 3: 580 4: 1965: - 1: 235 - 2: 245 - 3: 258 + 1: 460 + 2: 480 + 3: 505 1971: - 1: 266 - 2: 276 - 3: 289 + 1: 520 + 2: 540 + 3: 565 1977: - 1: 294 - 2: 304 - 3: 317 + 1: 575 + 2: 595 + 3: 620 2100: - 1: 320 - 2: 332 - 3: 345 + 1: 625 + 2: 650 + 3: 675 5: 1965: - 1: 268 - 2: 281 - 3: 294 + 1: 525 + 2: 550 + 3: 575 1971: - 1: 304 - 2: 314 - 3: 330 + 1: 595 + 2: 615 + 3: 645 1977: - 1: 335 - 2: 348 - 3: 363 + 1: 655 + 2: 680 + 3: 710 2100: - 1: 366 - 2: 378 - 3: 394 + 1: 715 + 2: 740 + 3: 770 jede_weitere_person: 1965: - 1: 33 - 2: 34 - 3: 36 + 1: 64 + 2: 67 + 3: 70 1971: - 1: 37 - 2: 39 - 3: 40 + 1: 73 + 2: 76 + 3: 79 1977: - 1: 41 - 2: 42 - 3: 44 + 1: 80 + 2: 83 + 3: 86 2100: - 1: 45 - 2: 47 - 3: 48 + 1: 88 + 2: 91 + 3: 94 reference: Art. 1 G. v. 04.08.1980 BGBl I S. 1159. note: >- - Bis 1985 nur drei Mietstufen, streng abhängig von der Größe der Gemeinde. Es wird - "Wohnung mit Sammelheizung und mit Bad oder Duschraum" angenommen. + Bis 1985 nur drei Mietstufen, streng abhängig von der Größe der Gemeinde. Es + wird "Wohnung mit Sammelheizung und mit Bad oder Duschraum" angenommen. 1985-01-01: 1: 1965: - 1: 146 - 2: 156 - 3: 164 - 4: 174 - 5: 184 + 1: 285 + 2: 305 + 3: 320 + 4: 340 + 5: 360 1971: - 1: 161 - 2: 174 - 3: 184 - 4: 194 - 5: 207 + 1: 315 + 2: 340 + 3: 360 + 4: 380 + 5: 405 1977: - 1: 171 - 2: 182 - 3: 194 - 4: 205 - 5: 217 + 1: 335 + 2: 355 + 3: 380 + 4: 400 + 5: 425 2100: - 1: 184 - 2: 194 - 3: 207 - 4: 220 - 5: 233 + 1: 360 + 2: 380 + 3: 405 + 4: 430 + 5: 455 2: 1965: - 1: 187 - 2: 199 - 3: 212 - 4: 225 - 5: 238 + 1: 365 + 2: 390 + 3: 415 + 4: 440 + 5: 465 1971: - 1: 210 - 2: 222 - 3: 238 - 4: 251 - 5: 266 + 1: 410 + 2: 435 + 3: 465 + 4: 490 + 5: 520 1977: - 1: 220 - 2: 235 - 3: 251 - 4: 266 - 5: 281 + 1: 430 + 2: 460 + 3: 490 + 4: 520 + 5: 550 2100: - 1: 235 - 2: 253 - 3: 268 - 4: 284 - 5: 302 + 1: 460 + 2: 495 + 3: 525 + 4: 555 + 5: 590 3: 1965: - 1: 222 - 2: 238 - 3: 253 - 4: 268 - 5: 284 + 1: 435 + 2: 465 + 3: 495 + 4: 525 + 5: 555 1971: - 1: 251 - 2: 266 - 3: 284 - 4: 299 - 5: 317 + 1: 490 + 2: 520 + 3: 555 + 4: 585 + 5: 620 1977: - 1: 263 - 2: 281 - 3: 299 - 4: 317 - 5: 335 + 1: 515 + 2: 550 + 3: 585 + 4: 620 + 5: 655 2100: - 1: 281 - 2: 302 - 3: 320 - 4: 340 - 5: 358 + 1: 550 + 2: 590 + 3: 625 + 4: 665 + 5: 700 4: 1965: - 1: 261 - 2: 279 - 3: 294 - 4: 312 - 5: 330 + 1: 510 + 2: 545 + 3: 575 + 4: 610 + 5: 645 1971: - 1: 289 - 2: 309 - 3: 330 - 4: 350 - 5: 368 + 1: 565 + 2: 605 + 3: 645 + 4: 685 + 5: 720 1977: - 1: 307 - 2: 327 - 3: 348 - 4: 368 - 5: 389 + 1: 600 + 2: 640 + 3: 680 + 4: 720 + 5: 760 2100: - 1: 327 - 2: 350 - 3: 373 - 4: 396 - 5: 417 + 1: 640 + 2: 685 + 3: 730 + 4: 775 + 5: 815 5: 1965: - 1: 297 - 2: 317 - 3: 337 - 4: 355 - 5: 376 + 1: 580 + 2: 620 + 3: 660 + 4: 695 + 5: 735 1971: - 1: 330 - 2: 353 - 3: 376 - 4: 399 - 5: 419 + 1: 645 + 2: 690 + 3: 735 + 4: 780 + 5: 820 1977: - 1: 348 - 2: 373 - 3: 396 - 4: 419 - 5: 442 + 1: 680 + 2: 730 + 3: 775 + 4: 820 + 5: 865 2100: - 1: 373 - 2: 399 - 3: 424 - 4: 450 - 5: 476 + 1: 730 + 2: 780 + 3: 830 + 4: 880 + 5: 930 jede_weitere_person: 1965: - 1: 36 - 2: 38 - 3: 41 - 4: 43 - 5: 46 + 1: 70 + 2: 75 + 3: 80 + 4: 85 + 5: 90 1971: - 1: 41 - 2: 43 - 3: 46 - 4: 49 - 5: 51 + 1: 80 + 2: 85 + 3: 90 + 4: 95 + 5: 100 1977: - 1: 41 - 2: 43 - 3: 46 - 4: 49 - 5: 51 + 1: 85 + 2: 90 + 3: 95 + 4: 100 + 5: 105 2100: - 1: 46 - 2: 49 - 3: 51 - 4: 56 - 5: 59 + 1: 90 + 2: 95 + 3: 100 + 4: 110 + 5: 115 reference: Art. 1 G. v. 11.07.1985 BGBl I S. 1318. note: >- - Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. + Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" + angenommen. 1990-01-01: 1: 1965: - 1: 146 - 2: 156 - 3: 164 - 4: 174 - 5: 184 - 6: 194 + 1: 285 + 2: 305 + 3: 320 + 4: 340 + 5: 360 + 6: 380 1971: - 1: 161 - 2: 174 - 3: 184 - 4: 194 - 5: 207 - 6: 220 + 1: 315 + 2: 340 + 3: 360 + 4: 380 + 5: 405 + 6: 430 1977: - 1: 171 - 2: 182 - 3: 194 - 4: 205 - 5: 217 - 6: 230 + 1: 335 + 2: 355 + 3: 380 + 4: 400 + 5: 425 + 6: 450 2100: - 1: 184 - 2: 194 - 3: 207 - 4: 220 - 5: 233 - 6: 245 + 1: 360 + 2: 380 + 3: 405 + 4: 430 + 5: 455 + 6: 480 2: 1965: - 1: 187 - 2: 199 - 3: 212 - 4: 225 - 5: 238 - 6: 251 + 1: 365 + 2: 390 + 3: 415 + 4: 440 + 5: 465 + 6: 490 1971: - 1: 210 - 2: 222 - 3: 238 - 4: 251 - 5: 266 - 6: 281 + 1: 410 + 2: 435 + 3: 465 + 4: 490 + 5: 520 + 6: 550 1977: - 1: 220 - 2: 235 - 3: 251 - 4: 266 - 5: 281 - 6: 297 + 1: 430 + 2: 460 + 3: 490 + 4: 520 + 5: 550 + 6: 580 2100: - 1: 235 - 2: 253 - 3: 268 - 4: 284 - 5: 302 - 6: 320 + 1: 460 + 2: 495 + 3: 525 + 4: 555 + 5: 590 + 6: 625 3: 1965: - 1: 222 - 2: 238 - 3: 253 - 4: 268 - 5: 284 - 6: 299 + 1: 435 + 2: 465 + 3: 495 + 4: 525 + 5: 555 + 6: 585 1971: - 1: 251 - 2: 266 - 3: 284 - 4: 299 - 5: 317 - 6: 335 + 1: 490 + 2: 520 + 3: 555 + 4: 585 + 5: 620 + 6: 655 1977: - 1: 263 - 2: 281 - 3: 299 - 4: 317 - 5: 335 - 6: 353 + 1: 515 + 2: 550 + 3: 585 + 4: 620 + 5: 655 + 6: 690 2100: - 1: 281 - 2: 302 - 3: 320 - 4: 340 - 5: 358 - 6: 376 + 1: 550 + 2: 590 + 3: 625 + 4: 665 + 5: 700 + 6: 735 4: 1965: - 1: 261 - 2: 279 - 3: 294 - 4: 312 - 5: 330 - 6: 348 + 1: 510 + 2: 545 + 3: 575 + 4: 610 + 5: 645 + 6: 680 1971: - 1: 289 - 2: 309 - 3: 330 - 4: 350 - 5: 368 - 6: 386 + 1: 565 + 2: 605 + 3: 645 + 4: 685 + 5: 720 + 6: 755 1977: - 1: 307 - 2: 327 - 3: 348 - 4: 368 - 5: 389 - 6: 409 + 1: 600 + 2: 640 + 3: 680 + 4: 720 + 5: 760 + 6: 800 2100: - 1: 327 - 2: 350 - 3: 373 - 4: 396 - 5: 417 - 6: 437 + 1: 640 + 2: 685 + 3: 730 + 4: 775 + 5: 815 + 6: 855 5: 1965: - 1: 297 - 2: 317 - 3: 337 - 4: 355 - 5: 376 - 6: 396 + 1: 580 + 2: 620 + 3: 660 + 4: 695 + 5: 735 + 6: 775 1971: - 1: 330 - 2: 353 - 3: 376 - 4: 399 - 5: 419 - 6: 440 + 1: 645 + 2: 690 + 3: 735 + 4: 780 + 5: 820 + 6: 860 1977: - 1: 348 - 2: 373 - 3: 396 - 4: 419 - 5: 442 - 6: 465 + 1: 680 + 2: 730 + 3: 775 + 4: 820 + 5: 865 + 6: 910 2100: - 1: 373 - 2: 399 - 3: 424 - 4: 450 - 5: 476 - 6: 501 + 1: 730 + 2: 780 + 3: 830 + 4: 880 + 5: 930 + 6: 980 jede_weitere_person: 1965: - 1: 36 - 2: 38 - 3: 41 - 4: 43 - 5: 46 - 6: 49 + 1: 70 + 2: 75 + 3: 80 + 4: 85 + 5: 90 + 6: 95 1971: - 1: 41 - 2: 43 - 3: 46 - 4: 49 - 5: 51 - 6: 54 + 1: 80 + 2: 85 + 3: 90 + 4: 95 + 5: 100 + 6: 105 1977: - 1: 43 - 2: 46 - 3: 49 - 4: 51 - 5: 54 - 6: 56 + 1: 85 + 2: 90 + 3: 95 + 4: 100 + 5: 105 + 6: 110 2100: - 1: 46 - 2: 49 - 3: 51 - 4: 56 - 5: 59 - 6: 61 + 1: 90 + 2: 95 + 3: 100 + 4: 110 + 5: 115 + 6: 120 reference: Art. 1 G. v. 13.12.1989 BGBl I S. 2148. note: >- - Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. + Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" + angenommen. 1990-10-01: 1: 1965: - 1: 159 - 2: 171 - 3: 182 - 4: 194 - 5: 210 - 6: 225 + 1: 310 + 2: 335 + 3: 355 + 4: 380 + 5: 410 + 6: 440 1977: - 1: 182 - 2: 194 - 3: 207 - 4: 222 - 5: 240 - 6: 256 + 1: 355 + 2: 380 + 3: 405 + 4: 435 + 5: 470 + 6: 500 2100: - 1: 194 - 2: 207 - 3: 220 - 4: 238 - 5: 256 - 6: 274 + 1: 380 + 2: 405 + 3: 430 + 4: 465 + 5: 500 + 6: 535 2: 1965: - 1: 205 - 2: 220 - 3: 233 - 4: 253 - 5: 271 - 6: 289 + 1: 400 + 2: 430 + 3: 455 + 4: 495 + 5: 530 + 6: 565 1977: - 1: 235 - 2: 251 - 3: 268 - 4: 289 - 5: 309 - 6: 332 + 1: 460 + 2: 490 + 3: 525 + 4: 565 + 5: 605 + 6: 650 2100: - 1: 251 - 2: 268 - 3: 284 - 4: 307 - 5: 330 - 6: 353 + 1: 490 + 2: 525 + 3: 555 + 4: 600 + 5: 645 + 6: 690 3: 1965: - 1: 245 - 2: 263 - 3: 279 - 4: 302 - 5: 325 - 6: 345 + 1: 480 + 2: 515 + 3: 545 + 4: 590 + 5: 635 + 6: 675 1977: - 1: 281 - 2: 299 - 3: 320 - 4: 345 - 5: 371 - 6: 396 + 1: 550 + 2: 585 + 3: 625 + 4: 675 + 5: 725 + 6: 775 2100: - 1: 299 - 2: 320 - 3: 340 - 4: 366 - 5: 394 - 6: 422 + 1: 585 + 2: 625 + 3: 665 + 4: 715 + 5: 770 + 6: 825 4: 1965: - 1: 286 - 2: 304 - 3: 325 - 4: 350 - 5: 376 - 6: 401 + 1: 560 + 2: 595 + 3: 635 + 4: 685 + 5: 735 + 6: 785 1977: - 1: 327 - 2: 348 - 3: 371 - 4: 401 - 5: 429 - 6: 460 + 1: 640 + 2: 680 + 3: 725 + 4: 785 + 5: 840 + 6: 900 2100: - 1: 348 - 2: 371 - 3: 394 - 4: 427 - 5: 458 - 6: 488 + 1: 680 + 2: 725 + 3: 770 + 4: 835 + 5: 895 + 6: 955 5: 1965: - 1: 325 - 2: 348 - 3: 371 - 4: 399 - 5: 429 - 6: 458 + 1: 635 + 2: 680 + 3: 725 + 4: 780 + 5: 840 + 6: 895 1977: - 1: 373 - 2: 396 - 3: 422 - 4: 458 - 5: 491 - 6: 524 + 1: 730 + 2: 775 + 3: 825 + 4: 895 + 5: 960 + 6: 1025 2100: - 1: 396 - 2: 422 - 3: 450 - 4: 486 - 5: 522 - 6: 557 + 1: 775 + 2: 825 + 3: 880 + 4: 950 + 5: 1020 + 6: 1090 jede_weitere_person: 1965: - 1: 41 - 2: 43 - 3: 46 - 4: 49 - 5: 54 - 6: 56 + 1: 80 + 2: 85 + 3: 90 + 4: 95 + 5: 105 + 6: 110 1977: - 1: 46 - 2: 51 - 3: 54 - 4: 56 - 5: 61 - 6: 64 + 1: 90 + 2: 100 + 3: 105 + 4: 110 + 5: 120 + 6: 125 2100: - 1: 49 - 2: 51 - 3: 54 - 4: 56 - 5: 61 - 6: 64 + 1: 95 + 2: 105 + 3: 110 + 4: 120 + 5: 125 + 6: 135 reference: Art. 1 G. v. 10.08.1990 BGBl I S. 1522. note: >- - Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. + Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" + angenommen. 1993-01-01: 1: 1965: - 1: 159 - 2: 171 - 3: 182 - 4: 194 - 5: 210 - 6: 225 + 1: 310 + 2: 335 + 3: 355 + 4: 380 + 5: 410 + 6: 440 1977: - 1: 182 - 2: 194 - 3: 207 - 4: 222 - 5: 240 - 6: 256 + 1: 355 + 2: 380 + 3: 405 + 4: 435 + 5: 470 + 6: 500 1991: - 1: 194 - 2: 207 - 3: 220 - 4: 238 - 5: 256 - 6: 274 + 1: 380 + 2: 405 + 3: 430 + 4: 465 + 5: 500 + 6: 535 2100: - 1: 228 - 2: 243 - 3: 258 - 4: 279 - 5: 299 - 6: 320 + 1: 445 + 2: 475 + 3: 505 + 4: 545 + 5: 585 + 6: 625 2: 1965: - 1: 205 - 2: 220 - 3: 233 - 4: 253 - 5: 271 - 6: 289 + 1: 400 + 2: 430 + 3: 455 + 4: 495 + 5: 530 + 6: 565 1977: - 1: 235 - 2: 251 - 3: 268 - 4: 289 - 5: 309 - 6: 332 + 1: 460 + 2: 490 + 3: 525 + 4: 565 + 5: 605 + 6: 650 1991: - 1: 251 - 2: 268 - 3: 284 - 4: 307 - 5: 330 - 6: 353 + 1: 490 + 2: 525 + 3: 555 + 4: 600 + 5: 645 + 6: 690 2100: - 1: 294 - 2: 314 - 3: 335 - 4: 360 - 5: 389 - 6: 414 + 1: 575 + 2: 615 + 3: 655 + 4: 705 + 5: 760 + 6: 810 3: 1965: - 1: 245 - 2: 263 - 3: 279 - 4: 302 - 5: 325 - 6: 345 + 1: 480 + 2: 515 + 3: 545 + 4: 590 + 5: 635 + 6: 675 1977: - 1: 281 - 2: 299 - 3: 320 - 4: 345 - 5: 371 - 6: 396 + 1: 550 + 2: 585 + 3: 625 + 4: 675 + 5: 725 + 6: 775 1991: - 1: 299 - 2: 320 - 3: 340 - 4: 366 - 5: 394 - 6: 422 + 1: 585 + 2: 625 + 3: 665 + 4: 715 + 5: 770 + 6: 825 2100: - 1: 353 - 2: 378 - 3: 401 - 4: 435 - 5: 465 - 6: 496 + 1: 690 + 2: 740 + 3: 785 + 4: 850 + 5: 910 + 6: 970 4: 1965: - 1: 286 - 2: 304 - 3: 325 - 4: 350 - 5: 376 - 6: 401 + 1: 560 + 2: 595 + 3: 635 + 4: 685 + 5: 735 + 6: 785 1977: - 1: 327 - 2: 348 - 3: 371 - 4: 401 - 5: 429 - 6: 460 + 1: 640 + 2: 680 + 3: 725 + 4: 785 + 5: 840 + 6: 900 1991: - 1: 348 - 2: 371 - 3: 394 - 4: 427 - 5: 458 - 6: 488 + 1: 680 + 2: 725 + 3: 770 + 4: 835 + 5: 895 + 6: 955 2100: - 1: 409 - 2: 437 - 3: 465 - 4: 504 - 5: 539 - 6: 437 + 1: 800 + 2: 855 + 3: 910 + 4: 985 + 5: 1055 + 6: 1130 5: 1965: - 1: 325 - 2: 348 - 3: 371 - 4: 399 - 5: 429 - 6: 458 + 1: 635 + 2: 680 + 3: 725 + 4: 780 + 5: 840 + 6: 895 1977: - 1: 373 - 2: 396 - 3: 422 - 4: 458 - 5: 491 - 6: 524 + 1: 730 + 2: 775 + 3: 825 + 4: 895 + 5: 960 + 6: 1025 1991: - 1: 396 - 2: 422 - 3: 450 - 4: 486 - 5: 522 - 6: 557 + 1: 775 + 2: 825 + 3: 880 + 4: 950 + 5: 1020 + 6: 1090 2100: - 1: 465 - 2: 499 - 3: 529 - 4: 573 - 5: 614 - 6: 657 + 1: 910 + 2: 975 + 3: 1035 + 4: 1120 + 5: 1200 + 6: 1285 jede_weitere_person: 1965: - 1: 41 - 2: 43 - 3: 46 - 4: 49 - 5: 54 - 6: 56 + 1: 80 + 2: 85 + 3: 90 + 4: 95 + 5: 105 + 6: 110 1977: - 1: 46 - 2: 51 - 3: 54 - 4: 56 - 5: 61 - 6: 64 + 1: 90 + 2: 100 + 3: 105 + 4: 110 + 5: 120 + 6: 125 1991: - 1: 49 - 2: 54 - 3: 56 - 4: 61 - 5: 64 - 6: 69 + 1: 95 + 2: 105 + 3: 110 + 4: 120 + 5: 125 + 6: 135 2100: - 1: 56 - 2: 61 - 3: 64 - 4: 69 - 5: 74 - 6: 79 + 1: 110 + 2: 120 + 3: 125 + 4: 135 + 5: 145 + 6: 155 reference: Neufassung WoGG v. 11.02.1993 BGBl I S. 183. note: >- - Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. + Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" + angenommen. 2001-01-01: + 1: + 1965: + 1: 391.17 + 2: 410.72 + 3: 440.06 + 4: 479.18 + 5: 508.52 + 6: 547.63 + 1991: + 1: 420.50 + 2: 449.84 + 3: 479.18 + 4: 518.29 + 5: 557.41 + 6: 596.53 + 2100: + 1: 518.29 + 2: 547.63 + 3: 586.75 + 4: 635.64 + 5: 684.54 + 6: 723.66 + 2: + 1965: + 1: 518.29 + 2: 557.41 + 3: 586.75 + 4: 635.64 + 5: 684.54 + 6: 733.44 + 1991: + 1: 567.19 + 2: 606.31 + 3: 645.42 + 4: 694.32 + 5: 743.22 + 6: 792.11 + 2100: + 1: 625.87 + 2: 674.76 + 3: 713.88 + 4: 772.55 + 5: 831.23 + 6: 889.90 + 3: + 1965: + 1: 625.87 + 2: 664.98 + 3: 704.10 + 4: 762.77 + 5: 821.45 + 6: 870.34 + 1991: + 1: 674.76 + 2: 713.88 + 3: 762.77 + 4: 821.45 + 5: 889.90 + 6: 948.58 + 2100: + 1: 752.99 + 2: 801.89 + 3: 850.79 + 4: 919.24 + 5: 987.69 + 6: 1056.15 + 4: + 1965: + 1: 723.66 + 2: 772.55 + 3: 821.45 + 4: 889.90 + 5: 948.58 + 6: 1017.03 + 1991: + 1: 782.33 + 2: 831.23 + 3: 889.90 + 4: 958.36 + 5: 1026.81 + 6: 1105.04 + 2100: + 1: 870.34 + 2: 929.02 + 3: 987.69 + 4: 1065.93 + 5: 1153.94 + 6: 1232.17 + 5: + 1965: + 1: 821.45 + 2: 880.12 + 3: 938.80 + 4: 1007.25 + 5: 1085.49 + 6: 1163.72 + 1991: + 1: 889.90 + 2: 948.58 + 3: 1017.03 + 4: 1095.26 + 5: 1173.50 + 6: 1251.73 + 2100: + 1: 997.47 + 2: 1065.93 + 3: 1134.38 + 4: 1222.39 + 5: 1310.41 + 6: 1398.42 + jede_weitere_person: + 1965: + 1: 97.79 + 2: 107.57 + 3: 117.35 + 4: 127.13 + 5: 136.91 + 6: 146.69 + 1991: + 1: 107.57 + 2: 117.35 + 3: 127.13 + 4: 136.91 + 5: 146.69 + 6: 156.47 + 2100: + 1: 117.35 + 2: 127.13 + 3: 136.91 + 4: 146.69 + 5: 156.47 + 6: 176.02 + reference: Art. 5 G. v. 22.12.1999, BGBl I S. 2671. + 2002-01-01: + unit: EUR_PER_MONTH_PER_WTHH 1: 1965: 1: 200 @@ -913,7 +1057,7 @@ raw_max_miete_m_nach_baujahr: 6: 455 3: 1965: - 1: 322 + 1: 320 2: 340 3: 360 4: 390 @@ -939,7 +1083,7 @@ raw_max_miete_m_nach_baujahr: 2: 395 3: 420 4: 455 - 5: 585 + 5: 485 6: 520 1991: 1: 400 @@ -999,8 +1143,7 @@ raw_max_miete_m_nach_baujahr: 4: 75 5: 80 6: 90 - reference: Art. 5 G. v. 22.12.1999, BGBl I S. 2671. - note: Nimmt die Umrechnung in Euro von 2002 vorweg. + reference: Art. 6 G. v. 22.12.1999, BGBl I S. 2671. 2009-01-01: note: Keine Differenzierung nach Baujahr, siehe `raw_max_miete_m`. raw_max_miete_m: @@ -1014,8 +1157,8 @@ raw_max_miete_m: - Anzahl Personen - Mietstufe en: null - unit: Euros - reference_period: Month + input_unit: DIMENSIONLESS + output_unit: EUR_PER_MONTH type: require_converter 2009-01-01: 1: @@ -1266,8 +1409,8 @@ raw_heizkostenentlastung_m: en: >- Amount of relief in heating costs due to CO2 pricing in Euro depending on household size - unit: Euros - reference_period: Month + input_unit: DIMENSIONLESS + output_unit: EUR_PER_MONTH_PER_WTHH type: require_converter 2021-01-01: reference: §12 (6) WoGG, Art. 1 G. v. 15.05.2020, BGBl I S. 1015. @@ -1288,8 +1431,8 @@ raw_dauerhafte_heizkostenkomponente_m: en: >- Permanent heating cost component depending on household size introduced with the housing subsidy reform 2023 - unit: Euros - reference_period: Month + input_unit: DIMENSIONLESS + output_unit: EUR_PER_MONTH_PER_WTHH type: require_converter 2023-01-01: reference: Art. 1 G. v. 08.12.2022 BGBl. I Nr. 48 S. 2160 @@ -1312,8 +1455,8 @@ raw_klimakomponente_m: Surcharge to be taken into account as climate component in addition to the maximum amounts pursuant to § 12 (1) in Euro depending on the size of the household; introduced with the housing subsidy reform 2023 - unit: Euros - reference_period: Month + input_unit: DIMENSIONLESS + output_unit: EUR_PER_MONTH_PER_WTHH type: require_converter 2023-01-01: reference: Art. 1 G. v. 08.12.2022 BGBl. I Nr. 48 S. 2160 diff --git a/src/gettsim/germany/wohngeld/voraussetzungen.py b/src/gettsim/germany/wohngeld/voraussetzungen.py index 1fe316ad55..180ac599f0 100644 --- a/src/gettsim/germany/wohngeld/voraussetzungen.py +++ b/src/gettsim/germany/wohngeld/voraussetzungen.py @@ -2,13 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( start_date="2005-01-01", end_date="2008-12-31", leaf_name="grundsätzlich_anspruchsberechtigt_wthh", + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_wthh_ohne_vermögensprüfung( mindesteinkommen_erreicht_wthh: bool, @@ -20,6 +21,7 @@ def grundsätzlich_anspruchsberechtigt_wthh_ohne_vermögensprüfung( @policy_function( start_date="2009-01-01", leaf_name="grundsätzlich_anspruchsberechtigt_wthh", + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_wthh_mit_vermögensprüfung( mindesteinkommen_erreicht_wthh: bool, @@ -29,7 +31,7 @@ def grundsätzlich_anspruchsberechtigt_wthh_mit_vermögensprüfung( return mindesteinkommen_erreicht_wthh and vermögensgrenze_unterschritten_wthh -@policy_function(start_date="2009-01-01") +@policy_function(start_date="2009-01-01", unit=TTSIMUnit.DIMENSIONLESS.PER_WTHH) def vermögensgrenze_unterschritten_wthh( vermögen_wthh: float, anzahl_personen_wthh: int, @@ -47,6 +49,7 @@ def vermögensgrenze_unterschritten_wthh( leaf_name="mindesteinkommen_erreicht_wthh", start_date="2005-01-01", end_date="2022-12-31", + unit=TTSIMUnit.DIMENSIONLESS.PER_WTHH, ) def mindesteinkommen_erreicht_wthh_bis_2022( arbeitslosengeld_2__regelbedarf_m_wthh: float, @@ -69,7 +72,11 @@ def mindesteinkommen_erreicht_wthh_bis_2022( ) -@policy_function(leaf_name="mindesteinkommen_erreicht_wthh", start_date="2023-01-01") +@policy_function( + leaf_name="mindesteinkommen_erreicht_wthh", + start_date="2023-01-01", + unit=TTSIMUnit.DIMENSIONLESS.PER_WTHH, +) def mindesteinkommen_erreicht_wthh_ab_2023( bürgergeld__regelbedarf_m_wthh: float, einkommen_für_mindesteinkommen_m_wthh: float, @@ -93,6 +100,7 @@ def mindesteinkommen_erreicht_wthh_ab_2023( leaf_name="einkommen_für_mindesteinkommen_m_wthh", start_date="2005-01-01", end_date="2022-12-31", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, ) def einkommen_für_mindesteinkommen_m_wthh_bis_2022( arbeitslosengeld_2__nettoeinkommen_vor_abzug_freibetrag_m_wthh: float, @@ -123,7 +131,9 @@ def einkommen_für_mindesteinkommen_m_wthh_bis_2022( @policy_function( - leaf_name="einkommen_für_mindesteinkommen_m_wthh", start_date="2023-01-01" + leaf_name="einkommen_für_mindesteinkommen_m_wthh", + start_date="2023-01-01", + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, ) def einkommen_für_mindesteinkommen_m_wthh_ab_2023( bürgergeld__nettoeinkommen_vor_abzug_freibetrag_m_wthh: float, diff --git a/src/gettsim/germany/wohngeld/voraussetzungen.yaml b/src/gettsim/germany/wohngeld/voraussetzungen.yaml index b6713f609f..43918a3735 100644 --- a/src/gettsim/germany/wohngeld/voraussetzungen.yaml +++ b/src/gettsim/germany/wohngeld/voraussetzungen.yaml @@ -10,8 +10,7 @@ parameter_vermögensfreibetrag: Wohngeld sein kann. Die genauen Werte regelt die Verwaltungsvorschrift vom April 2009. Vorher war hohes Vermögen laut WoGG kein Ausschlussgrund. en: Since 2009, wealth might be a reason not to grand housing benefit. - unit: Euros - reference_period: null + unit: EUR type: dict 2009-01-01: grundfreibetrag: 60000 diff --git a/src/gettsim/germany/wohngeld/wohngeld.py b/src/gettsim/germany/wohngeld/wohngeld.py index c752533b4a..a1a00b781f 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.py +++ b/src/gettsim/germany/wohngeld/wohngeld.py @@ -10,8 +10,10 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, AggType, RoundingSpec, + TTSIMUnit, agg_by_group_function, get_consecutive_int_lookup_table_param_value, param_function, @@ -24,12 +26,12 @@ from gettsim.tt import ConsecutiveIntLookupTableParamValue -@agg_by_group_function(agg_type=AggType.COUNT) +@agg_by_group_function(agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_WTHH) def anzahl_personen_wthh(wthh_id: int) -> int: pass -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def betrag_m_wthh( anspruchshöhe_m_wthh: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -41,7 +43,7 @@ def betrag_m_wthh( return 0.0 -@policy_function() +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def anspruchshöhe_m_wthh( basisbetrag_m_wthh: float, grundsätzlich_anspruchsberechtigt_wthh: bool, @@ -57,10 +59,12 @@ def anspruchshöhe_m_wthh( leaf_name="basisbetrag_m_wthh", end_date="2000-12-31", rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_MONTH.PER_WTHH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, ) def basisbetrag_m_wthh_bis_2000( anzahl_personen_wthh: int, @@ -87,13 +91,54 @@ def basisbetrag_m_wthh_bis_2000( @policy_function( leaf_name="basisbetrag_m_wthh", start_date="2001-01-01", + end_date="2001-12-31", rounding_spec=RoundingSpec( + unit=TTSIMUnit.DM.PER_MONTH.PER_WTHH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, ) -def basisbetrag_m_wthh_ab_2001( +def basisbetrag_m_wthh_2001( + anzahl_personen_wthh: int, + einkommen_m_wthh: float, + miete_m_wthh: float, + basisformel_params: BasisformelParamValuesMitZusatzbetragNachHaushaltsgröße, + xnp: ModuleType, +) -> float: + """Housing benefit from the basis formula.""" + a = basisformel_params.a.look_up(anzahl_personen_wthh) + b = basisformel_params.b.look_up(anzahl_personen_wthh) + c = basisformel_params.c.look_up(anzahl_personen_wthh) + zusatzbetrag_nach_haushaltsgröße = ( + basisformel_params.zusatzbetrag_nach_haushaltsgröße.look_up( + anzahl_personen_wthh + ) + ) + anspruch_laut_abc_formel = zusatzbetrag_nach_haushaltsgröße + xnp.maximum( + 0.0, + basisformel_params.skalierungsfaktor + * ( + miete_m_wthh + - ((a + (b * miete_m_wthh) + (c * einkommen_m_wthh)) * einkommen_m_wthh) + ), + ) + return xnp.minimum(miete_m_wthh, anspruch_laut_abc_formel) + + +@policy_function( + leaf_name="basisbetrag_m_wthh", + start_date="2002-01-01", + rounding_spec=RoundingSpec( + unit=TTSIMUnit.EUR.PER_MONTH.PER_WTHH, + base=1, + direction="nearest", + reference="§ 19 WoGG Abs.2 Anlage 3", + ), + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, +) +def basisbetrag_m_wthh_ab_2002( anzahl_personen_wthh: int, einkommen_m_wthh: float, miete_m_wthh: float, @@ -128,7 +173,7 @@ class BasisformelParamValues: c: ConsecutiveIntLookupTableParamValue -@param_function(end_date="2000-12-31", leaf_name="basisformel_params") +@param_function(end_date="2000-12-31", leaf_name="basisformel_params", unit=UNSET_UNIT) def basisformel_params_bis_2000( skalierungsfaktor: float, koeffizienten_berechnungsformel: dict[int, dict[str, float]], @@ -138,9 +183,9 @@ def basisformel_params_bis_2000( """Convert the parameters of the Wohngeld basis formula to a format that can be used by Numpy and Jax. - Note: Not entirely sure that 'zusatzbetrag_pro_person_in_großen_haushalten' was not - part of the pre-2001 parameters. At least it wasn't part of the 1993 novella, see - BGBl I 1993 S. 183. + Note: Not entirely sure that 'zusatzbetrag_pro_person_in_großen_haushalten_m' was + not part of the pre-2001 parameters. At least it wasn't part of the 1993 novella, + see BGBl I 1993 S. 183. """ a = {i: v["a"] for i, v in koeffizienten_berechnungsformel.items()} b = {i: v["b"] for i, v in koeffizienten_berechnungsformel.items()} @@ -168,12 +213,14 @@ class BasisformelParamValuesMitZusatzbetragNachHaushaltsgröße(BasisformelParam zusatzbetrag_nach_haushaltsgröße: ConsecutiveIntLookupTableParamValue -@param_function(start_date="2001-01-01", leaf_name="basisformel_params") +@param_function( + start_date="2001-01-01", leaf_name="basisformel_params", unit=UNSET_UNIT +) def basisformel_params_ab_2001( skalierungsfaktor: float, koeffizienten_berechnungsformel: dict[int, dict[str, float]], max_anzahl_personen: dict[str, int], - zusatzbetrag_pro_person_in_großen_haushalten: float, + zusatzbetrag_pro_person_in_großen_haushalten_m: float, xnp: ModuleType, ) -> BasisformelParamValuesMitZusatzbetragNachHaushaltsgröße: """Convert the parameters of the Wohngeld basis formula to a format that can be @@ -196,7 +243,7 @@ def basisformel_params_ab_2001( for koeff in [a, b, c]: koeff[i] = koeff[max_normal] zusatzbetrag_nach_haushaltsgröße[i] = float( - (i - max_normal) * zusatzbetrag_pro_person_in_großen_haushalten + (i - max_normal) * zusatzbetrag_pro_person_in_großen_haushalten_m ) return BasisformelParamValuesMitZusatzbetragNachHaushaltsgröße( diff --git a/src/gettsim/germany/wohngeld/wohngeld.yaml b/src/gettsim/germany/wohngeld/wohngeld.yaml index efcd453676..e24c79ea94 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.yaml +++ b/src/gettsim/germany/wohngeld/wohngeld.yaml @@ -18,8 +18,7 @@ max_anzahl_personen: calculation of the housing allowance. - `indizierung` is not a policy parameter, but determines the size of the lookup tables. - unit: null - reference_period: null + unit: PERSON_COUNT_PER_HH type: dict 1984-01-01: normale_berechnung: 12 @@ -31,8 +30,7 @@ skalierungsfaktor: description: de: Anlage 2 WoGG zu §19 Abs. 2 WoGG en: null - unit: null - reference_period: null + unit: DIMENSIONLESS type: scalar 1984-01-01: value: 1 @@ -52,8 +50,7 @@ koeffizienten_berechnungsformel: Wohngeldverordnung (WoGV). Die Schlüssel von 1 to 12 beziehen sich auf die Haushaltsgröße. en: The keys from 1 to 12 below refer to the household size. - unit: null - reference_period: null + unit: DIMENSIONLESS type: require_converter 1984-01-01: note: Parameter aus Regressionsanalyse der Wohngeldtabellen @@ -550,7 +547,7 @@ koeffizienten_berechnungsformel: 12: b: 1.107E-4 c: 2.210E-5 -zusatzbetrag_pro_person_in_großen_haushalten: +zusatzbetrag_pro_person_in_großen_haushalten_m: name: de: Zusätzlicher Betrag pro Person in sehr großen Haushalten en: Additional amount per member in very big households @@ -569,12 +566,15 @@ zusatzbetrag_pro_person_in_großen_haushalten: The introduction date of the parameter is not entirely clear. It is contained in the re-enactment of the WoGG 2002, but not in the 1993 Novelle, see BGBl I 1993 S. 183. - unit: Euros - reference_period: Month type: scalar 2001-01-01: - value: 40 + unit: DM_PER_MONTH + value: 78.23 reference: Art. 5 G. v. 22.12.1999 BGBl. I S. 2671 + 2002-01-01: + unit: EUR_PER_MONTH + value: 40 + reference: Art. 6 G. v. 22.12.1999 BGBl. I S. 2671 2009-01-01: value: 43 reference: Art. 1 G. v. 24.09 2008 BGBl. I S. 1856 diff --git a/src/gettsim/plot/dag/__init__.py b/src/gettsim/plot/dag/__init__.py index 5311e9d465..c38075553d 100644 --- a/src/gettsim/plot/dag/__init__.py +++ b/src/gettsim/plot/dag/__init__.py @@ -9,6 +9,7 @@ # Hoisted at runtime: beartype must resolve these on `@beartype`-decorated # `gettsim.plot.dag.*` boundaries that this module exposes. +from ttsim.tt import UnitSystem from ttsim.typing import DashedISOString, PolicyEnvironment, QNameData from gettsim import germany @@ -107,6 +108,7 @@ def tt( # Elements of main policy_date_str: DashedISOString | None = None, orig_policy_objects: OrigPolicyObjects | None = None, + unit_system: UnitSystem | None = None, input_data: InputData | None = None, processed_data: QNameData | None = None, labels: Labels | None = None, @@ -155,6 +157,8 @@ def tt( hierarchy. policy_date_str: The date for which to plot the DAG. orig_policy_objects: The orig policy objects. + unit_system: The policy system's currencies and grouping levels. Defaults + to Germany's. input_data: The input data. processed_data: The processed data. labels: The labels. @@ -171,6 +175,7 @@ def tt( """ return ttsim.plot.dag.tt( root=germany.ROOT_PATH, + unit_system=unit_system if unit_system is not None else germany.UNIT_SYSTEM, primary_nodes=primary_nodes, selection_type=selection_type, selection_depth=selection_depth, diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2009-01-01/hh_id_4.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2009-01-01/hh_id_4.yaml index 2b40227657..01dfb145c7 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2009-01-01/hh_id_4.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2009-01-01/hh_id_4.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 50000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 42000.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2012-01-01/hh_id_3.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2012-01-01/hh_id_3.yaml index 1f36a6410c..52055568f7 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2012-01-01/hh_id_3.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2012-01-01/hh_id_3.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 20000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 20000.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2015-01-01/hh_id_2.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2015-01-01/hh_id_2.yaml index 19292256ff..53799025d7 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2015-01-01/hh_id_2.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2015-01-01/hh_id_2.yaml @@ -11,7 +11,7 @@ inputs: - true - true - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 5000.0 - 5000.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/couple_1_child.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/couple_1_child.yaml index fcf928d1df..56737d086c 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/couple_1_child.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/couple_1_child.yaml @@ -11,7 +11,7 @@ inputs: - true - true - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 - 200000.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_1.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_1.yaml index 503c4a2e99..2d893c8da6 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_1.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_1.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 5000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 5000.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_5.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_5.yaml index da9f241e6b..b242389e2f 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_5.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2018-01-01/hh_id_5.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 180000.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2023-01-01/hh_id_6.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2023-01-01/hh_id_6.yaml index 7a5a801d80..7aa7e6242e 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2023-01-01/hh_id_6.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2023-01-01/hh_id_6.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 36000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 36000.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_1_child.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_1_child.yaml index 261fd8c785..fab5b91956 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_1_child.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_1_child.yaml @@ -11,7 +11,7 @@ inputs: - true - true - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 - 200000.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_above_soli_freibetrag.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_above_soli_freibetrag.yaml index fd493fe9d8..ab932f3e7c 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_above_soli_freibetrag.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/couple_above_soli_freibetrag.yaml @@ -10,7 +10,7 @@ inputs: gemeinsam_veranlagt: - true - true - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 - 200000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_above_soli_freibetrag.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_above_soli_freibetrag.yaml index 9b9202bbf3..f1c954c50a 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_above_soli_freibetrag.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_above_soli_freibetrag.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 100000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 100000.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_below_soli_freibetrag.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_below_soli_freibetrag.yaml index 96f79bd2eb..8246660b2c 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_below_soli_freibetrag.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/betrag/2024-01-01/single_below_soli_freibetrag.yaml @@ -9,7 +9,7 @@ inputs: einkommensteuer: gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 50000.0 zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: - 50000.0 diff --git "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2010-01-01/hh_id_4.yaml" "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2010-01-01/hh_id_4.yaml" index 434cffd310..30ab916cb3 100644 --- "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2010-01-01/hh_id_4.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2010-01-01/hh_id_4.yaml" @@ -28,7 +28,7 @@ inputs: - true - false - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 150000.0 - 150000.0 - 10.0 diff --git "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2012-01-01/hh_id_2.yaml" "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2012-01-01/hh_id_2.yaml" index b3822c146b..bf7c1ef4cf 100644 --- "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2012-01-01/hh_id_2.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2012-01-01/hh_id_2.yaml" @@ -16,7 +16,7 @@ inputs: - 5000.0 gemeinsam_veranlagt: - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 5000.0 relevantes_kindergeld_m: - 0.0 diff --git "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2016-01-01/hh_id_1.yaml" "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2016-01-01/hh_id_1.yaml" index b02f13ad9c..b5ed957790 100644 --- "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2016-01-01/hh_id_1.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/2016-01-01/hh_id_1.yaml" @@ -24,7 +24,7 @@ inputs: - true - true - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 10000.0 - 10000.0 - 0.0 diff --git "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/skip_2019/hh_id_5.yaml" "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/skip_2019/hh_id_5.yaml" index fac9617f15..032c28ecdc 100644 --- "a/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/skip_2019/hh_id_5.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/einkommensteuer/g\303\274nstigerpr\303\274fungen/skip_2019/hh_id_5.yaml" @@ -24,7 +24,7 @@ inputs: - true - true - false - gesamteinkommen_y: + gesamteinkommen_y_sn: - 120000.0 - 120000.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_1.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_1.yaml index f1206ea7e3..3842320d85 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_1.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_1.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 0 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_2.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_2.yaml index 40f1ad33f2..7df68491a3 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_2.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_2.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 6280 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 4328.0 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_3.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_3.yaml index 2cbee28696..63128ddf1c 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_3.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_3.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 9880 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 7916.2 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_4.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_4.yaml index 46a37a825e..3d379cf928 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_4.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_4.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 13480 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 11109.8 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_5.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_5.yaml index 637735c84e..5fef9e5abd 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_5.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2010-01-01/hh_id_5.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 17080 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 14489.98 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_16.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_16.yaml index dc8989ba42..5b3a2090f0 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_16.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_16.yaml @@ -99,7 +99,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 35000 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 29964.0 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_17.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_17.yaml index 1016ebff2f..d0425c4fbe 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_17.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2015-01-01/hh_id_17.yaml @@ -134,7 +134,7 @@ outputs: gesamtbetrag_der_einkünfte_y: - 35000 - 23000 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 50228.0 - 50228.0 kinderfreibetrag_y_sn: diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2017-01-01/hh_id_18.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2017-01-01/hh_id_18.yaml index 437f71a267..6bc1c3029a 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2017-01-01/hh_id_18.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2017-01-01/hh_id_18.yaml @@ -133,7 +133,7 @@ outputs: gesamtbetrag_der_einkünfte_y: - 35000 - 29000 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 53569.0 - 53569.0 kinderfreibetrag_y_sn: diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_10.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_10.yaml index e1e181db98..aee5116776 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_10.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_10.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 13400 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 10816.78 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_11.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_11.yaml index dc392f929e..bf366cd00f 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_11.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_11.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 17000 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 13858.72 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_12.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_12.yaml index 5322164774..06494b06cc 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_12.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_12.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 59000 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 53046.4 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_7.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_7.yaml index f783425526..28dc5de88b 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_7.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_7.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 0 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_8.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_8.yaml index 61c2bf4816..d6e734d1df 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_8.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_8.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 6200 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 5173.26 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_9.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_9.yaml index 9dc4d56a55..08d745b512 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_9.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2018-01-01/hh_id_9.yaml @@ -98,7 +98,7 @@ outputs: einkünfte: gesamtbetrag_der_einkünfte_y: - 9800 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 7853.59 kinderfreibetrag_y_sn: - 0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2019-01-01/hh_id_13.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2019-01-01/hh_id_13.yaml index 12d3eb4c32..3bc568f0b9 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2019-01-01/hh_id_13.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2019-01-01/hh_id_13.yaml @@ -133,7 +133,7 @@ outputs: gesamtbetrag_der_einkünfte_y: - 17000 - 0 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 11936.06 - 0.0 kinderfreibetrag_y_sn: diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_14.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_14.yaml index b1f8aac577..4e0489f683 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_14.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_14.yaml @@ -203,7 +203,7 @@ outputs: - 23000 - 0 - 0 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 53027.0 - 53027.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_19.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_19.yaml index 3464173656..e6294dc4db 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_19.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_19.yaml @@ -203,7 +203,7 @@ outputs: - 23000 - 0 - 0 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 52099.0 - 52099.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_20.yaml b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_20.yaml index 150d5423bd..f9b8619574 100644 --- a/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_20.yaml +++ b/src/gettsim/tests_germany/policy_cases/einkommensteuer/zu_versteuerndes_einkommen/2020-01-01/hh_id_20.yaml @@ -203,7 +203,7 @@ outputs: - 23000 - 0 - 0 - gesamteinkommen_y: + gesamteinkommen_y_sn: - 52599.0 - 52599.0 - 0.0 diff --git "a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/gemischte_bg_\303\274berschuss_sgb_ii.yaml" "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/gemischte_bg_\303\274berschuss_sgb_ii.yaml" index abe20a29a3..3d2a9e1191 100644 --- "a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/gemischte_bg_\303\274berschuss_sgb_ii.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/gemischte_bg_\303\274berschuss_sgb_ii.yaml" @@ -4,16 +4,15 @@ info: Gemischte Bedarfsgemeinschaft where the SGB II partner's income creates a surplus. Person0 (age 55, erwerbsfähig) earns 1100€/month from employment. After Freibeträge, her anzurechnendes Einkommen exceeds her ungedeckter Bedarf. The surplus flows to - Person1's Grundsicherung im Alter calculation via bürgergeld__überschusseinkommen_m. - Regelsatz (RBS 2): 451. KdU: (500+100)/2 = 300. Regelbedarf: 751 each. - SGB II (Person0): bruttolohn 1100, anrechnungsfrei 338, anzurechnendes 762. - ungedeckter_bedarf = 751, einkommen_zur_verteilung = 762. - überschusseinkommen = max(0, 762 - 751) = 11 per person, _eg = 22. - GSiA surplus = 0 → anspruch_bg = max(0, 751 - 762) = 0 → betrag P0 = 0. - SGB XII (Person1): gesetzliche Rente 400 – Grundrentenfreibetrag 190 - → einkommen = 210. bedarf = 751, individueller_restbedarf = 541. - total_income_eg = 210 + 22 (Bürgergeld surplus) = 232. - anspruch_eg = max(0, 751 - 232) = 519 → GSiA betrag P1 = 519. + Person1's Grundsicherung im Alter calculation via + bürgergeld__überschusseinkommen_m_bg. Regelsatz (RBS 2): 451. KdU: (500+100)/2 = + 300. Regelbedarf: 751 each. SGB II (Person0): bruttolohn 1100, anrechnungsfrei 338, + anzurechnendes 762. ungedeckter_bedarf = 751, einkommen_zur_verteilung = 762. + überschusseinkommen = max(0, 762 - 751) = 11 per person, _eg = 22. GSiA surplus = 0 + → anspruch_bg = max(0, 751 - 762) = 0 → betrag P0 = 0. SGB XII (Person1): + gesetzliche Rente 400 – Grundrentenfreibetrag 190 → einkommen = 210. bedarf = 751, + individueller_restbedarf = 541. total_income_eg = 210 + 22 (Bürgergeld surplus) = + 232. anspruch_eg = max(0, 751 - 232) = 519 → GSiA betrag P1 = 519. precision_atol: 0.01 source: Regression test. inputs: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2002-01-01/hh_id_2.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2002-01-01/hh_id_2.yaml index 98990f2bf7..5e6f1a90b4 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2002-01-01/hh_id_2.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2002-01-01/hh_id_2.yaml @@ -21,7 +21,7 @@ inputs: - 2.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 3000.0 - 3000.0 - 3000.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_4.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_4.yaml index 47a3716d80..e784739b7f 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_4.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_4.yaml @@ -11,7 +11,7 @@ inputs: arbeitsstunden_w: - 10.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 einnahmen: bruttolohn_m: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_6.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_6.yaml index 9df2e3482b..8bb3df0d43 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_6.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2010-01-01/hh_id_6.yaml @@ -11,7 +11,7 @@ inputs: arbeitsstunden_w: - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 einnahmen: bruttolohn_m: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2011-01-01/hh_id_7.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2011-01-01/hh_id_7.yaml index 425abb9455..793ef7f762 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2011-01-01/hh_id_7.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2011-01-01/hh_id_7.yaml @@ -23,7 +23,7 @@ inputs: - 0.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2013-01-01/hh_id_8.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2013-01-01/hh_id_8.yaml index 2a15630e95..4ac94cb538 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2013-01-01/hh_id_8.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2013-01-01/hh_id_8.yaml @@ -19,7 +19,7 @@ inputs: - 25.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 - 200000.0 - 200000.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_0.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_0.yaml index 298d88e8f7..ac984ec2ed 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_0.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_0.yaml @@ -19,7 +19,7 @@ inputs: - 10.0 - 30.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 3000.0 - 3000.0 - 3000.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_1.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_1.yaml index f57e39ce89..ce4ec6d6ae 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_1.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_1.yaml @@ -21,7 +21,7 @@ inputs: - 2.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 3000.0 - 3000.0 - 3000.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_3.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_3.yaml index 21770798f5..99934b82b5 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_3.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_3.yaml @@ -11,7 +11,7 @@ inputs: arbeitsstunden_w: - 10.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 einnahmen: bruttolohn_m: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_5.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_5.yaml index 943c824f0b..6797d830c3 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_5.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2019-01-01/hh_id_5.yaml @@ -11,7 +11,7 @@ inputs: arbeitsstunden_w: - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 einnahmen: bruttolohn_m: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2020-01-01/hh_id_10.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2020-01-01/hh_id_10.yaml index 9c79b85c2e..73a7169473 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2020-01-01/hh_id_10.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2020-01-01/hh_id_10.yaml @@ -13,7 +13,7 @@ inputs: - 0.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 - 0.0 einnahmen: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/3_children.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/3_children.yaml index fd21ea8b86..d955a4af8b 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/3_children.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/3_children.yaml @@ -19,7 +19,7 @@ inputs: - 0.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 - 200000.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_11.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_11.yaml index 8b8220d022..ada98a87a3 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_11.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_11.yaml @@ -15,7 +15,7 @@ inputs: - 0.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 200000.0 - 200000.0 - 200000.0 diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_12.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_12.yaml index 027b211107..fbfd7d3e97 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_12.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2021-01-01/hh_id_12.yaml @@ -11,7 +11,7 @@ inputs: arbeitsstunden_w: - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 0.0 einnahmen: bruttolohn_m: diff --git a/src/gettsim/tests_germany/policy_cases/kindergeld/2023-01-01/hh_id_13.yaml b/src/gettsim/tests_germany/policy_cases/kindergeld/2023-01-01/hh_id_13.yaml index fa6eb99bb2..38a156c43c 100644 --- a/src/gettsim/tests_germany/policy_cases/kindergeld/2023-01-01/hh_id_13.yaml +++ b/src/gettsim/tests_germany/policy_cases/kindergeld/2023-01-01/hh_id_13.yaml @@ -19,7 +19,7 @@ inputs: - 2.0 - 0.0 einkommensteuer: - gesamteinkommen_y: + gesamteinkommen_y_sn: - 3000.0 - 3000.0 - 3000.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2013-01-01/hh_id_2.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2013-01-01/hh_id_2.yaml index 937629e137..c5c93a3baf 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2013-01-01/hh_id_2.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2013-01-01/hh_id_2.yaml @@ -13,7 +13,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_1.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_1.yaml index 6f27d33e0e..bc2181c224 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_1.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_1.yaml @@ -15,7 +15,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_11.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_11.yaml index 7715b620ab..646fa0dee5 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_11.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_11.yaml @@ -15,7 +15,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_12.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_12.yaml index d71c714a92..00cc5a7448 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_12.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_12.yaml @@ -17,7 +17,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_13.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_13.yaml index 4e0b816a5c..77f0d47a93 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_13.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_13.yaml @@ -15,7 +15,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_7.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_7.yaml index f250ceda19..3d839d70e2 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_7.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2016-01-01/hh_id_7.yaml @@ -15,7 +15,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2017-01-01/hh_id_9.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2017-01-01/hh_id_9.yaml index 6feed75acb..29b7934f84 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2017-01-01/hh_id_9.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2017-01-01/hh_id_9.yaml @@ -17,7 +17,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2019-01-01/hh_id_6.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2019-01-01/hh_id_6.yaml index 08306d9843..b23ca2c30e 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2019-01-01/hh_id_6.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2019-01-01/hh_id_6.yaml @@ -13,7 +13,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2020-01-01/hh_id_8.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2020-01-01/hh_id_8.yaml index 1ded7c437a..59b8e5dc29 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2020-01-01/hh_id_8.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2020-01-01/hh_id_8.yaml @@ -13,7 +13,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2021-01-01/hh_id_10.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2021-01-01/hh_id_10.yaml index 145ae96bda..95a8ceadfb 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2021-01-01/hh_id_10.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2021-01-01/hh_id_10.yaml @@ -15,7 +15,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/hh_id_14.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/hh_id_14.yaml index 44a2e47a4c..ee3629f6b4 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/hh_id_14.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/hh_id_14.yaml @@ -14,7 +14,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_child_income.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_child_income.yaml index a389aba8cc..a4429f0d2b 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_child_income.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_child_income.yaml @@ -16,7 +16,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_family_high_wealth.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_family_high_wealth.yaml index c8f21ad7bd..31fa8c4b92 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_family_high_wealth.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_family_high_wealth.yaml @@ -16,7 +16,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_higher_wealth_exemptions.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_higher_wealth_exemptions.yaml index 6ea1a20715..30337e623a 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_higher_wealth_exemptions.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/2023-01-01/test_higher_wealth_exemptions.yaml @@ -16,7 +16,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2006/hh_id_4.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2006/hh_id_4.yaml index f3d8d518f9..6ad4b39e70 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2006/hh_id_4.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2006/hh_id_4.yaml @@ -19,7 +19,7 @@ inputs: - false - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.0 - 0.0 - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2009/hh_id_3.yaml b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2009/hh_id_3.yaml index bc43c9d978..a76ff7af0f 100644 --- a/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2009/hh_id_3.yaml +++ b/src/gettsim/tests_germany/policy_cases/kinderzuschlag/skip_2009/hh_id_3.yaml @@ -13,7 +13,7 @@ inputs: bezug_im_vorjahr: - false - false - mehrbedarf_alleinerziehend_m_bg: + mehrbedarfsanteil_alleinerziehend_m_bg: - 0.36 - 0.36 p_id_einstandspartner: diff --git a/src/gettsim/tests_germany/policy_cases/lohnsteuer/2026-01-01/aktivrente.yaml b/src/gettsim/tests_germany/policy_cases/lohnsteuer/2026-01-01/aktivrente.yaml index 56aec36a6f..922d100d9a 100644 --- a/src/gettsim/tests_germany/policy_cases/lohnsteuer/2026-01-01/aktivrente.yaml +++ b/src/gettsim/tests_germany/policy_cases/lohnsteuer/2026-01-01/aktivrente.yaml @@ -53,7 +53,7 @@ inputs: - 0.0 - 0.0 abzüge: - alleinerziehendenfreibetrag_basis: + alleinerziehendenfreibetrag_basis_y: - 0.0 - 0.0 - 0.0 diff --git "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2022-01-01/minijobgrenze.yaml" "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2022-01-01/minijobgrenze.yaml" index 6e38096e10..1ec03b1c2e 100644 --- "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2022-01-01/minijobgrenze.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2022-01-01/minijobgrenze.yaml" @@ -12,5 +12,5 @@ inputs: - 0 outputs: sozialversicherung: - minijobgrenze: + minijobgrenze_m: - 450.0 diff --git "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2023-01-01/minijobgrenze.yaml" "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2023-01-01/minijobgrenze.yaml" index 4f603ffebc..1abfc231b2 100644 --- "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2023-01-01/minijobgrenze.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2023-01-01/minijobgrenze.yaml" @@ -12,5 +12,5 @@ inputs: - 0 outputs: sozialversicherung: - minijobgrenze: + minijobgrenze_m: - 520.0 diff --git "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2024-01-01/minijobgrenze.yaml" "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2024-01-01/minijobgrenze.yaml" index f635d1bfb0..cbe1bba1c4 100644 --- "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2024-01-01/minijobgrenze.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2024-01-01/minijobgrenze.yaml" @@ -12,5 +12,5 @@ inputs: - 0 outputs: sozialversicherung: - minijobgrenze: + minijobgrenze_m: - 538.0 diff --git "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2025-01-01/minijobgrenze.yaml" "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2025-01-01/minijobgrenze.yaml" index f270a1ca9a..ca189723c3 100644 --- "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2025-01-01/minijobgrenze.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2025-01-01/minijobgrenze.yaml" @@ -12,5 +12,5 @@ inputs: - 0 outputs: sozialversicherung: - minijobgrenze: + minijobgrenze_m: - 556.0 diff --git "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2026-01-01/minijobgrenze.yaml" "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2026-01-01/minijobgrenze.yaml" index fa364dc989..0f7c602758 100644 --- "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2026-01-01/minijobgrenze.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2026-01-01/minijobgrenze.yaml" @@ -12,5 +12,5 @@ inputs: - 0 outputs: sozialversicherung: - minijobgrenze: + minijobgrenze_m: - 603.0 diff --git "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2027-01-01/minijobgrenze.yaml" "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2027-01-01/minijobgrenze.yaml" index 68fe41266b..5370b66b94 100644 --- "a/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2027-01-01/minijobgrenze.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/sozialversicherung/geringf\303\274gig_besch\303\244ftigt/2027-01-01/minijobgrenze.yaml" @@ -12,5 +12,5 @@ inputs: - 0 outputs: sozialversicherung: - minijobgrenze: + minijobgrenze_m: - 633.0 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/teilw_erwerbsgemindert_birthyear_1980_claim.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/teilw_erwerbsgemindert_birthyear_1980_claim.yaml index 4381aa5343..873bb66d50 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/teilw_erwerbsgemindert_birthyear_1980_claim.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/teilw_erwerbsgemindert_birthyear_1980_claim.yaml @@ -28,4 +28,4 @@ outputs: rente: erwerbsminderung: betrag_m: - - 425.5864865 + - 425.5312491 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1940_claim.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1940_claim.yaml index cfbf36c157..b458e24b49 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1940_claim.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1940_claim.yaml @@ -28,4 +28,4 @@ outputs: rente: erwerbsminderung: betrag_m: - - 363.9402804 + - 363.9191816 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1941_claim.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1941_claim.yaml index 2606751d8b..2da92a58f4 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1941_claim.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1941_claim.yaml @@ -28,4 +28,4 @@ outputs: rente: erwerbsminderung: betrag_m: - - 427.1326353 + - 427.1078729 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1970_claim.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1970_claim.yaml index 3005fdf62f..fd06d59c8c 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1970_claim.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1970_claim.yaml @@ -28,4 +28,4 @@ outputs: rente: erwerbsminderung: betrag_m: - - 975.6630083 + - 975.6064457 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1980_claim.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1980_claim.yaml index 18d9afa72c..b4069c1d15 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1980_claim.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/erwerbsminderung/2001-01-01/voll_erwerbsgemindert_birthyear_1980_claim.yaml @@ -28,4 +28,4 @@ outputs: rente: erwerbsminderung: betrag_m: - - 591.952113 + - 591.8752827 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_1.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_1.yaml index 5f3c8abefe..67c05e3459 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_1.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_1.yaml @@ -67,5 +67,5 @@ outputs: - 418.83 betrag_m: - 418.83 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.029166667 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_10.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_10.yaml index 6ed8323433..07617ba001 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_10.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_10.yaml @@ -67,5 +67,5 @@ outputs: - 0.0 betrag_m: - 0.0 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_11.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_11.yaml index 9cbdfe9568..710e662d1c 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_11.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_11.yaml @@ -1,7 +1,7 @@ --- info: note: |- - adjusted sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag + adjusted sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag_m since test case uses 0.8 as maximum instead of 0.8004. Beispiel Alexander Langkowski / Hatice Yilmaz. precision_atol: 1 @@ -69,5 +69,5 @@ outputs: - 279.0 betrag_m: - 279.0 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.021875 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_12.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_12.yaml index b2270962bc..8a322627e5 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_12.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_12.yaml @@ -65,5 +65,5 @@ outputs: - 0.0 betrag_m: - 0.0 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.0 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_2.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_2.yaml index 75064cba99..1017680a55 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_2.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_2.yaml @@ -67,5 +67,5 @@ outputs: - 314.6 betrag_m: - 314.6 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.021908333 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_3.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_3.yaml index 3723bc18af..1099ca9f70 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_3.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_3.yaml @@ -68,5 +68,5 @@ outputs: - 209.89 betrag_m: - 209.89 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.014616667 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_4.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_4.yaml index 1db5cf93f5..5e5a6e90e8 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_4.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_4.yaml @@ -1,7 +1,7 @@ --- info: note: |- - adjusted sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag + adjusted sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag_m since test case uses 0.8 as maximum instead of 0.8004. Beispiel Sabine M. precision_atol: 1 source: |- @@ -68,5 +68,5 @@ outputs: - 83.77 betrag_m: - 83.77 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.0058625 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_5.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_5.yaml index 6a78a55a74..05caf663a6 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_5.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_5.yaml @@ -1,7 +1,7 @@ --- info: note: |- - Adjusted `sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag` + Adjusted `sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag_m` since test case uses 0.8 as maximum instead of 0.8004. Beispiel Martin S. precision_atol: 1 source: |- @@ -68,5 +68,5 @@ outputs: - 50.98 betrag_m: - 50.98 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.003698333 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_6.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_6.yaml index 32abc8044a..9a84b4bfc2 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_6.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_6.yaml @@ -67,5 +67,5 @@ outputs: - 149.72 betrag_m: - 149.72 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.014583333 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_7.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_7.yaml index 250b9313f3..e87090f1ec 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_7.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_7.yaml @@ -67,5 +67,5 @@ outputs: - 149.72 betrag_m: - 59.72 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.014583333 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_8.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_8.yaml index c19c756949..949b65263c 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_8.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_8.yaml @@ -67,5 +67,5 @@ outputs: - 149.72 betrag_m: - 0.0 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.014583333 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_9.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_9.yaml index bf10885fc9..3e3e62bcdb 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_9.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/hh_id_9.yaml @@ -1,7 +1,7 @@ --- info: note: |- - Adjusted `sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag` + Adjusted `sozialversicherung__rente__grundrente__mean_entgeltpunkte_zuschlag_m` since test case uses 0.8 as maximum instead of 0.8004. Beispiel Richard Frenzel. precision_atol: 1 source: |- @@ -68,5 +68,5 @@ outputs: - 53.0 betrag_m: - 0.0 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.0037 diff --git a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/married_couple.yaml b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/married_couple.yaml index cf3796bd50..a26f0099b2 100644 --- a/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/married_couple.yaml +++ b/src/gettsim/tests_germany/policy_cases/sozialversicherung/rente/grundrente/2021-07-01/married_couple.yaml @@ -89,6 +89,6 @@ outputs: betrag_m: - 149.75 - 149.75 - mean_entgeltpunkte_zuschlag: + mean_entgeltpunkte_zuschlag_m: - 0.014583333 - 0.014583333 diff --git a/src/gettsim/tests_germany/test_currency.py b/src/gettsim/tests_germany/test_currency.py new file mode 100644 index 0000000000..ab821efd7c --- /dev/null +++ b/src/gettsim/tests_germany/test_currency.py @@ -0,0 +1,48 @@ +"""GETTSIM's unit system (GEP 10). + +``gettsim.germany.UNIT_SYSTEM`` declares the euro as the base currency and the +Deutsche Mark relative to it, plus the dated statutory-currency mapping that +tells the engine which currency each policy date computes in. +""" + +from __future__ import annotations + +import datetime + +import pytest + +from gettsim.germany import UNIT_SYSTEM + +#: 1 euro = 1.95583 DM, fixed by the Euro-Einführungsgesetz. +DM_PER_EUR = 1.95583 + + +def test_euro_is_the_base_currency() -> None: + assert UNIT_SYSTEM.base_currency == "EUR" + + +def test_deutsche_mark_converts_to_euro_at_the_statutory_rate() -> None: + assert UNIT_SYSTEM.currency_conversion_factor( + source_currency="DM", target_currency="EUR" + ) == pytest.approx(1 / DM_PER_EUR) + + +def test_euro_converts_to_deutsche_mark_at_the_statutory_rate() -> None: + assert UNIT_SYSTEM.currency_conversion_factor( + source_currency="EUR", target_currency="DM" + ) == pytest.approx(DM_PER_EUR) + + +@pytest.mark.parametrize( + ("policy_date", "expected"), + [ + (datetime.date(1984, 1, 1), "DM"), + (datetime.date(2001, 12, 31), "DM"), + (datetime.date(2002, 1, 1), "EUR"), + (datetime.date(2025, 1, 1), "EUR"), + ], +) +def test_statutory_currency_changes_over_to_the_euro_in_2002( + policy_date: datetime.date, expected: str +) -> None: + assert UNIT_SYSTEM.statutory_currency_for_date(policy_date=policy_date) == expected diff --git a/src/gettsim/tests_germany/test_policy_cases.py b/src/gettsim/tests_germany/test_policy_cases.py index 034ba73c79..3120799486 100644 --- a/src/gettsim/tests_germany/test_policy_cases.py +++ b/src/gettsim/tests_germany/test_policy_cases.py @@ -72,7 +72,12 @@ def orig_gettsim_objects() -> dict[ ids=POLICY_TEST_IDS_AND_CASES.keys(), ) def test_policy_cases(test: PolicyTest, backend: Literal["numpy", "jax"]): - execute_test(test=test, root=germany.ROOT_PATH, backend=backend) + execute_test( + test=test, + root=germany.ROOT_PATH, + backend=backend, + unit_system=germany.UNIT_SYSTEM, + ) @pytest.mark.skipif( @@ -95,6 +100,7 @@ def test_gettsim_policy_environment_is_complete(orig_gettsim_objects, date): name="GETTSIM", policy_date=date, orig_policy_objects=orig_gettsim_objects, + unit_system=germany.UNIT_SYSTEM, ) diff --git a/src/gettsim/tt/__init__.py b/src/gettsim/tt/__init__.py index 6edb1363e5..63751a960e 100644 --- a/src/gettsim/tt/__init__.py +++ b/src/gettsim/tt/__init__.py @@ -1,4 +1,5 @@ from ttsim.tt import ( + UNSET_UNIT, AggByGroupFunction, AggByPIDFunction, AggType, @@ -20,8 +21,10 @@ RoundingSpec, ScalarParam, TimeConversionFunction, + TTSIMUnit, agg_by_group_function, agg_by_p_id_function, + cast_unit, convert_sparse_to_consecutive_int_lookup_table, get_consecutive_int_lookup_table_param_value, get_month_based_phase_inout_of_age_thresholds_param_value, @@ -37,6 +40,7 @@ from ttsim.tt.interval_utils import intervals_to_thresholds, merge_piecewise_intervals __all__ = [ + "UNSET_UNIT", "AggByGroupFunction", "AggByPIDFunction", "AggType", @@ -57,9 +61,11 @@ "RawParam", "RoundingSpec", "ScalarParam", + "TTSIMUnit", "TimeConversionFunction", "agg_by_group_function", "agg_by_p_id_function", + "cast_unit", "convert_sparse_to_consecutive_int_lookup_table", "get_consecutive_int_lookup_table_param_value", "get_month_based_phase_inout_of_age_thresholds_param_value",