From 4e58e22afcf84c7a44ea41f622913402f2adac8b Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Mon, 13 Jul 2026 23:09:12 +0200 Subject: [PATCH 01/65] Register euro/DM currencies and grouping levels on import (#1191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Register the [currency] dimension for Germany (GEP 10): the euro as the base currency, the Deutsche Mark at the Euro-Einführungsgesetz rate of 1/1.95583 euro, and the dated statutory-currency mapping. The mapping declares the euro for all dates, matching how pre-2002 parameters are stored today; a follow-up flips it to DM through 2001. Also register the grouping levels (hh, ehe, fg, bg, eg, wthh, sn) with the fluent unit builder so decorators can spell `Unit.X.PER_HH` etc. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/__init__.py | 23 +++++++++++ src/gettsim/tests_germany/test_currency.py | 48 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 src/gettsim/tests_germany/test_currency.py diff --git a/src/gettsim/germany/__init__.py b/src/gettsim/germany/__init__.py index 643332ef06..837c5b7e51 100644 --- a/src/gettsim/germany/__init__.py +++ b/src/gettsim/germany/__init__.py @@ -2,8 +2,31 @@ from pathlib import Path +from ttsim.tt import ( + register_currency, + register_statutory_currencies, + register_unit_builder_levels, +) + ROOT_PATH = Path(__file__).parent +# Germany's currencies. Registered on import so the [currency] dimension has +# concrete currencies before the policy environment is assembled (GEP 10). The +# euro is the base currency; the Deutsche Mark is worth 1/1.95583 euro, the rate +# fixed by the Euro-Einführungsgesetz. The statutory-currency mapping tells the +# engine which currency each policy date computes in; it declares the euro for +# all dates, matching how pre-2002 parameters are stored today (hand-converted +# to euro). A follow-up flips it to DM through 2001 and re-transcribes those +# parameters to their statutory DM values. +register_currency(name="EUR", base=True) +register_currency(name="DM", definition="EUR / 1.95583") +register_statutory_currencies({"0001-01-01": "EUR"}) + +# Germany's grouping levels. Registered on import so the fluent unit builder +# offers `Unit.X.PER_HH` / `per_bg` / … before the policy modules (whose +# decorators use them) are loaded (GEP 10 compositional units). +register_unit_builder_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/tests_germany/test_currency.py b/src/gettsim/tests_germany/test_currency.py new file mode 100644 index 0000000000..2ef8410b76 --- /dev/null +++ b/src/gettsim/tests_germany/test_currency.py @@ -0,0 +1,48 @@ +"""GETTSIM's currency registration (GEP 10). + +Importing ``gettsim`` registers 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 ttsim.tt.currencies import ( + base_currency, + currency_conversion_factor, + statutory_currency_for_date, +) + +# Importing gettsim runs germany/__init__.py, which registers the currencies. +import gettsim # noqa: F401 + +#: 1 euro = 1.95583 DM, fixed by the Euro-Einführungsgesetz. +DM_PER_EUR = 1.95583 + + +def test_euro_is_the_base_currency(): + assert base_currency() == "EUR" + + +def test_deutsche_mark_converts_to_euro_at_the_statutory_rate(): + assert currency_conversion_factor("DM", "EUR") == pytest.approx(1 / DM_PER_EUR) + + +def test_euro_converts_to_deutsche_mark_at_the_statutory_rate(): + assert currency_conversion_factor("EUR", "DM") == pytest.approx(DM_PER_EUR) + + +@pytest.mark.parametrize( + "policy_date", + [ + datetime.date(1984, 1, 1), + datetime.date(2001, 12, 31), + datetime.date(2002, 1, 1), + datetime.date(2025, 1, 1), + ], +) +def test_statutory_currency_is_euro_for_every_policy_date(policy_date): + assert statutory_currency_for_date(policy_date) == "EUR" From ca3c1329d23886abe2840a4b9a0b56530e76e767 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Mon, 13 Jul 2026 23:39:14 +0200 Subject: [PATCH 02/65] Annotate kindergeld decorators with units (#1192) Reference namespace for the GEP-10 sweep: money flows carry Unit.CURRENCY.PER_MONTH, eligibility flags Unit.DIMENSIONLESS, the lookup-table converter UNSET_UNIT, and the SUM agg_by_p_id auto-derives. Re-export Unit and UNSET_UNIT from gettsim.tt. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/kindergeld/inputs.py | 6 +++--- src/gettsim/germany/kindergeld/kindergeld.py | 19 ++++++++++++++----- src/gettsim/tt/__init__.py | 4 ++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/gettsim/germany/kindergeld/inputs.py b/src/gettsim/germany/kindergeld/inputs.py index ac13b15478..88f0a37b20 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, Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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=Unit.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..6c7a04e399 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -5,8 +5,10 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, AggType, ConsecutiveIntLookupTableParamValue, + Unit, agg_by_p_id_function, get_consecutive_int_lookup_table_param_value, join, @@ -29,7 +31,9 @@ def anzahl_ansprüche( pass -@policy_function(start_date="2023-01-01", leaf_name="betrag_m") +@policy_function( + start_date="2023-01-01", leaf_name="betrag_m", unit=Unit.CURRENCY.PER_MONTH +) def betrag_ohne_staffelung_m( anzahl_ansprüche: int, satz: float, @@ -43,7 +47,9 @@ def betrag_ohne_staffelung_m( return satz * 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=Unit.CURRENCY.PER_MONTH +) def betrag_gestaffelt_m( anzahl_ansprüche: int, satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, @@ -61,6 +67,7 @@ def betrag_gestaffelt_m( end_date="1995-12-31", leaf_name="ist_leistungsbegründendes_kind", fail_msg_if_included="Kindergeld eligibility is not implemented prior to 1996.", + unit=Unit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_lohn_bis_1995() -> bool: pass @@ -70,6 +77,7 @@ 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=Unit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_lohn( alter: int, @@ -95,6 +103,7 @@ def leistungsbegründendes_kind_nach_lohn( @policy_function( start_date="2012-01-01", leaf_name="ist_leistungsbegründendes_kind", + unit=Unit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_stunden( alter: int, @@ -116,7 +125,7 @@ def leistungsbegründendes_kind_nach_stunden( ) -@policy_function(end_date="2015-12-31") +@policy_function(end_date="2015-12-31", unit=Unit.DIMENSIONLESS) def kind_bis_10_mit_kindergeld( alter: int, ist_leistungsbegründendes_kind: bool, @@ -125,7 +134,7 @@ def kind_bis_10_mit_kindergeld( return ist_leistungsbegründendes_kind and (alter <= 10) # noqa: PLR2004 -@policy_function(vectorization_strategy="not_required") +@policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) def gleiche_fg_wie_empfänger( p_id: IntColumn, p_id_empfänger: IntColumn, @@ -144,7 +153,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/tt/__init__.py b/src/gettsim/tt/__init__.py index 6edb1363e5..7bea9cd987 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,6 +21,7 @@ RoundingSpec, ScalarParam, TimeConversionFunction, + Unit, agg_by_group_function, agg_by_p_id_function, convert_sparse_to_consecutive_int_lookup_table, @@ -37,6 +39,7 @@ from ttsim.tt.interval_utils import intervals_to_thresholds, merge_piecewise_intervals __all__ = [ + "UNSET_UNIT", "AggByGroupFunction", "AggByPIDFunction", "AggType", @@ -58,6 +61,7 @@ "RoundingSpec", "ScalarParam", "TimeConversionFunction", + "Unit", "agg_by_group_function", "agg_by_p_id_function", "convert_sparse_to_consecutive_int_lookup_table", From 2213ad33946ab690e25402779cf5b1db67420dfa Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:27:46 +0200 Subject: [PATCH 03/65] Migrate params-schema to unit tokens; re-export cast_unit (#1192) Sync gettsim's params-schema.json copy with ttsim's GEP-10 grammar (unit tokens + input_unit/output_unit; reference_period dropped) and re-export cast_unit from gettsim.tt for body-level unit overrides. Co-Authored-By: Claude Opus 4.8 --- docs/geps/params-schema.json | 129 +++++++++++++++++++++++++++++------ src/gettsim/tt/__init__.py | 2 + 2 files changed, 111 insertions(+), 20 deletions(-) diff --git a/docs/geps/params-schema.json b/docs/geps/params-schema.json index db8220d4f9..5efe4dfc13 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", "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "unitToken": { + "$comment": "A fully-spelled compositional unit (GEP 10): a base optionally divided by an area, a period, and a grouping level, joined by `_PER_` (e.g. DIMENSIONLESS, CURRENCY_PER_MONTH_PER_BG, SILVER_PENNY_PER_FAM, PERSON_COUNT_PER_HH). Bases and grouping levels are open (per-package currencies, per-build levels), so this is a coarse pattern; `parse_compositional_unit` validates the grammar at load time.", + "type": "string", + "pattern": "^[A-Z][A-Z0-9_]*$" + }, + "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,70 @@ { "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": { + "$comment": "Scalar/dict parameter: `unit:` may sit at the top level (shared by every date) or one level lower, inside each date-specific key, so a parameter re-denominated over time can spell its unit symmetrically per date. The schema therefore does not require `unit:` here; the build-time mandatory-units check (`fail_if_environment_units_are_missing`) is the guarantee that every active leaf resolves to a unit (GEP 10).", + "allOf": [ + { "not": { "required": ["input_unit"] } }, + { "not": { "required": ["output_unit"] } } + ] + } + } + }, + { + "$comment": "A scalar parameter takes its period from a time suffix on its name and declares a single fully-spelled `unit:` token, not a per-leaf mapping (which only a dict or require_converter parameter may use).", + "if": { + "properties": { "type": { "const": "scalar" } }, + "required": ["type"] + }, + "then": { + "properties": { + "unit": { "$ref": "#/definitions/unitToken" } + } + } + }, { "minProperties": 1, "patternProperties": { diff --git a/src/gettsim/tt/__init__.py b/src/gettsim/tt/__init__.py index 7bea9cd987..e605d9c3cc 100644 --- a/src/gettsim/tt/__init__.py +++ b/src/gettsim/tt/__init__.py @@ -24,6 +24,7 @@ Unit, 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, @@ -64,6 +65,7 @@ "Unit", "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", From 1a0a33085b538f196a509511f2057009844281a7 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:28:08 +0200 Subject: [PATCH 04/65] Annotate top-level ids/inputs/characteristics with GEP-10 units (#1192) Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/ids.py | 36 +++++++++++++------ .../germany/individual_characteristics.py | 4 +-- src/gettsim/germany/inputs.py | 24 ++++++------- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/src/gettsim/germany/ids.py b/src/gettsim/germany/ids.py index f27e624601..d3c27f33c7 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 Unit, 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=Unit.DIMENSIONLESS) def p_id() -> int: """Unique identifier for each person. Always required, must be unique.""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def hh_id() -> int: """Individuals living together in a household in the Wohngeld sense (§5 WoGG).""" -@group_creation_function() +@group_creation_function(unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..8355e806c2 100644 --- a/src/gettsim/germany/individual_characteristics.py +++ b/src/gettsim/germany/individual_characteristics.py @@ -1,9 +1,9 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def alter_bis_24(alter: int) -> bool: """Age is 24 years at most. diff --git a/src/gettsim/germany/inputs.py b/src/gettsim/germany/inputs.py index 749df972a4..3ea9dc0115 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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=Unit.MONTHS) def alter_monate() -> int: """Age in months.""" -@policy_input() +@policy_input(unit=Unit.HOURS.PER_WEEK) def arbeitsstunden_w() -> float: """Working hours.""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def behinderungsgrad() -> int: pass -@policy_input() +@policy_input(unit=Unit.CALENDAR_YEAR) def geburtsjahr() -> int: """Birth year.""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def geburtsmonat() -> int: """Month of birth (within year).""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def geburtstag() -> int: """Day of birth (within month).""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def schwerbehindert_grad_g() -> bool: pass -@policy_input() +@policy_input(unit=Unit.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=Unit.DIMENSIONLESS) def weiblich() -> bool: """Female.""" -@policy_input(end_date="2024-12-31") +@policy_input(end_date="2024-12-31", unit=Unit.DIMENSIONLESS) def wohnort_ost_hh() -> bool: """Whether the household is located in the new Länder (Beitrittsgebiet).""" From 74a667617da5cfb70e564c964725141af54df466 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 05/65] Annotate familie with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the familie namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/familie/familie.py | 81 +++++++++++++++++--------- src/gettsim/germany/familie/inputs.py | 10 ++-- 2 files changed, 59 insertions(+), 32 deletions(-) diff --git a/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index 710a6aebad..6a1545c31a 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -10,6 +10,7 @@ from gettsim.tt import ( AggType, + Unit, agg_by_group_function, join, policy_function, @@ -21,7 +22,7 @@ from gettsim.typing import BoolColumn, IntColumn -@policy_function(vectorization_strategy="not_required") +@policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) def ist_kind_in_familiengemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -51,12 +52,14 @@ 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=Unit.PERSON_COUNT.PER_FG +) def anzahl_kinder_fg(ist_kind_in_familiengemeinschaft: bool, fg_id: int) -> int: pass -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def ist_kind_bis_2_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: @@ -64,14 +67,14 @@ def ist_kind_bis_2_in_familiengemeinschaft( return ist_kind_in_familiengemeinschaft and (alter <= 2) -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.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=Unit.DIMENSIONLESS) def ist_kind_bis_5_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: @@ -79,14 +82,14 @@ def ist_kind_bis_5_in_familiengemeinschaft( return ist_kind_in_familiengemeinschaft and (alter <= 5) -@agg_by_group_function(agg_type=AggType.SUM) +@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.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=Unit.DIMENSIONLESS) def ist_kind_bis_6_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: @@ -94,14 +97,16 @@ def ist_kind_bis_6_in_familiengemeinschaft( return ist_kind_in_familiengemeinschaft and (alter <= 6) -@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=Unit.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=Unit.DIMENSIONLESS) def ist_kind_bis_15_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: @@ -109,14 +114,16 @@ def ist_kind_bis_15_in_familiengemeinschaft( return ist_kind_in_familiengemeinschaft and (alter <= 15) -@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=Unit.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=Unit.DIMENSIONLESS) def ist_kind_bis_17_in_familiengemeinschaft( alter: int, ist_kind_in_familiengemeinschaft: bool ) -> bool: @@ -124,26 +131,32 @@ def ist_kind_bis_17_in_familiengemeinschaft( return ist_kind_in_familiengemeinschaft and (alter <= 17) -@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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS, +) def ist_kind_in_bedarfsgemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -171,7 +184,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=Unit.DIMENSIONLESS) def ist_erwachsener_in_bedarfsgemeinschaft( ist_kind_in_bedarfsgemeinschaft: bool, ) -> bool: @@ -184,7 +197,9 @@ 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=Unit.PERSON_COUNT.PER_BG +) def anzahl_erwachsene_bg( ist_erwachsener_in_bedarfsgemeinschaft: bool, bg_id: int, @@ -192,12 +207,14 @@ 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=Unit.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=Unit.DIMENSIONLESS) def ist_kind_bis_17_in_bedarfsgemeinschaft( alter: int, ist_kind_in_bedarfsgemeinschaft: bool ) -> bool: @@ -205,7 +222,9 @@ def ist_kind_bis_17_in_bedarfsgemeinschaft( return ist_kind_in_bedarfsgemeinschaft and (alter <= 17) -@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=Unit.PERSON_COUNT.PER_BG +) def anzahl_kinder_bis_17_bg( ist_kind_bis_17_in_bedarfsgemeinschaft: bool, bg_id: int ) -> int: @@ -217,7 +236,7 @@ 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=Unit.DIMENSIONLESS) def hat_kind_in_gleicher_bedarfsgemeinschaft( anzahl_kinder_bg: int, ist_erwachsener_in_bedarfsgemeinschaft: bool, @@ -236,7 +255,11 @@ 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=Unit.DIMENSIONLESS, +) def ist_kind_in_einsatzgemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -264,7 +287,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=Unit.DIMENSIONLESS) def ist_erwachsener_in_einsatzgemeinschaft( ist_kind_in_einsatzgemeinschaft: bool, ) -> bool: @@ -272,12 +295,16 @@ 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=Unit.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=Unit.PERSON_COUNT.PER_EG +) def anzahl_erwachsene_eg( ist_erwachsener_in_einsatzgemeinschaft: bool, eg_id: int ) -> int: @@ -294,13 +321,13 @@ def anzahl_personen_ehe(ehe_id: int) -> int: pass -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def volljährig(alter: int) -> bool: """Person over the age of 18.""" return alter >= 18 -@policy_function() +@policy_function(unit=Unit.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..8775a741f9 100644 --- a/src/gettsim/germany/familie/inputs.py +++ b/src/gettsim/germany/familie/inputs.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import AggType, FKType, agg_by_group_function, policy_input +from gettsim.tt import AggType, FKType, Unit, agg_by_group_function, policy_input -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def alleinerziehend() -> bool: """Single parent.""" @@ -15,16 +15,16 @@ 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=Unit.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=Unit.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=Unit.DIMENSIONLESS) def p_id_elternteil_2() -> int: """Identifier of the second parent.""" From 7ab8521565ac22853f2d6acc80056cc9e1f6aaea Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 06/65] Annotate kindergeld with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the kindergeld namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/kindergeld/kindergeld.py | 2 +- src/gettsim/germany/kindergeld/kindergeld.yaml | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/gettsim/germany/kindergeld/kindergeld.py b/src/gettsim/germany/kindergeld/kindergeld.py index 6c7a04e399..15bd496cbd 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -22,7 +22,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=Unit.PERSON_COUNT) def anzahl_ansprüche( ist_leistungsbegründendes_kind: bool, p_id_empfänger: int, diff --git a/src/gettsim/germany/kindergeld/kindergeld.yaml b/src/gettsim/germany/kindergeld/kindergeld.yaml index 41160d949d..78c68c6775 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,8 +33,7 @@ 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 + unit: EUR_PER_MONTH type: require_converter 1975-01-01: 1: 26 @@ -169,8 +167,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 @@ -193,8 +190,7 @@ maximales_einkommen_des_kindes: § 32 (4) EStG. Wurde 2012 durch eine Höchstgrenze der gearbeiteten Stunden ersetzt. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 1996-01-01: value: 6136 @@ -226,8 +222,7 @@ 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 @@ -242,8 +237,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 From c4eddeb121ca8c33a3a8c6856152f1044404aebd Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 07/65] Annotate kinderbonus with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the kinderbonus namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/kinderbonus/kinderbonus.py | 6 ++++-- src/gettsim/germany/kinderbonus/kinderbonus.yaml | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gettsim/germany/kinderbonus/kinderbonus.py b/src/gettsim/germany/kinderbonus/kinderbonus.py index 256f588c18..1078d2c206 100644 --- a/src/gettsim/germany/kinderbonus/kinderbonus.py +++ b/src/gettsim/germany/kinderbonus/kinderbonus.py @@ -2,10 +2,12 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function -@policy_function(start_date="2020-01-01", end_date="2021-12-31") +@policy_function( + start_date="2020-01-01", end_date="2021-12-31", unit=Unit.CURRENCY.PER_YEAR +) def betrag_y(kindergeld__betrag_y: float, satz: float) -> float: """Calculate Kinderbonus for an individual child. diff --git a/src/gettsim/germany/kinderbonus/kinderbonus.yaml b/src/gettsim/germany/kinderbonus/kinderbonus.yaml index d759f4af43..a75ee1e015 100644 --- a/src/gettsim/germany/kinderbonus/kinderbonus.yaml +++ b/src/gettsim/germany/kinderbonus/kinderbonus.yaml @@ -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 From 717f546c0cc4c5269cb5cefdfe37c754ca0d9354 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 08/65] Annotate unterhalt with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the unterhalt namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/unterhalt/inputs.py | 6 +++--- src/gettsim/germany/unterhalt/unterhalt.py | 4 ++-- src/gettsim/germany/unterhalt/unterhalt.yaml | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gettsim/germany/unterhalt/inputs.py b/src/gettsim/germany/unterhalt/inputs.py index 54de541bf6..44326b414a 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.CURRENCY.PER_MONTH) def anspruch_m() -> float: """Monthly gross alimony payments to be received as determined by the court.""" -@policy_input() +@policy_input(unit=Unit.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..d35c840c6f 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 Unit, policy_function -@policy_function() +@policy_function(unit=Unit.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 From 09d0b33a206311e44a26f40dea3772f2ce113aae Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 09/65] Annotate unterhaltsvorschuss with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the unterhaltsvorschuss namespace. Co-Authored-By: Claude Opus 4.8 --- .../unterhaltsvorschuss.py | 45 ++++++++++++++----- .../unterhaltsvorschuss.yaml | 15 +++---- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py index 523ee4450b..62949843bf 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, + Unit, 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=Unit.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=Unit.EUR.PER_MONTH, base=1, direction="up", reference="§ 9 Abs. 3 UhVorschG", ), + unit=Unit.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=Unit.DIMENSIONLESS) def elternteil_alleinerziehend( kindergeld__p_id_empfänger: IntColumn, p_id: IntColumn, @@ -94,17 +98,23 @@ def elternteil_alleinerziehend( end_date="2008-12-31", leaf_name="betrag_m", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=1, direction="down", reference="§ 9 Abs. 3 UhVorschG", ), fail_msg_if_included="Unterhaltsvorschuss is not implemented prior to 2009.", + unit=Unit.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=Unit.CURRENCY.PER_MONTH, +) def kindergeld_erstes_kind_ohne_staffelung_m( kindergeld__satz: float, ) -> float: @@ -112,7 +122,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=Unit.CURRENCY.PER_MONTH, +) def kindergeld_erstes_kind_gestaffelt_m( kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, ) -> float: @@ -124,6 +138,7 @@ def kindergeld_erstes_kind_gestaffelt_m( start_date="2009-01-01", end_date="2014-12-31", leaf_name="anspruchshöhe_m", + unit=Unit.CURRENCY.PER_MONTH, ) def unterhaltsvorschuss_anspruch_m_2009_bis_2014( alter: int, @@ -173,6 +188,7 @@ def unterhaltsvorschuss_anspruch_m_2009_bis_2014( start_date="2015-01-01", end_date="2015-12-31", leaf_name="anspruchshöhe_m", + unit=Unit.CURRENCY.PER_MONTH, ) def anspruchshöhe_m_anwendungsvors( alter: int, @@ -205,6 +221,7 @@ def anspruchshöhe_m_anwendungsvors( start_date="2016-01-01", end_date="2017-06-30", leaf_name="anspruchshöhe_m", + unit=Unit.CURRENCY.PER_MONTH, ) def anspruchshöhe_m_2016_bis_2017_06( alter: int, @@ -235,7 +252,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=Unit.CURRENCY.PER_MONTH, +) def anspruchshöhe_m_ab_2017_07( alter: int, elternteil_mindesteinkommen_erreicht: bool, @@ -269,7 +290,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=Unit.DIMENSIONLESS, +) def elternteil_mindesteinkommen_erreicht( kindergeld__p_id_empfänger: IntColumn, p_id: IntColumn, @@ -288,7 +313,7 @@ def elternteil_mindesteinkommen_erreicht( ) -@policy_function(start_date="2017-07-01") +@policy_function(start_date="2017-07-01", unit=Unit.DIMENSIONLESS) def mindesteinkommen_erreicht( einkommen_m: float, mindesteinkommen: float, @@ -297,7 +322,7 @@ def mindesteinkommen_erreicht( return einkommen_m >= mindesteinkommen -@policy_function(start_date="2017-07-01") +@policy_function(start_date="2017-07-01", unit=Unit.CURRENCY.PER_MONTH) def einkommen_m( einnahmen__bruttolohn_m: float, einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -319,7 +344,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 +360,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..358692f48f 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml @@ -10,8 +10,7 @@ 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: {satz: EUR_PER_MONTH, min_alter: YEARS, max_alter: YEARS} type: require_converter 2016-01-01: kleinkind: @@ -128,8 +127,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 +145,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 +170,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 +199,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 From 15cea3636e81ba0ec4d8627c7c6d6e7351a4fd08 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 10/65] Annotate einnahmen with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the einnahmen namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/einnahmen/inputs.py | 6 +++--- .../germany/einnahmen/renten/betrag_gesamt.py | 14 +++++++++++--- .../germany/einnahmen/renten/gesetzliche.py | 4 ++-- src/gettsim/germany/einnahmen/renten/inputs.py | 12 ++++++------ 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/gettsim/germany/einnahmen/inputs.py b/src/gettsim/germany/einnahmen/inputs.py index f3dc2d7137..e694b05367 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.CURRENCY.PER_MONTH) def bruttolohn_m() -> float: """Income (Einnahmen) from non-self-employment.""" -@policy_input() +@policy_input(unit=Unit.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..bef86938f7 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 Unit, 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=Unit.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=Unit.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..3880d19e76 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 Unit, policy_function -@policy_function() +@policy_function(unit=Unit.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..409175ba17 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.CURRENCY.PER_MONTH) def sonstige_private_vorsorge_m() -> float: """Monthly payout from private pensions taxed via Ertragsanteil only. From 71d0d7c7a9758568ff26aee2bf2508fc54846321 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 11/65] Annotate wohnen with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the wohnen namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/wohnen/inputs.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gettsim/germany/wohnen/inputs.py b/src/gettsim/germany/wohnen/inputs.py index fec02cf65c..98c7673dfb 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 Unit, policy_input -@policy_input(end_date="2008-12-31") +@policy_input(end_date="2008-12-31", unit=Unit.CALENDAR_YEAR) 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=Unit.DIMENSIONLESS) def bewohnt_eigentum_hh() -> bool: """Owner-occupied housing.""" -@policy_input() +@policy_input(unit=Unit.CURRENCY.PER_MONTH) def bruttokaltmiete_m_hh() -> float: """Rent expenses excluding utilities.""" -@policy_input(start_date="2005-01-01") +@policy_input(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) def heizkosten_m_hh() -> float: """Heating expenses.""" -@policy_input(start_date="2005-01-01") +@policy_input(start_date="2005-01-01", unit=Unit.SQUARE_METER) def wohnfläche_hh() -> float: """Size of household dwelling in square meters.""" From 6bf617a8dc417ebbe9acf0b9d1f2361014fa2be8 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 12/65] =?UTF-8?q?Annotate=20solidarit=C3=A4tszuschlag=20wi?= =?UTF-8?q?th=20GEP-10=20units=20(#1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the solidaritätszuschlag namespace. Co-Authored-By: Claude Opus 4.8 --- .../solidarit\303\244tszuschlag.py" | 13 +++++++++++-- .../solidarit\303\244tszuschlag.yaml" | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) 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..8867a15f07 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, + Unit, 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=Unit.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=Unit.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..e0e717b390 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" @@ -8,8 +8,8 @@ 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 + input_unit: EUR_PER_YEAR + output_unit: EUR_PER_YEAR type: piecewise_linear 1991-01-01: reference: Artikel 1 G. v. 24.06.1991 BGBl. I S. 1318. From cff2ea26072c339ec9b8cbb9736d7f7783789e7c Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 13/65] =?UTF-8?q?Annotate=20vorrangpr=C3=BCfungen=20with?= =?UTF-8?q?=20GEP-10=20units=20(#1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the vorrangprüfungen namespace. Co-Authored-By: Claude Opus 4.8 --- .../vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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..f2ef11143a 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 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=Unit.DIMENSIONLESS, ) def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( arbeitslosengeld_2__regelbedarf_m_bg: float, @@ -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=Unit.DIMENSIONLESS, ) def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( bürgergeld__regelbedarf_m_bg: float, From 6b1238d40df11feb84a69c5bb21c976c560f2063 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 14/65] Annotate lohnsteuer with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the lohnsteuer namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/lohnsteuer/einkommen.py | 38 +++++++++++++------ .../lohnsteuer/einkommensgrenzwerte.yaml | 3 +- src/gettsim/germany/lohnsteuer/inputs.py | 4 +- src/gettsim/germany/lohnsteuer/lohnsteuer.py | 24 ++++++------ src/gettsim/germany/lohnsteuer/minijob.yaml | 3 +- src/gettsim/germany/lohnsteuer/vorsorge.yaml | 13 +++---- 6 files changed, 48 insertions(+), 37 deletions(-) diff --git a/src/gettsim/germany/lohnsteuer/einkommen.py b/src/gettsim/germany/lohnsteuer/einkommen.py index 6cd00148b4..3793629ca7 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, + Unit, param_function, piecewise_polynomial, policy_function, @@ -18,8 +19,9 @@ @policy_function( end_date="2025-12-31", - rounding_spec=RoundingSpec(base=1, direction="down"), + rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", + unit=Unit.CURRENCY.PER_YEAR, ) def einkommen_y_bis_2025( einnahmen__bruttolohn_y: float, @@ -59,8 +61,9 @@ def einkommen_y_bis_2025( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(base=1, direction="down"), + rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", + unit=Unit.CURRENCY.PER_YEAR, ) def einkommen_y_ab_2026( einnahmen__bruttolohn_y: float, @@ -106,7 +109,7 @@ def einkommen_y_ab_2026( ) -@policy_function(start_date="2010-01-01", end_date="2025-12-31") +@policy_function(start_date="2010-01-01", end_date="2025-12-31", unit=Unit.CURRENCY) def vorsorge_krankenversicherungsbeiträge_option_a( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, steuerklasse: int, @@ -143,6 +146,7 @@ def vorsorge_krankenversicherungsbeiträge_option_a( start_date="2015-01-01", end_date="2018-12-31", leaf_name="vorsorge_krankenversicherungsbeiträge_option_b", + unit=Unit.CURRENCY, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -170,6 +174,7 @@ def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( start_date="2019-01-01", end_date="2025-12-31", leaf_name="vorsorge_krankenversicherungsbeiträge_option_b", + unit=Unit.CURRENCY, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -193,7 +198,7 @@ def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( ) -@policy_function(start_date="2026-01-01") +@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY.PER_YEAR) def vorsorge_gesetzliche_krankenversicherungsbeiträge_y( sozialversicherung__kranken__beitrag__privat_versichert: bool, sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -216,7 +221,7 @@ def vorsorge_gesetzliche_krankenversicherungsbeiträge_y( ) -@policy_function(start_date="2026-01-01") +@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY) def vorsorge_arbeitslosenversicherungsbeiträge( sozialversicherung__rente__beitrag__einkommen_y: float, sozialversicherung__arbeitslosen__beitrag__beitragssatz: float, @@ -230,7 +235,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=Unit.CURRENCY.PER_YEAR, ) def vorsorge_rentenversicherungsbeiträge_teilweise_anrechnung_y( sozialversicherung__rente__beitrag__einkommen_y: float, @@ -251,7 +258,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=Unit.CURRENCY.PER_YEAR, ) def vorsorge_rentenversicherungsbeiträge_volle_anrechnung_y( sozialversicherung__rente__beitrag__einkommen_y: float, @@ -271,7 +280,7 @@ 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=Unit.DIMENSIONLESS) def einführungsfaktor_rentenversicherungsaufwendungen( parameter_einführungsfaktor_rentenversicherungsaufwendungen: PiecewisePolynomialParamValue, policy_year: int, @@ -296,7 +305,8 @@ def einführungsfaktor_rentenversicherungsaufwendungen( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(base=1, direction="up"), + rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="up"), + unit=Unit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_ohne_arbeitslosenversicherungsbeiträge_y( sozialversicherung__kranken__beitrag__privat_versichert: bool, @@ -324,7 +334,8 @@ def vorsorgepauschale_ohne_arbeitslosenversicherungsbeiträge_y( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(base=1, direction="up"), + rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="up"), + unit=Unit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( vorsorge_rentenversicherungsbeiträge_y: float, @@ -352,6 +363,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=Unit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_y_ab_2005_bis_2009() -> float: pass @@ -361,7 +373,8 @@ 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=Unit.EUR.PER_YEAR, base=1, direction="up"), + unit=Unit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_y_ab_2010_bis_2025( vorsorge_rentenversicherungsbeiträge_y: float, @@ -383,7 +396,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=Unit.EUR.PER_YEAR, base=1, direction="up"), + unit=Unit.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..e72ff5aa42 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..0773b25253 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, + Unit, 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,7 +94,7 @@ def parameter_max_lohnsteuer_klasse_5_6( ) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) def basistarif( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -106,7 +108,7 @@ def basistarif( ) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) def splittingtarif( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -120,7 +122,7 @@ def splittingtarif( ) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) def tarif_klassen_5_und_6( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -144,7 +146,7 @@ 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=Unit.CURRENCY.PER_YEAR) def betrag_y( steuerklasse: int, basistarif: float, @@ -161,7 +163,7 @@ def betrag_y( return max(out, 0.0) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) def basistarif_mit_kinderfreibetrag( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -180,7 +182,7 @@ def basistarif_mit_kinderfreibetrag( ) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) def splittingtarif_mit_kinderfreibetrag( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -199,7 +201,7 @@ def splittingtarif_mit_kinderfreibetrag( ) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) def tarif_klassen_5_und_6_mit_kinderfreibetrag( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -230,7 +232,7 @@ 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=Unit.CURRENCY.PER_YEAR) def betrag_mit_kinderfreibetrag_y( steuerklasse: int, basistarif_mit_kinderfreibetrag: float, @@ -252,7 +254,7 @@ def betrag_mit_kinderfreibetrag_y( return max(out, 0.0) -@policy_function(start_date="2015-01-01") +@policy_function(start_date="2015-01-01", unit=Unit.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=Unit.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..281b7a337c 100644 --- a/src/gettsim/germany/lohnsteuer/vorsorge.yaml +++ b/src/gettsim/germany/lohnsteuer/vorsorge.yaml @@ -17,8 +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 + input_unit: CALENDAR_YEAR + output_unit: DIMENSIONLESS # type: require_converter type: piecewise_linear 2005-01-01: @@ -47,8 +47,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,8 +68,7 @@ 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 @@ -93,8 +91,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 From a2a1901ed02375d0c9f392d1d2f7ea348668d9fe Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 15/65] Annotate einkommensteuer with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the einkommensteuer namespace. Co-Authored-By: Claude Opus 4.8 --- .../abgeltungssteuer/abgeltungssteuer.py | 4 +- .../abgeltungssteuer/abgeltungssteuer.yaml | 3 +- .../abz\303\274ge/alleinerziehend.py" | 14 ++++-- .../abz\303\274ge/alleinerziehend.yaml" | 6 +-- .../einkommensteuer/abz\303\274ge/alter.py" | 18 +++++-- .../einkommensteuer/abz\303\274ge/alter.yaml" | 17 +++---- .../abz\303\274ge/behinderung.py" | 3 +- .../abz\303\274ge/behinderung.yaml" | 4 +- .../einkommensteuer/abz\303\274ge/betrag.py" | 6 +-- .../einkommensteuer/abz\303\274ge/inputs.py" | 8 +-- .../abz\303\274ge/sonderausgaben.py" | 22 ++++++-- .../abz\303\274ge/sonderausgaben.yaml" | 8 +-- .../abz\303\274ge/vorsorge.py" | 50 +++++++++++++++---- .../abz\303\274ge/vorsorge.yaml" | 19 ++++--- .../germany/einkommensteuer/einkommen.py | 4 +- .../einkommensteuer/einkommensteuer.py | 27 ++++++++-- .../einkommensteuer/einkommensteuertarif.yaml | 4 +- .../aus_forst_und_landwirtschaft/inputs.py" | 4 +- .../aus_gewerbebetrieb/inputs.py" | 4 +- .../aus_kapitalverm\303\266gen.py" | 14 ++++-- .../freibetr\303\244ge.yaml" | 9 ++-- .../aktivrente.yaml" | 3 +- ...aus_nichtselbstst\303\244ndiger_arbeit.py" | 30 +++++++---- .../inputs.py" | 4 +- .../werbungskostenpauschale.yaml" | 3 +- .../inputs.py" | 4 +- .../aus_vermietung_und_verpachtung/inputs.py" | 4 +- .../eink\303\274nfte/eink\303\274nfte.py" | 14 ++++-- .../eink\303\274nfte/inputs.py" | 4 +- .../eink\303\274nfte/sonstige/inputs.py" | 4 +- .../sonstige/rente/inputs.py" | 8 +-- .../eink\303\274nfte/sonstige/rente/rente.py" | 24 ++++++--- .../sonstige/rente/rente.yaml" | 8 +-- .../eink\303\274nfte/sonstige/sonstige.py" | 4 +- .../sonstige/werbungskostenpauschale.yaml" | 6 +-- src/gettsim/germany/einkommensteuer/inputs.py | 4 +- .../einkommensteuer/kinderfreibetrag.py | 15 +++--- .../einkommensteuer/kinderfreibetrag.yaml | 3 +- .../zu_versteuerndes_einkommen.py | 10 +++- 39 files changed, 255 insertions(+), 145 deletions(-) diff --git a/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py b/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py index 915fe05d0e..b7f29e3700 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 Unit, policy_function -@policy_function(start_date="2009-01-01") +@policy_function(start_date="2009-01-01", unit=Unit.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..0e48000a79 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" @@ -2,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, 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=Unit.CURRENCY.PER_YEAR, +) def alleinerziehend_betrag_y_pauschal( familie__alleinerziehend_sn: bool, alleinerziehendenfreibetrag_basis: float, @@ -14,7 +18,11 @@ def alleinerziehend_betrag_y_pauschal( return alleinerziehendenfreibetrag_basis 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=Unit.CURRENCY.PER_YEAR, +) def alleinerziehend_betrag_y_nach_kinderzahl( familie__alleinerziehend_sn: bool, kindergeld__anzahl_ansprüche_sn: int, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" index 6abc4ef490..ae802e23c7 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" @@ -6,8 +6,7 @@ alleinerziehendenfreibetrag_basis: 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 @@ -39,8 +38,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..f1b4c82c16 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, + Unit, 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=Unit.CURRENCY.PER_YEAR, +) def altersfreibetrag_y_bis_2004( alter: int, einnahmen__bruttolohn_y: float, @@ -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=Unit.CURRENCY.PER_YEAR, +) def altersfreibetrag_y_ab_2005( alter: int, geburtsjahr: int, @@ -87,7 +97,7 @@ def altersfreibetrag_y_ab_2005( 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,7 +122,7 @@ def altersentlastungsquote_gestaffelt_nach_geburtsjahr( ) -@param_function(start_date="2005-01-01") +@param_function(start_date="2005-01-01", unit=UNSET_UNIT) def maximaler_altersentlastungsbetrag_gestaffelt_nach_geburtsjahr( raw_maximaler_altersentlastungsbetrag_gestaffelt: dict[str | int, int | float], altersentlastungsbetrag_altersgrenze: int, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" index a5caaf0b77..e25cc20387 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" @@ -13,8 +13,7 @@ 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 @@ -29,8 +28,7 @@ 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 + unit: EUR_PER_YEAR type: require_converter 1984-01-01: value: 1534 @@ -47,8 +45,8 @@ raw_maximaler_altersentlastungsbetrag_gestaffelt: 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 +159,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 +178,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..d41540db83 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, + Unit, piecewise_polynomial, policy_function, ) @@ -14,7 +15,7 @@ from types import ModuleType -@policy_function() +@policy_function(unit=Unit.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..dad4413a68 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" @@ -6,8 +6,8 @@ parameter_behindertenpauschbetrag: description: de: § 33b (3) EStG. en: null - unit: Euros - reference_period: Year + input_unit: DIMENSIONLESS + output_unit: EUR_PER_YEAR type: piecewise_constant 1975-01-01: reference: G. v. 05.08.1974 BGBl. I S. 1769. diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" index c12fffe202..a7896fc6a5 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 Unit, policy_function -@policy_function() +@policy_function(unit=Unit.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=Unit.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..ea53bb3d2c 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.CURRENCY.PER_MONTH) def beitrag_private_rentenversicherung_m() -> float: pass -@policy_input() +@policy_input(unit=Unit.CURRENCY.PER_MONTH) def kinderbetreuungskosten_m() -> float: """Monthly childcare expenses for a particular child under the age of 14.""" -@policy_input() +@policy_input(unit=Unit.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..31852921fd 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, + Unit, 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=Unit.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=Unit.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=Unit.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=Unit.CURRENCY.PER_YEAR) def gedeckelte_kinderbetreuungskosten_y( kinderbetreuungskosten_elternteil_y: float, parameter_absetzbare_kinderbetreuungskosten: dict[str, float], @@ -63,7 +72,10 @@ def gedeckelte_kinderbetreuungskosten_y( ) -@policy_function(rounding_spec=RoundingSpec(base=1, direction="up")) +@policy_function( + rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="up"), + unit=Unit.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..c3b257041b 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" @@ -6,8 +6,7 @@ sonderausgabenpauschbetrag: description: de: § 10c EStG en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 1984-01-01: value: 138 @@ -25,8 +24,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..33ff56592d 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, + Unit, param_function, piecewise_polynomial, policy_function, @@ -17,7 +18,13 @@ @policy_function( 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=Unit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_bis_2004( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -30,7 +37,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=Unit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2005_bis_2009( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -51,7 +64,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=Unit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2010_bis_2019( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -71,7 +90,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=Unit.EUR.PER_YEAR.PER_SN, + base=1, + direction="up", + reference="§ 10 Abs. 3 EStG", + ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2020( vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn: float, @@ -84,7 +109,7 @@ 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=Unit.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 +152,7 @@ def vorsorgeaufwendungen_regime_bis_2004_y_sn( @policy_function( start_date="2005-01-01", end_date="2009-12-31", + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_globale_kappung_y_sn( altersvorsorge_y_sn: float, @@ -156,6 +182,7 @@ def vorsorgeaufwendungen_globale_kappung_y_sn( @policy_function( start_date="2010-01-01", + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn( altersvorsorge_y_sn: float, @@ -195,7 +222,7 @@ 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=Unit.DIMENSIONLESS) def rate_abzugsfähige_altersvorsorgeaufwendungen( parameter_einführungsfaktor_altersvorsorgeaufwendungen: PiecewisePolynomialParamValue, policy_year: int, @@ -222,6 +249,7 @@ def rate_abzugsfähige_altersvorsorgeaufwendungen( start_date="2005-01-01", end_date="2022-12-31", leaf_name="altersvorsorge_y_sn", + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def altersvorsorge_y_sn_phase_in( sozialversicherung__rente__beitrag__betrag_versicherter_y_sn: float, @@ -248,7 +276,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=Unit.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 +297,7 @@ 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=Unit.CURRENCY.PER_YEAR.PER_SN) def vorwegabzug_lohnsteuer_y_sn( einnahmen__bruttolohn_y_sn: float, familie__anzahl_personen_sn: int, @@ -284,7 +316,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=Unit.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..9fc3fa1ee7 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" @@ -16,8 +16,10 @@ 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 + unit: + vorwegabzug: EUR_PER_YEAR + grundhöchstbetrag: EUR_PER_YEAR + kürzungsanteil_abhängig_beschäftigte: DIMENSIONLESS type: dict 1985-01-01: vorwegabzug: 1534 @@ -90,8 +92,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 +115,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 +130,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 +148,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..4ad7963914 100644 --- a/src/gettsim/germany/einkommensteuer/einkommen.py +++ b/src/gettsim/germany/einkommensteuer/einkommen.py @@ -6,10 +6,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_YEAR) def gesamteinkommen_y( einkünfte__gesamtbetrag_der_einkünfte_y_sn: float, abzüge__betrag_y_sn: float, diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuer.py b/src/gettsim/germany/einkommensteuer/einkommensteuer.py index d1946d1dd5..4d47d21f42 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, + Unit, 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=Unit.PERSON_COUNT) 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=Unit.PERSON_COUNT) 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=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S. 6 EStG", ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( betrag_mit_kinderfreibetrag_y_sn: float, @@ -65,10 +69,12 @@ def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( start_date="1997-01-01", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_kindergeld_oder_kinderfreibetrag( betrag_ohne_kinderfreibetrag_y_sn: float, @@ -85,7 +91,7 @@ def betrag_y_sn_kindergeld_oder_kinderfreibetrag( return out -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS.PER_SN) def kinderfreibetrag_günstiger_sn( betrag_ohne_kinderfreibetrag_y_sn: float, betrag_mit_kinderfreibetrag_y_sn: float, @@ -103,11 +109,13 @@ def kinderfreibetrag_günstiger_sn( end_date="2001-12-31", leaf_name="betrag_mit_kinderfreibetrag_y_sn", rounding_spec=RoundingSpec( + unit=Unit.EUR.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=Unit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_mit_kinderfreibetrag_y_sn_bis_2001() -> float: pass @@ -117,10 +125,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=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_mit_kinderfreibetrag_y_sn_ab_2002( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -146,10 +156,12 @@ def betrag_mit_kinderfreibetrag_y_sn_ab_2002( @policy_function( rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_ohne_kinderfreibetrag_y_sn( gesamteinkommen_y: float, @@ -169,7 +181,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=Unit.CURRENCY.PER_MONTH, +) def relevantes_kindergeld_mit_staffelung_m( anzahl_kindergeld_ansprüche_1: int, anzahl_kindergeld_ansprüche_2: int, @@ -193,6 +209,7 @@ def relevantes_kindergeld_mit_staffelung_m( @policy_function( start_date="2023-01-01", leaf_name="relevantes_kindergeld_m", + unit=Unit.CURRENCY.PER_MONTH, ) def relevantes_kindergeld_ohne_staffelung_m( anzahl_kindergeld_ansprüche_1: int, @@ -213,7 +230,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..d47827eae4 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..6fa9120577 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..8bb4161b27 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,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, 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=Unit.CURRENCY.PER_YEAR.PER_SN, +) def betrag_y_sn_mit_sparerfreibetrag_und_werbungskostenpauschbetrag( einnahmen__kapitalerträge_y_sn: float, familie__anzahl_personen_sn: int, @@ -20,7 +24,11 @@ def betrag_y_sn_mit_sparerfreibetrag_und_werbungskostenpauschbetrag( ) -@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=Unit.CURRENCY.PER_YEAR.PER_SN, +) def betrag_y_sn_mit_sparerpauschbetrag( einnahmen__kapitalerträge_y_sn: float, familie__anzahl_personen_sn: int, 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..a09ee52d90 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" @@ -8,8 +8,7 @@ sparerfreibetrag: Früher § 20 (4) 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 1975-01-01: value: 153 @@ -41,8 +40,7 @@ werbungskostenpauschbetrag: description: de: § 9a EStG en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 1975-01-01: value: 51 @@ -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..faee564313 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 Unit, 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=Unit.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=Unit.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=Unit.CURRENCY.PER_YEAR) def einnahmen_nach_abzug_werbungskosten_y( einnahmen__bruttolohn_y: float, werbungskosten_y: float, @@ -42,7 +46,7 @@ def einnahmen_nach_abzug_werbungskosten_y( return max(einnahmen__bruttolohn_y - werbungskosten_y, 0.0) -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_YEAR) def werbungskosten_y( tatsächliche_werbungskosten_y: float, arbeitnehmerpauschbetrag: float, @@ -65,7 +69,7 @@ def werbungskosten_y( return max(anrechenbare_werbungskosten, arbeitnehmerpauschbetrag) -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def anteil_steuerfälliger_einnahmen_y( einnahmen__bruttolohn_y: float, steuerbefreite_einnahmen_y: 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=Unit.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=Unit.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=Unit.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..f7165b11a2 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..70477cf244 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,8 +6,7 @@ arbeitnehmerpauschbetrag: description: de: § 9a Nr. 1a) EStG en: This is the minimum amount deducted from any employment income. - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: scalar 1975-01-01: value: 288 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..d5240e3674 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..3d4c001d7f 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..e0521d5e76 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 Unit, 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=Unit.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=Unit.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..033d0250c9 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..e313a37a01 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..9179b0bed6 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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=Unit.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=Unit.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..4f3550d356 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 Unit, 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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS) def ertragsanteil_berufsständische_altersvorsorge( alter_beginn_leistungsbezug_berufsständische_altersvorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -88,7 +96,7 @@ def ertragsanteil_berufsständische_altersvorsorge( ) -@policy_function(end_date="2004-12-31") +@policy_function(end_date="2004-12-31", unit=Unit.DIMENSIONLESS) def ertragsanteil_gesetzliche_rente( sozialversicherung__rente__alter_bei_renteneintritt: float, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -100,7 +108,7 @@ def ertragsanteil_gesetzliche_rente( ) -@policy_function(end_date="2004-12-31") +@policy_function(end_date="2004-12-31", unit=Unit.DIMENSIONLESS) def ertragsanteil_betriebliche_altersvorsorge( alter_beginn_leistungsbezug_betriebliche_altersvorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -111,7 +119,7 @@ def ertragsanteil_betriebliche_altersvorsorge( ) -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=Unit.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..52492ac098 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_YEAR) def betrag_y( rente__steuerpflichtige_einnahmen_y: float, alle_weiteren_y: float, 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..4110a110b7 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/werbungskostenpauschale.yaml" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/werbungskostenpauschale.yaml" @@ -11,12 +11,12 @@ 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 + unit: EUR_PER_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..10b1dca81e 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..af1b98df9c 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py @@ -4,13 +4,14 @@ from gettsim.tt import ( AggType, + Unit, agg_by_p_id_function, param_function, policy_function, ) -@policy_function() +@policy_function(unit=Unit.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=Unit.CURRENCY.PER_YEAR) def kinderfreibetrag_pro_kind_y(parameter_kinderfreibetrag: dict[str, float]) -> float: return sum(parameter_kinderfreibetrag.values()) -@policy_function() +@policy_function(unit=Unit.PERSON_COUNT) 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=Unit.PERSON_COUNT) 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=Unit.PERSON_COUNT) 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=Unit.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=Unit.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..081feee74c 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml @@ -9,8 +9,7 @@ parameter_kinderfreibetrag: Betreuungs-, Erziehungs- oder Ausbildungsbedarf. Wird verdoppelt für gemeinsam veranlagte Paare. §32 (6) EStG. en: null - unit: Euros - reference_period: Year + unit: EUR_PER_YEAR type: dict 1983-01-01: sächliches_existenzminimum: 110 diff --git a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py index 8af18c339d..a068964922 100644 --- a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py +++ b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py @@ -2,17 +2,19 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, Unit, policy_function @policy_function( rounding_spec=RoundingSpec( + unit=Unit.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=Unit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -30,6 +32,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( @policy_function( rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_YEAR.PER_SN, base=36, direction="down", to_add_after_rounding=18, @@ -38,6 +41,7 @@ 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=Unit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -55,6 +59,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( @policy_function( rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_YEAR.PER_SN, base=27.609762, direction="down", to_add_after_rounding=13.804881, @@ -62,6 +67,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( ), end_date="2001-12-31", leaf_name="zu_versteuerndes_einkommen_y_sn", + unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_dmark_rundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -77,7 +83,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_dmark_rundungsregel( return out -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_YEAR.PER_SN) def zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn( gesamteinkommen_y: float, kinderfreibetrag_y_sn: float, From 8e989d3d9f2905ff29a2803942d1c106fa6eda5c Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 16/65] Annotate sozialversicherung with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the sozialversicherung namespace. Co-Authored-By: Claude Opus 4.8 --- .../arbeitslosen/anspruchsberechtigt.yaml | 14 +- .../arbeitslosen/arbeitslosengeld.py | 12 +- .../arbeitslosen/beitrag/beitrag.py | 47 ++- .../arbeitslosen/beitrag/beitragssatz.yaml | 3 +- .../arbeitslosen/betrag.yaml | 9 +- .../sozialversicherung/arbeitslosen/inputs.py | 12 +- .../sozialversicherung/beitr\303\244ge.py" | 8 +- .../kranken/beitrag/beitrag.py | 41 ++- .../beitrag/beitragsbemessungsgrenze.yaml | 6 +- .../kranken/beitrag/beitragssatz.py | 24 +- .../kranken/beitrag/beitragssatz.yaml | 6 +- .../kranken/beitrag/einkommen.py | 27 +- .../kranken/beitrag/inputs.py | 6 +- .../kranken/beitrag/minijob.yaml | 3 +- .../beitrag/selbstst\303\244ndige.yaml" | 9 +- .../germany/sozialversicherung/midijob.py | 16 +- .../germany/sozialversicherung/midijob.yaml | 3 +- .../sozialversicherung/mindestlohn.yaml | 3 +- .../germany/sozialversicherung/minijob.py | 8 +- .../germany/sozialversicherung/minijob.yaml | 11 +- .../pflege/beitrag/beitrag.py | 33 +- .../pflege/beitrag/beitragssatz.py | 28 +- .../pflege/beitrag/beitragssatz.yaml | 9 +- .../pflege/beitrag/inputs.py | 4 +- .../regul\303\244r_besch\303\244ftigt.py" | 14 +- .../rente/alter_bei_renteneintritt.py | 4 +- .../rente/altersrente/altersgrenzen.py | 24 +- .../rente/altersrente/altersrente.py | 11 +- .../altersgrenze.yaml" | 7 +- .../besonders_langj\303\244hrig.py" | 5 +- .../f\303\274r_frauen/altersgrenze.yaml" | 14 +- .../f\303\274r_frauen/anspruch.yaml" | 6 +- .../f\303\274r_frauen/f\303\274r_frauen.py" | 11 +- .../altersrente/f\303\274r_frauen/inputs.py" | 4 +- .../altersrente/hinzuverdienstgrenzen.py | 11 +- .../altersrente/hinzuverdienstgrenzen.yaml | 9 +- .../rente/altersrente/inputs.py | 4 +- .../langj\303\244hrig/altersgrenze.yaml" | 14 +- .../langj\303\244hrig/langj\303\244hrig.py" | 6 +- .../regelaltersrente/altersgrenze.yaml | 7 +- .../regelaltersrente/regelaltersrente.py | 6 +- .../wegen_arbeitslosigkeit/altersgrenze.yaml | 21 +- .../wegen_arbeitslosigkeit/anspruch.yaml | 3 +- .../wegen_arbeitslosigkeit/inputs.py | 10 +- .../wegen_arbeitslosigkeit.py | 21 +- .../rente/beitrag/beitrag.py | 43 ++- .../beitrag/beitragsbemessungsgrenze.yaml | 292 +++++++++--------- .../rente/beitrag/beitragssatz.yaml | 6 +- .../rente/beitrag/minijob.yaml | 3 +- .../rente/beitrag/rentenanpassungsformel.yaml | 15 +- .../sozialversicherung/rente/entgeltpunkte.py | 21 +- .../rente/entgeltpunkte.yaml | 162 +++++----- .../rente/erwerbsminderung/altersgrenze.yaml | 10 +- .../rente/erwerbsminderung/anspruch.yaml | 3 +- .../erwerbsminderung/erwerbsminderung.py | 53 +++- .../rente/erwerbsminderung/formel.yaml | 16 +- .../rente/erwerbsminderung/inputs.py | 6 +- .../rente/erwerbsminderung/wartezeit.yaml | 3 +- .../rente/grundrente/einkommen.yaml | 8 +- .../rente/grundrente/grundrente.py | 17 +- .../rente/grundrente/inputs.py | 18 +- .../rente/grundrente/rentenformel.yaml | 9 +- .../rente/grundrente/wartezeit.yaml | 3 +- .../sozialversicherung/rente/inputs.py | 40 +-- .../rente/rentenformel.yaml | 9 +- .../sozialversicherung/rente/wartezeit.py | 14 +- .../sozialversicherung/rente/wartezeit.yaml | 6 +- 67 files changed, 753 insertions(+), 558 deletions(-) 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..6c7e6fbc6e 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 ( + Unit, 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( arbeitssuchend: bool, monate_verbleibender_anspruchsdauer: int, @@ -105,7 +107,7 @@ def grundsätzlich_anspruchsberechtigt( ) -@policy_function() +@policy_function(unit=Unit.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..a1a283c4a7 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 Unit, 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..0eee662022 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml @@ -6,8 +6,7 @@ freibetrag_nebeneinkommen: description: de: § 155 SGB III, vorher § 141 (1) S. 1 en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 1999-08-01: value: 161 @@ -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..86aceb15f1 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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=Unit.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=Unit.DIMENSIONLESS) def arbeitssuchend() -> bool: """Looking for employment.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_durchgängigen_bezugs_von_arbeitslosengeld() -> int: """Number of months the individual already receives Arbeitslosengeld without interruption.""" -@policy_input() +@policy_input(unit=Unit.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..30731202ab 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 Unit, policy_function -@policy_function() +@policy_function(unit=Unit.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=Unit.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=Unit.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..6f85b3e997 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py @@ -2,12 +2,13 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( betrag_versicherter_regulärer_beitragssatz: float, @@ -17,7 +18,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=Unit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -41,7 +45,11 @@ def betrag_versicherter_m_ohne_midijob( 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=Unit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_rentner_m: float, @@ -71,6 +79,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", + unit=Unit.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=Unit.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=Unit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, sozialversicherung__in_gleitzone: bool, @@ -141,7 +155,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_MONTH) def betrag_versicherter_regulärer_beitragssatz( einkommen_m: float, beitragssatz_arbeitnehmer: 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..c6843c4813 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml @@ -11,8 +11,7 @@ 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 + unit: EUR_PER_MONTH type: scalar 1984-01-01: value: 1994 @@ -104,8 +103,7 @@ 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 + unit: EUR_PER_MONTH type: dict 1990-01-01: west: 2416 diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py index 33610ba2fc..296c159931 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 Unit, param_function, policy_function -@param_function(end_date="2005-06-30") +@param_function(end_date="2005-06-30", unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..f23c513618 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 Unit, 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..1f59d8b52a 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def privat_versichert() -> bool: """Has (only) a private health insurance contract.""" -@policy_input() +@policy_input(unit=Unit.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..5d1c8beade 100644 --- "a/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" +++ "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" @@ -6,8 +6,7 @@ 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 + unit: EUR_PER_MONTH type: scalar 1984-01-01: value: 1396 @@ -40,8 +39,7 @@ 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 + unit: EUR_PER_MONTH type: dict add_jahresanfang: true 1990-01-01: @@ -171,8 +169,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..9394154be0 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.py +++ b/src/gettsim/germany/sozialversicherung/midijob.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import param_function, policy_function +from gettsim.tt import Unit, param_function, policy_function -@policy_function(start_date="2003-04-01") +@policy_function(start_date="2003-04-01", unit=Unit.DIMENSIONLESS) def in_gleitzone( einnahmen__bruttolohn_m: float, geringfügig_beschäftigt: bool, @@ -22,7 +22,7 @@ def in_gleitzone( return (einnahmen__bruttolohn_m <= midijobgrenze) and (not geringfügig_beschäftigt) -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_MONTH) def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( einnahmen__bruttolohn_m: float, minijobgrenze: float, @@ -43,6 +43,7 @@ def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( start_date="2003-04-01", end_date="2004-12-31", leaf_name="midijob_faktor_f", + unit=Unit.DIMENSIONLESS, ) def midijob_faktor_f_mit_minijob_steuerpauschale_bis_2004( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -85,6 +86,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=Unit.DIMENSIONLESS, ) def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -126,6 +128,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=Unit.DIMENSIONLESS, ) def midijob_faktor_f_ohne_minijob_steuerpauschale( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -171,6 +174,7 @@ def midijob_faktor_f_ohne_minijob_steuerpauschale( start_date="2003-04-01", end_date="2022-09-30", leaf_name="midijob_bemessungsentgelt_m", + unit=Unit.CURRENCY.PER_MONTH, ) def midijob_bemessungsentgelt_m_bis_09_2022( einnahmen__bruttolohn_m: float, @@ -197,7 +201,11 @@ def midijob_bemessungsentgelt_m_bis_09_2022( 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=Unit.CURRENCY.PER_MONTH, +) def midijob_bemessungsentgelt_m_ab_10_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, diff --git a/src/gettsim/germany/sozialversicherung/midijob.yaml b/src/gettsim/germany/sozialversicherung/midijob.yaml index d98c5194a3..fa4bc67133 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.yaml +++ b/src/gettsim/germany/sozialversicherung/midijob.yaml @@ -6,8 +6,7 @@ midijobgrenze: 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..7f0b05b04a 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.py +++ b/src/gettsim/germany/sozialversicherung/minijob.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, Unit, policy_function -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def geringfügig_beschäftigt( einnahmen__bruttolohn_m: float, minijobgrenze: float, @@ -22,10 +22,12 @@ def geringfügig_beschäftigt( end_date="1999-12-31", leaf_name="minijobgrenze", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", ), + unit=Unit.CURRENCY.PER_MONTH, ) def minijobgrenze_unterscheidung_ost_west( wohnort_ost_hh: bool, @@ -46,10 +48,12 @@ def minijobgrenze_unterscheidung_ost_west( start_date="2022-10-01", leaf_name="minijobgrenze", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", ), + unit=Unit.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..dfcd266626 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/minijob.yaml @@ -6,8 +6,7 @@ minijobgrenze: description: de: Minijob § 8 (1) Nr. 1 SGB IV en: Minijob § 8 (1) Nr. 1 SGB IV - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 1984-01-01: value: 199 @@ -43,8 +42,7 @@ 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: EUR_PER_MONTH type: dict 1990-01-01: west: 240 @@ -89,8 +87,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..ca90f516fe 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py @@ -2,12 +2,13 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( betrag_versicherter_regulärer_beitragssatz: float, @@ -20,6 +21,7 @@ def betrag_versicherter_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -47,6 +49,7 @@ def betrag_versicherter_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_versicherter_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_mit_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -74,6 +77,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", + unit=Unit.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=Unit.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=Unit.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=Unit.CURRENCY.PER_MONTH) def betrag_selbstständig_m( sozialversicherung__kranken__beitrag__bemessungsgrundlage_selbstständig_m: float, beitragssatz_arbeitnehmer: float, @@ -151,7 +157,7 @@ def betrag_selbstständig_m( ) -@policy_function(start_date="1995-01-01") +@policy_function(start_date="1995-01-01", unit=Unit.CURRENCY.PER_MONTH) def betrag_versicherter_regulärer_beitragssatz( sozialversicherung__kranken__beitrag__einkommen_m: float, beitragssatz_arbeitnehmer: 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..47827d7b8c 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, + Unit, 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..5044a474f5 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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..a439fe6d7f 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,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, 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=Unit.DIMENSIONLESS, +) def regulär_beschäftigt_vor_midijob( einnahmen__bruttolohn_m: float, minijobgrenze: float, @@ -16,7 +20,11 @@ def regulär_beschäftigt_vor_midijob( return einnahmen__bruttolohn_m >= minijobgrenze -@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=Unit.DIMENSIONLESS, +) def regulär_beschäftigt_mit_midijob( einnahmen__bruttolohn_m: float, midijobgrenze: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py index 5c3b47afba..55e0f571a3 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 Unit, policy_function -@policy_function() +@policy_function(unit=Unit.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..3c61002c29 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 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS) def älter_als_regelaltersgrenze( alter_monate: int, sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py index 74f4e2980e..d2dc753d2c 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py @@ -2,17 +2,19 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, Unit, policy_function @policy_function( end_date="2020-12-31", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_m( bruttorente_m: float, @@ -24,11 +26,13 @@ def betrag_m( @policy_function( start_date="2021-01-01", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_m_mit_grundrente( bruttorente_m: float, @@ -47,6 +51,7 @@ def betrag_m_mit_grundrente( start_date="1992-01-01", end_date="2023-06-30", leaf_name="bruttorente_basisbetrag_m", + unit=Unit.CURRENCY.PER_MONTH, ) def bruttorente_basisbetrag_m_nach_wohnort( zugangsfaktor: float, @@ -78,7 +83,7 @@ def bruttorente_basisbetrag_m_nach_wohnort( return out -@policy_function(start_date="2023-07-01") +@policy_function(start_date="2023-07-01", unit=Unit.CURRENCY.PER_MONTH) def bruttorente_basisbetrag_m( zugangsfaktor: float, sozialversicherung__rente__entgeltpunkte: float, @@ -107,7 +112,7 @@ def bruttorente_basisbetrag_m( return out -@policy_function() +@policy_function(unit=Unit.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..e861b426ca 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, Unit, policy_function @policy_function( start_date="2014-06-23", end_date="2028-12-31", + unit=Unit.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=Unit.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..870473a44a 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,14 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function @policy_function( start_date="1989-12-18", end_date="2017-12-31", leaf_name="altersgrenze", + unit=Unit.YEARS, ) def altersgrenze_mit_staffelung( geburtsjahr: int, @@ -34,6 +35,7 @@ def altersgrenze_mit_staffelung( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", + unit=Unit.YEARS, ) def altersgrenze_vorzeitig_mit_staffelung( geburtsjahr: int, @@ -50,7 +52,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=Unit.DIMENSIONLESS, +) def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( weiblich: bool, sozialversicherung__rente__wartezeit_15_jahre_erfüllt: bool, @@ -75,6 +81,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=Unit.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..96bf74e668 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 Unit, policy_input -@policy_input(end_date="2017-12-31") +@policy_input(end_date="2017-12-31", unit=Unit.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..1531ff405c 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py @@ -1,16 +1,18 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, policy_function +from gettsim.tt import RoundingSpec, Unit, policy_function @policy_function( end_date="2017-06-30", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="bruttorente_m", + unit=Unit.CURRENCY.PER_MONTH, ) def bruttorente_m_mit_harter_hinzuverdienstgrenze( alter: int, @@ -40,10 +42,12 @@ def bruttorente_m_mit_harter_hinzuverdienstgrenze( end_date="2022-12-31", leaf_name="bruttorente_m", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), + unit=Unit.CURRENCY.PER_MONTH, ) def bruttorente_m_mit_hinzuverdienstdeckel( alter: int, @@ -77,6 +81,7 @@ def bruttorente_m_mit_hinzuverdienstdeckel( @policy_function( start_date="2017-07-01", end_date="2022-12-31", + unit=Unit.CURRENCY.PER_MONTH, ) def zahlbetrag_ohne_deckel_m( einnahmen__bruttolohn_m: float, @@ -110,6 +115,7 @@ def zahlbetrag_ohne_deckel_m( @policy_function( start_date="2017-07-01", end_date="2022-12-31", + unit=Unit.CURRENCY.PER_MONTH, ) def differenz_bruttolohn_hinzuverdienstgrenze_m( einnahmen__bruttolohn_m: float, @@ -125,6 +131,7 @@ def differenz_bruttolohn_hinzuverdienstgrenze_m( @policy_function( start_date="2017-07-01", end_date="2022-12-31", + unit=Unit.CURRENCY.PER_MONTH, ) def differenz_bruttolohn_hinzuverdienstdeckel_m( einnahmen__bruttolohn_m: float, @@ -144,10 +151,12 @@ def differenz_bruttolohn_hinzuverdienstdeckel_m( start_date="2023-01-01", leaf_name="bruttorente_m", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), + unit=Unit.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..f8f428a9ea 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 Unit, policy_input -@policy_input(end_date="2022-12-31") +@policy_input(end_date="2022-12-31", unit=Unit.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..f0791a97dd 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,13 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function @policy_function( start_date="1989-12-18", leaf_name="altersgrenze", + unit=Unit.YEARS, ) def altersgrenze_gestaffelt_ab_1989( geburtsjahr: int, @@ -34,6 +35,7 @@ def altersgrenze_gestaffelt_ab_1989( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", + unit=Unit.YEARS, ) def altersgrenze_vorzeitig_gestaffelt_ab_1989_bis_1996( geburtsjahr: int, @@ -46,7 +48,7 @@ def altersgrenze_vorzeitig_gestaffelt_ab_1989_bis_1996( return altersgrenze_vorzeitig_gestaffelt.look_up(geburtsjahr) -@policy_function() +@policy_function(unit=Unit.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..b00fb03826 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, Unit, 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=Unit.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=Unit.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..acf4c9fdc8 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,27 @@ from __future__ import annotations -from gettsim.tt import policy_input +from gettsim.tt import Unit, policy_input -@policy_input(end_date="2017-12-31") +@policy_input(end_date="2017-12-31", unit=Unit.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=Unit.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=Unit.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=Unit.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..f4be3cebbb 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,14 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function @policy_function( start_date="1989-12-18", end_date="1996-07-28", leaf_name="altersgrenze", + unit=Unit.YEARS, ) def altersgrenze_bis_1996( geburtsjahr: int, @@ -37,6 +38,7 @@ def altersgrenze_bis_1996( start_date="1996-07-29", end_date="2009-12-31", leaf_name="altersgrenze", + unit=Unit.YEARS, ) def altersgrenze_mit_vertrauensschutzprüfung( vertrauensschutz_1997: bool, @@ -60,6 +62,7 @@ def altersgrenze_mit_vertrauensschutzprüfung( start_date="2010-01-01", end_date="2017-12-31", leaf_name="altersgrenze", + unit=Unit.YEARS, ) def altersgrenze_ab_2010( altersgrenze_ohne_vertrauensschutz: float, @@ -78,6 +81,7 @@ def altersgrenze_ab_2010( start_date="1989-12-18", end_date="1996-07-28", leaf_name="altersgrenze_vorzeitig", + unit=Unit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( geburtsjahr: int, @@ -97,6 +101,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( start_date="1996-07-29", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", + unit=Unit.YEARS, ) def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_1996_bis_09_1996( vertrauensschutz_1997: bool, @@ -119,6 +124,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=Unit.YEARS, ) def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_2004( vertrauensschutz_2004: bool, @@ -139,7 +145,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=Unit.YEARS) def altersgrenze_ohne_vertrauensschutz( geburtsjahr: int, geburtsmonat: int, @@ -156,7 +162,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=Unit.YEARS) def altersgrenze_mit_vertrauensschutz( geburtsjahr: int, geburtsmonat: int, @@ -172,6 +178,7 @@ def altersgrenze_mit_vertrauensschutz( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig_ohne_vertrauensschutz", + unit=Unit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( geburtsjahr: int, @@ -193,6 +200,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=Unit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( geburtsjahr: int, @@ -210,7 +218,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=Unit.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 +247,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=Unit.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..526c11d089 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py @@ -2,10 +2,14 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, 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=Unit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_bis_03_1999( betrag_versicherter_regulärer_beitragssatz: float, ) -> float: @@ -14,7 +18,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=Unit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -33,7 +40,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=Unit.CURRENCY.PER_MONTH, +) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_in_gleitzone_arbeitnehmer_m: float, @@ -57,7 +68,7 @@ def betrag_versicherter_m_mit_midijob( return out -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_MONTH) def betrag_versicherter_regulärer_beitragssatz( einkommen_m: float, beitragssatz: float, @@ -69,6 +80,7 @@ def betrag_versicherter_regulärer_beitragssatz( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_arbeitgeberpauschale( betrag_versicherter_regulärer_beitragssatz: float, @@ -84,6 +96,7 @@ def betrag_arbeitgeber_m_ohne_arbeitgeberpauschale( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( sozialversicherung__geringfügig_beschäftigt: bool, @@ -104,7 +117,11 @@ def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( 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=Unit.CURRENCY.PER_MONTH, +) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, betrag_in_gleitzone_arbeitgeber_m: float, @@ -127,7 +144,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function() +@policy_function(unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..77c3be8ceb 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml @@ -10,147 +10,146 @@ beitragsbemessungsgrenze_y: en: >- Maximum amount of income subject to statutory pension insurance contributions (Anlage 2 SGB VI). - unit: Euros - reference_period: Year + unit: EUR_PER_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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1960-01-01: value: 10200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1961-01-01: value: 10800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1962-01-01: value: 11400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1963-01-01: value: 12000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 13200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 14400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 15600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 16800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 19200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 20400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 21600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 22800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 25200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 27600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 30000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 33600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 37200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 40800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 44400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 48000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 50400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 52800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 56400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 60000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 62400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 64800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 67200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 68400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 72000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1989-01-01: value: 73200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1990-01-01: note: >- @@ -158,11 +157,11 @@ 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 + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -177,8 +176,7 @@ 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 + unit: EUR_PER_MONTH type: dict 1990-01-01: west: 3221 @@ -308,142 +306,141 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: en: >- Maximum amount of income subject to statutory miners' pension insurance contributions (West). - unit: Euros - reference_period: Year + unit: EUR_PER_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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 16800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 18000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 19200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 20400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 22800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 24000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 25200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 27600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 30000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 33600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 37200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 40800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 45600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 50400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 55200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 57600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 61200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 64800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 69600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 73200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 76800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 80400 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 82800 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 85200 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 87600 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1989-01-01: value: 90000 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1990-01-01: value: 93600 - unit: DM + unit: DM_PER_YEAR 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 +448,163 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: Sozialversicherungs-Rechengrößenverordnung 1992 ergänzt. 1991-01-01: value: 96000 - unit: DM + unit: DM_PER_YEAR reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 1992-01-01: value: 100800 - unit: DM + unit: DM_PER_YEAR reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 1993-01-01: value: 106800 - unit: DM + unit: DM_PER_YEAR reference: V. v. 22.12.1992 BGBl. I S. 2474 1994-01-01: value: 112800 - unit: DM + unit: DM_PER_YEAR reference: V. v. 01.12.1993 BGBl. I S. 1987 1995-01-01: value: 115200 - unit: DM + unit: DM_PER_YEAR reference: V. v. 12.12.1994 BGBl. I S. 3806 1996-01-01: value: 117600 - unit: DM + unit: DM_PER_YEAR reference: V. v. 04.12.1995 BGBl. I S. 1577 1997-01-01: value: 121200 - unit: DM + unit: DM_PER_YEAR reference: V. v. 11.12.1996 BGBl. I S. 1870 1998-01-01: value: 123600 - unit: DM + unit: DM_PER_YEAR reference: V. v. 02.12.1997 BGBl. I S. 2782 1999-01-01: value: 124800 - unit: DM + unit: DM_PER_YEAR reference: V. v. 18.12.1998 BGBl. I S. 3823 2000-01-01: value: 127200 - unit: DM + unit: DM_PER_YEAR reference: V. v. 29.11.1999 BGBl. I S. 2375 2001-01-01: value: 128400 - unit: DM + unit: DM_PER_YEAR 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 + unit: EUR_PER_YEAR reference: V. v. 17.12.2002 BGBl. I S. 4561 2004-01-01: value: 76200 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 09.12.2003 BGBl. I S. 2497 2005-01-01: value: 76800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 29.11.2004 BGBl. I S. 3098 2006-01-01: value: 77400 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 21.12.2005 BGBl. I S. 3627 2007-01-01: value: 77400 - unit: Euros + unit: EUR_PER_YEAR reference: G. v. 02.12.2006 BGBl. I S. 2742 2008-01-01: value: 78600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 05.12.2007 BGBl. I S. 2797 2009-01-01: value: 79800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 02.12.2008 BGBl. I S. 2336 2010-01-01: value: 81600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 07.12.2009 BGBl. I S. 3846 2011-01-01: value: 81000 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 03.12.2010 BGBl. I S. 1761 2012-01-01: value: 82800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 02.12.2011 BGBl. I S. 2421 2013-01-01: value: 85200 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 26.11.2012 BGBl. I S. 2361 2014-01-01: value: 87600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 02.12.2013 BGBl. I S. 4038 2015-01-01: value: 89400 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2015 vom 1. Dezember 2014 BGBl. I S. 1957 2016-01-01: value: 91800 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2016 vom 30. November 2015 BGBl. I S. 2137 2017-01-01: value: 94200 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2017 vom 28. November 2016 BGBl. I S. 2665 2018-01-01: value: 96000 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2018 vom 16. November 2017 BGBl. I S. 3778 2019-01-01: value: 98400 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2019 vom 27. November 2018 BGBl. I S. 2024 2020-01-01: value: 101400 - unit: Euros + unit: EUR_PER_YEAR reference: Art. 3 V. v. 17.12.2019 BGBl I S. 2848. 2021-01-01: value: 104400 - unit: Euros + unit: EUR_PER_YEAR reference: §3 V. v. 30.11.2020 BGBl. I S. 2612. 2022-01-01: value: 103800 - unit: Euros + unit: EUR_PER_YEAR reference: §3 V. v. 30.11.2021, BGBl. I S. 5044. 2023-01-01: value: 107400 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2023 vom 28. November 2022 BGBl. I S. 2128 2024-01-01: value: 111600 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2024 vom 24. November 2023 BGBl. 2023 I Nr. 322 2025-01-01: value: 118800 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2025 vom 25. November 2024 BGBl. 2024 I Nr. 365 2026-01-01: value: 124800 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -624,167 +621,166 @@ 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 + unit: EUR_PER_YEAR type: scalar 1990-01-01: value: 32400 - unit: DM + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR 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 + unit: DM_PER_YEAR reference: § 2 V. v. 19.12.1991 BGBl. I S. 2344 (3. Rentenanpassungsverordnung) 1993-01-01: value: 78000 - unit: DM + unit: DM_PER_YEAR reference: V. v. 22.12.1992 BGBl. I S. 2474 1994-01-01: value: 87600 - unit: DM + unit: DM_PER_YEAR reference: V. v. 01.12.1993 BGBl. I S. 1987 1995-01-01: value: 93600 - unit: DM + unit: DM_PER_YEAR reference: V. v. 12.12.1994 BGBl. I S. 3806 1996-01-01: value: 100800 - unit: DM + unit: DM_PER_YEAR reference: V. v. 04.12.1995 BGBl. I S. 1577 1997-01-01: value: 104400 - unit: DM + unit: DM_PER_YEAR reference: V. v. 11.12.1996 BGBl. I S. 1870 1998-01-01: value: 103200 - unit: DM + unit: DM_PER_YEAR reference: V. v. 02.12.1997 BGBl. I S. 2782 1999-01-01: value: 105600 - unit: DM + unit: DM_PER_YEAR reference: V. v. 18.12.1998 BGBl. I S. 3823 2000-01-01: value: 104400 - unit: DM + unit: DM_PER_YEAR reference: V. v. 29.11.1999 BGBl. I S. 2375 2001-01-01: value: 108000 - unit: DM + unit: DM_PER_YEAR 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 + unit: EUR_PER_YEAR reference: V. v. 17.12.2002 BGBl. I S. 4561 2004-01-01: value: 64200 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 09.12.2003 BGBl. I S. 2497 2005-01-01: value: 64800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 29.11.2004 BGBl. I S. 3098 2006-01-01: value: 64800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 21.12.2005 BGBl. I S. 3627 2007-01-01: value: 66600 - unit: Euros + unit: EUR_PER_YEAR reference: G. v. 02.12.2006 BGBl. I S. 2742 2008-01-01: value: 66600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 05.12.2007 BGBl. I S. 2797 2009-01-01: value: 67200 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 02.12.2008 BGBl. I S. 2336 2010-01-01: value: 68400 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 07.12.2009 BGBl. I S. 3846 2011-01-01: value: 70800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 03.12.2010 BGBl. I S. 1761 2012-01-01: value: 70800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 02.12.2011 BGBl. I S. 2421 2013-01-01: value: 72600 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 26.11.2012 BGBl. I S. 2361 2014-01-01: value: 73800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 02.12.2013 BGBl. I S. 4038 2015-01-01: value: 76200 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2015 vom 1. Dezember 2014 BGBl. I S. 1957 2016-01-01: value: 79800 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2016 vom 30. November 2015 BGBl. I S. 2137 2017-01-01: value: 84000 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2017 vom 28. November 2016 BGBl. I S. 2665 2018-01-01: value: 85800 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2018 vom 16. November 2017 BGBl. I S. 3778 2019-01-01: value: 91200 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2019 vom 27. November 2018 BGBl. I S. 2024 2020-01-01: value: 94800 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 17.12.2019 BGBl. I S. 2848 2021-01-01: value: 99000 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 30.11.2020 BGBl. I S. 2612 2022-01-01: value: 100200 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 30.11.2021 BGBl. I S. 5044 2023-01-01: value: 104400 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2023 vom 28. November 2022 BGBl. I S. 2128 2024-01-01: value: 110400 - unit: Euros + unit: EUR_PER_YEAR 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..24f51ad80f 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,8 +53,7 @@ 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 + unit: EUR_PER_YEAR type: scalar 1991-01-01: value: 108688000 @@ -123,8 +120,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,8 +153,7 @@ 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 diff --git a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py index 34260445bb..ffb9b04ebd 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 Unit, 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=Unit.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=Unit.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", + unit=Unit.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..7b3e3e2407 100644 --- a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml @@ -10,168 +10,167 @@ 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 + unit: EUR_PER_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 + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1951-01-01: value: 3579 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1952-01-01: value: 3852 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1953-01-01: value: 4061 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1954-01-01: value: 4234 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1955-01-01: value: 4548 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1956-01-01: value: 4844 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1957-01-01: value: 5043 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1958-01-01: value: 5330 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1959-01-01: value: 5602 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1960-01-01: value: 6101 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1961-01-01: value: 6723 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1962-01-01: value: 7328 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1963-01-01: value: 7775 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 8467 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 9229 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 9893 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 10219 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 10842 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 11839 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 13343 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 14931 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 16335 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 18295 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 20381 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 21808 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 23335 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 24945 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 26242 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 27685 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 29485 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 30900 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 32198 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 33293 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 34292 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 35286 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 36627 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 37726 - unit: DM + unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 38896 - unit: DM + unit: DM_PER_YEAR 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 +178,145 @@ beitragspflichtiges_durchschnittsentgelt_y: Sozialversicherungs-Rechengrößenverordnung 1992 ergänzt. 1989-01-01: value: 40063 - unit: DM + unit: DM_PER_YEAR reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 1990-01-01: value: 41946 - unit: DM + unit: DM_PER_YEAR reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 1991-01-01: value: 44421 - unit: DM + unit: DM_PER_YEAR reference: V. v. 22.12.1992 BGBl. I S. 2474 1992-01-01: value: 46820 - unit: DM + unit: DM_PER_YEAR reference: V. v. 01.12.1993 BGBl. I S. 1987 1993-01-01: value: 48178 - unit: DM + unit: DM_PER_YEAR reference: V. v. 12.12.1994 BGBl. I S. 3806 1994-01-01: value: 49142 - unit: DM + unit: DM_PER_YEAR reference: V. v. 04.12.1995 BGBl. I S. 1577 1995-01-01: value: 50665 - unit: DM + unit: DM_PER_YEAR reference: V. v. 11.12.1996 BGBl. I S. 1870 1996-01-01: value: 51678 - unit: DM + unit: DM_PER_YEAR reference: V. v. 02.12.1997 BGBl. I S. 2782 1997-01-01: value: 52143 - unit: DM + unit: DM_PER_YEAR reference: V. v. 18.12.1998 BGBl. I S. 3823 1998-01-01: value: 52925 - unit: DM + unit: DM_PER_YEAR reference: V. v. 29.11.1999 BGBl. I S. 2375 1999-01-01: value: 53507 - unit: DM + unit: DM_PER_YEAR reference: V. v. 13.12.2000 BGBl. I S. 1710 2000-01-01: value: 54256 - unit: DM + unit: DM_PER_YEAR reference: V. v. 03.12.2001 BGBl. I S. 3302 2001-01-01: value: 55216 - unit: DM + unit: DM_PER_YEAR 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 + unit: EUR_PER_YEAR reference: V. v. 29.11.2004 BGBl. I S. 3098 2004-01-01: value: 29060 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 21.12.2005 BGBl. I S. 3627 2005-01-01: value: 29202 - unit: Euros + unit: EUR_PER_YEAR 2006-01-01: value: 29494 - unit: Euros + unit: EUR_PER_YEAR 2007-01-01: value: 29951 - unit: Euros + unit: EUR_PER_YEAR 2008-01-01: value: 30625 - unit: Euros + unit: EUR_PER_YEAR 2009-01-01: value: 30506 - unit: Euros + unit: EUR_PER_YEAR 2010-01-01: value: 31144 - unit: Euros + unit: EUR_PER_YEAR 2011-01-01: value: 32100 - unit: Euros + unit: EUR_PER_YEAR 2012-01-01: value: 33002 - unit: Euros + unit: EUR_PER_YEAR 2013-01-01: value: 33659 - unit: Euros + unit: EUR_PER_YEAR 2014-01-01: value: 34514 - unit: Euros + unit: EUR_PER_YEAR 2015-01-01: value: 35363 - unit: Euros + unit: EUR_PER_YEAR 2016-01-01: value: 36187 - unit: Euros + unit: EUR_PER_YEAR 2017-01-01: value: 37077 - unit: Euros + unit: EUR_PER_YEAR 2018-01-01: value: 38212 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 17.12.2019 BGBl. I S. 2848. 2019-01-01: value: 39301 - unit: Euros + unit: EUR_PER_YEAR reference: V. v. 30.11.2020 BGBl. I S. 2612. 2020-01-01: value: 39167 - unit: Euros + unit: EUR_PER_YEAR reference: §1 V. v. 30.11.2021, BGBl. I S. 5044. 2021-01-01: value: 40463 - unit: Euros + unit: EUR_PER_YEAR reference: §3 V. v. 28.11.2022 BGBl. I S. 2128 (Nr. 47). 2022-01-01: value: 42053 - unit: Euros + unit: EUR_PER_YEAR reference: §3 V. v. 24.11.2023 BGBl. 2023 I Nr. 322 2023-01-01: value: 44732 - unit: Euros + unit: EUR_PER_YEAR reference: §3 V. v. 25.11.2024 BGBl. 2024 I Nr. 365. 2024-01-01: value: 47085 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 2025-01-01: value: 50493 - unit: Euros + unit: EUR_PER_YEAR reference: §3 V. v. 25.11.2024 BGBl. 2024 I Nr. 365. note: Vorläufiges Durchschnittsentgelt 2026-01-01: value: 51944 - unit: Euros + unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -335,8 +334,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..49954c7214 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 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=Unit.CURRENCY.PER_MONTH, +) def betrag_m_nach_wohnort( zugangsfaktor: float, entgeltpunkte_west: float, @@ -44,7 +49,9 @@ 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=Unit.CURRENCY.PER_MONTH +) def betrag_m_einheitlich( zugangsfaktor: float, entgeltpunkte: float, @@ -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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_bis_06_2014( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS.PER_YEAR, ) def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( sozialversicherung__rente__entgeltpunkte_west: float, @@ -417,7 +438,9 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( @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=Unit.DIMENSIONLESS.PER_YEAR, ) def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( sozialversicherung__rente__entgeltpunkte: float, 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..b68195d64c 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.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=Unit.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..95dfd37651 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, + Unit, piecewise_polynomial, policy_function, ) @@ -15,11 +16,13 @@ @policy_function( rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=Unit.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=Unit.CURRENCY.PER_MONTH) def einkommen_m( gesamteinnahmen_aus_renten_vorjahr_m: float, bruttolohn_vorjahr_m: float, @@ -78,11 +81,13 @@ def _anzurechnendes_einkommen_m( @policy_function( rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=Unit.CURRENCY.PER_MONTH, ) def anzurechnendes_einkommen_m( einkommen_m_ehe: float, @@ -124,11 +129,13 @@ def anzurechnendes_einkommen_m( @policy_function( rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=Unit.CURRENCY.PER_MONTH, ) def basisbetrag_m( mean_entgeltpunkte_zuschlag: float, @@ -160,7 +167,7 @@ def basisbetrag_m( ) -@policy_function(start_date="2021-01-01") +@policy_function(start_date="2021-01-01", unit=Unit.DIMENSIONLESS.PER_MONTH) def mean_entgeltpunkte_pro_bewertungsmonat( mean_entgeltpunkte: float, bewertungszeiten_monate: int, @@ -183,6 +190,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat( reference="§76g SGB VI Abs. 4 Nr. 4", ), start_date="2021-01-01", + unit=Unit.DIMENSIONLESS.PER_MONTH, ) def höchstbetrag_m( grundrentenzeiten_monate: int, @@ -211,6 +219,7 @@ def höchstbetrag_m( reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", + unit=Unit.DIMENSIONLESS.PER_MONTH, ) def mean_entgeltpunkte_zuschlag( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -248,7 +257,7 @@ def mean_entgeltpunkte_zuschlag( return out * bonusfaktor -@policy_function(start_date="2021-01-01") +@policy_function(start_date="2021-01-01", unit=Unit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( grundrentenzeiten_monate: int, berücksichtigte_wartezeit_monate: dict[str, int], @@ -257,7 +266,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=Unit.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..cf9756db19 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 Unit, policy_input -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=Unit.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=Unit.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=Unit.DIMENSIONLESS) def mean_entgeltpunkte() -> float: """Mean Entgeltpunkte during Bewertungszeiten.""" -@policy_input(start_date="2021-01-01") +@policy_input(start_date="2021-01-01", unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..4bff409aee 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml @@ -12,8 +12,7 @@ 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: DIMENSIONLESS type: dict 2021-01-01: base: 0.0334 @@ -25,8 +24,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 +41,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..d7b2cd9563 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def bezieht_rente() -> bool: """Draws public pension benefits.""" -@policy_input(end_date="2023-06-30") +@policy_input(end_date="2023-06-30", unit=Unit.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=Unit.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=Unit.DIMENSIONLESS) def entgeltpunkte() -> float: """Earnings points for public pension claim.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def ersatzzeiten_monate() -> float: """Total months during military, persecution/escape, internment, and consecutive sickness. """ -@policy_input() +@policy_input(unit=Unit.MONTHS) def freiwillige_beitragsmonate() -> float: """Total months of voluntary pensioninsurance contributions.""" -@policy_input() +@policy_input(unit=Unit.CALENDAR_YEAR) def jahr_renteneintritt() -> int: """Year of pension claiming.""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def monat_renteneintritt() -> int: """Month of retirement.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def kinderberücksichtigungszeiten_monate() -> float: """Total months of childcare till age 10.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def krankheitszeiten_ab_16_bis_24_monate() -> float: """Total months of sickness between age 16 and 24.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_geringfügiger_beschäftigung() -> float: """Total months of marginal employment (w/o mandatory contributions).""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_in_arbeitslosigkeit() -> float: """Total months of unemployment (registered).""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_in_arbeitsunfähigkeit() -> float: """Total months of sickness, rehabilitation, measures for worklife participation(Teilhabe). """ -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_in_ausbildungssuche() -> float: """Total months of apprenticeship search.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_in_mutterschutz() -> float: """Total months of maternal protections.""" -@policy_input() +@policy_input(unit=Unit.MONTHS) def monate_in_schulausbildung() -> float: """Months of schooling (incl college, unifrom age 17, max. 8 years).""" -@policy_input() +@policy_input(unit=Unit.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=Unit.MONTHS) def pflichtbeitragsmonate() -> float: """Total months of mandatory pension insurance contributions.""" -@policy_input() +@policy_input(unit=Unit.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..45f1066dd2 100644 --- a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml @@ -14,8 +14,7 @@ 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: DIMENSIONLESS_PER_YEAR type: dict 2001-01-01: vorzeitiger_renteneintritt: 0.036 @@ -33,8 +32,7 @@ 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 + unit: EUR_PER_MONTH type: dict 1992-01-01: west: 21.19 @@ -147,8 +145,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..de0b025ef3 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 Unit, policy_function -@policy_function() +@policy_function(unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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 From f2e0cf3bd077517177ece68469879d97b746d1fb Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 17/65] Annotate arbeitslosengeld_2 with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the arbeitslosengeld_2 namespace. Co-Authored-By: Claude Opus 4.8 --- .../arbeitslosengeld_2/arbeitslosengeld_2.py | 22 +++++++--- .../germany/arbeitslosengeld_2/bedarfe.yaml | 25 ++++++++--- .../germany/arbeitslosengeld_2/einkommen.py | 26 +++++++++--- .../freibetr\303\244ge.yaml" | 25 +++++------ .../freibetr\303\244ge_verm\303\266gen.py" | 7 ++-- .../germany/arbeitslosengeld_2/inputs.py | 3 +- .../kindergeld\303\274bertrag.py" | 13 +++++- .../kosten_der_unterkunft.yaml | 15 ++++--- .../germany/arbeitslosengeld_2/regelbedarf.py | 42 ++++++++++++++----- 9 files changed, 124 insertions(+), 54 deletions(-) diff --git a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py index aab1e52316..7dea284a23 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 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=Unit.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=Unit.CURRENCY.PER_MONTH +) def anspruchshöhe_m( ungedeckter_bedarf_m: float, ungedeckter_bedarf_m_bg: float, @@ -55,7 +59,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=Unit.CURRENCY.PER_MONTH +) def ungedeckter_bedarf_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -79,7 +85,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=Unit.CURRENCY.PER_MONTH +) def einkommen_zur_verteilung_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -104,7 +112,9 @@ def einkommen_zur_verteilung_m( return 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=Unit.CURRENCY.PER_MONTH +) def überschusseinkommen_m( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, diff --git a/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml b/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml index 05811baf5a..ff44cded67 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,8 +111,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 2022-07-01: value: 20 @@ -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..b397301a44 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, + Unit, 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.DIMENSIONLESS +) def nettoquote( einnahmen__bruttolohn_m: float, einkommensteuer__betrag_m_sn: float, @@ -123,6 +134,7 @@ def nettoquote( start_date="2005-01-01", end_date="2005-09-30", leaf_name="anrechnungsfreies_einkommen_m", + unit=Unit.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=Unit.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..d846a46f7e 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 Unit, policy_function if TYPE_CHECKING: from gettsim.tt import ConsecutiveIntLookupTableParamValue @@ -12,7 +12,7 @@ # 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=Unit.CURRENCY) def grundfreibetrag_vermögen( familie__ist_kind_in_bedarfsgemeinschaft: bool, alter: int, @@ -30,7 +30,7 @@ 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=Unit.CURRENCY) def maximaler_grundfreibetrag_vermögen( geburtsjahr: int, familie__ist_kind_in_bedarfsgemeinschaft: bool, @@ -46,6 +46,7 @@ def maximaler_grundfreibetrag_vermögen( @policy_function( start_date="2005-01-01", end_date="2022-12-31", + unit=Unit.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..7ea2e84273 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, Unit, policy_input @policy_input( start_date="2005-01-01", end_date="2022-12-31", foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, + unit=Unit.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..8efb877571 100644 --- "a/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" +++ "b/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" @@ -6,6 +6,7 @@ from gettsim.tt import ( AggType, + Unit, agg_by_p_id_function, join, policy_function, @@ -18,7 +19,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=Unit.CURRENCY.PER_MONTH, ) def kindergeldübertrag_m( differenz_kindergeld_kindbedarf_m: float, @@ -32,6 +36,7 @@ def kindergeldübertrag_m( start_date="2005-01-01", end_date="2022-12-31", leaf_name="kindergeld_pro_kind_m", + unit=Unit.CURRENCY.PER_MONTH, ) def _mean_kindergeld_per_child_gestaffelt_m( kindergeld__betrag_m: float, @@ -54,6 +59,7 @@ def _mean_kindergeld_per_child_gestaffelt_m( start_date="2005-01-01", end_date="2022-12-31", vectorization_strategy="not_required", + unit=Unit.CURRENCY.PER_MONTH, ) def kindergeld_zur_bedarfsdeckung_m( kindergeld_pro_kind_m: FloatColumn, @@ -80,7 +86,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=Unit.CURRENCY.PER_MONTH +) def differenz_kindergeld_kindbedarf_m( regelbedarf_m_bg: float, nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -124,6 +132,7 @@ def differenz_kindergeld_kindbedarf_m( start_date="2005-01-01", end_date="2022-12-31", vectorization_strategy="not_required", + unit=Unit.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..cc0aaeed65 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml +++ b/src/gettsim/germany/arbeitslosengeld_2/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 1984-01-01: value: 10 @@ -40,8 +39,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 2005-01-01: single: 45 @@ -59,8 +57,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..dcedd8a39f 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py +++ b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py @@ -6,7 +6,9 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, ConsecutiveIntLookupTableParamValue, + Unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -19,7 +21,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=Unit.CURRENCY.PER_MONTH +) def regelbedarf_m( regelsatz_m: float, kosten_der_unterkunft_m: float, @@ -31,7 +35,9 @@ def regelbedarf_m( return regelsatz_m + kosten_der_unterkunft_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=Unit.DIMENSIONLESS +) def mehrbedarf_alleinerziehend_m( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, @@ -74,6 +80,7 @@ def mehrbedarf_alleinerziehend_m( start_date="2005-01-01", end_date="2010-12-31", leaf_name="kindersatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def kindersatz_m_anteilsbasiert( alter: int, @@ -116,6 +123,7 @@ def kindersatz_m_anteilsbasiert( start_date="2011-01-01", end_date="2022-06-30", leaf_name="kindersatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_ohne_sofortzuschlag( alter: int, @@ -156,6 +164,7 @@ def kindersatz_m_nach_regelbedarfsstufen_ohne_sofortzuschlag( start_date="2022-07-01", end_date="2022-12-31", leaf_name="kindersatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( alter: int, @@ -194,6 +203,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( start_date="2005-01-01", end_date="2010-12-31", leaf_name="erwachsenensatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_bis_2010( mehrbedarf_alleinerziehend_m: float, @@ -220,6 +230,7 @@ def erwachsenensatz_m_bis_2010( start_date="2011-01-01", end_date="2022-12-31", leaf_name="erwachsenensatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( mehrbedarf_alleinerziehend_m: float, @@ -240,7 +251,9 @@ def erwachsenensatz_m_ab_2011( return out * (1 + mehrbedarf_alleinerziehend_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=Unit.CURRENCY.PER_MONTH +) def regelsatz_m( erwachsenensatz_m: float, kindersatz_m: float, @@ -253,6 +266,7 @@ def regelsatz_m( start_date="2005-01-01", end_date="2022-12-31", leaf_name="kosten_der_unterkunft_m", + unit=Unit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_bis_2022( berechtigte_wohnfläche: float, @@ -262,7 +276,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=Unit.CURRENCY.PER_SQUARE_METER.PER_MONTH, +) def anerkannte_warmmiete_je_qm_m( bruttokaltmiete_m: float, heizkosten_m: float, @@ -274,7 +292,7 @@ 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=Unit.SQUARE_METER) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, @@ -294,7 +312,9 @@ def berechtigte_wohnfläche( 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=Unit.CURRENCY.PER_MONTH +) def bruttokaltmiete_m( wohnen__bruttokaltmiete_m_hh: float, anzahl_personen_hh: int, @@ -308,7 +328,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=Unit.CURRENCY.PER_MONTH +) def heizkosten_m( wohnen__heizkosten_m_hh: float, anzahl_personen_hh: int, @@ -322,7 +344,7 @@ 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=Unit.SQUARE_METER) def wohnfläche( wohnen__wohnfläche_hh: float, anzahl_personen_hh: int, @@ -358,7 +380,7 @@ class RegelsatzAnteilsbasiert: 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 +422,7 @@ 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=UNSET_UNIT) def berechtigte_wohnfläche_eigentum( parameter_berechtigte_wohnfläche_eigentum: RawParamValue, wohngeld__max_anzahl_personen: dict[str, int], From f757027ed58c6ad1a522ce283ac0b160b36e8a7a Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:03 +0200 Subject: [PATCH 18/65] =?UTF-8?q?Annotate=20b=C3=BCrgergeld=20with=20GEP-1?= =?UTF-8?q?0=20units=20(#1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the bürgergeld namespace. Co-Authored-By: Claude Opus 4.8 --- .../germany/b\303\274rgergeld/bedarfe.yaml" | 6 ++--- .../b\303\274rgergeld/b\303\274rgergeld.py" | 12 +++++----- .../germany/b\303\274rgergeld/einkommen.py" | 11 +++++---- .../freibetr\303\244ge.yaml" | 11 ++++----- .../freibetr\303\244ge_verm\303\266gen.py" | 10 +++++--- .../germany/b\303\274rgergeld/inputs.py" | 10 +++++--- .../kindergeld\303\274bertrag.py" | 20 ++++++++++++---- .../kosten_der_unterkunft.yaml" | 15 +++++++----- .../germany/b\303\274rgergeld/regelbedarf.py" | 23 +++++++++++-------- 9 files changed, 72 insertions(+), 46 deletions(-) diff --git "a/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" "b/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" index 35b93197b7..ef87dee265 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 @@ -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..c5a45d23ba 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 Unit, policy_function -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.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=Unit.CURRENCY.PER_MONTH) def anspruchshöhe_m( ungedeckter_bedarf_m: float, ungedeckter_bedarf_m_bg: float, @@ -55,7 +55,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=Unit.CURRENCY.PER_MONTH) def ungedeckter_bedarf_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -79,7 +79,7 @@ def ungedeckter_bedarf_m( return regelbedarf_m -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) def einkommen_zur_verteilung_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -104,7 +104,7 @@ def einkommen_zur_verteilung_m( return anzurechnendes_einkommen_m -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) def überschusseinkommen_m( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, diff --git "a/src/gettsim/germany/b\303\274rgergeld/einkommen.py" "b/src/gettsim/germany/b\303\274rgergeld/einkommen.py" index 2f3597008e..8c269193dd 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, + Unit, 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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..ff43d1f2e5 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 Unit, policy_function -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.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=Unit.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..951ffe4a1f 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, Unit, policy_input -@policy_input(start_date="2023-01-01") +@policy_input(start_date="2023-01-01", unit=Unit.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=Unit.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..4038804dbb 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" @@ -6,6 +6,7 @@ from gettsim.tt import ( AggType, + Unit, agg_by_p_id_function, join, policy_function, @@ -17,7 +18,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=Unit.CURRENCY.PER_MONTH +) def kindergeldübertrag_m( differenz_kindergeld_kindbedarf_m: float, kindergeld__p_id_empfänger: int, @@ -29,6 +32,7 @@ def kindergeldübertrag_m( @policy_function( start_date="2023-01-01", leaf_name="kindergeld_pro_kind_m", + unit=Unit.CURRENCY.PER_MONTH, ) def _mean_kindergeld_per_child_ohne_staffelung_m( kindergeld__anzahl_ansprüche: int, @@ -43,7 +47,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=Unit.CURRENCY.PER_MONTH, +) def kindergeld_zur_bedarfsdeckung_m( kindergeld_pro_kind_m: FloatColumn, kindergeld__p_id_empfänger: IntColumn, @@ -69,7 +77,7 @@ def kindergeld_zur_bedarfsdeckung_m( ) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) def differenz_kindergeld_kindbedarf_m( regelbedarf_m_bg: float, nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -109,7 +117,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=Unit.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..0c56e179fa 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -6,7 +6,9 @@ from typing import TYPE_CHECKING from gettsim.tt import ( + UNSET_UNIT, ConsecutiveIntLookupTableParamValue, + Unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -19,7 +21,7 @@ from gettsim.typing import RawParamValue -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) def regelbedarf_m( regelsatz_m: float, kosten_der_unterkunft_m: float, @@ -31,7 +33,7 @@ def regelbedarf_m( return regelsatz_m + kosten_der_unterkunft_m -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.DIMENSIONLESS) def mehrbedarf_alleinerziehend_m( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, @@ -73,6 +75,7 @@ def mehrbedarf_alleinerziehend_m( @policy_function( start_date="2023-01-01", leaf_name="kindersatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( alter: int, @@ -110,6 +113,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( @policy_function( start_date="2023-01-01", leaf_name="erwachsenensatz_m", + unit=Unit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( mehrbedarf_alleinerziehend_m: float, @@ -130,7 +134,7 @@ def erwachsenensatz_m_ab_2011( return out * (1 + mehrbedarf_alleinerziehend_m) -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) def regelsatz_m( erwachsenensatz_m: float, kindersatz_m: float, @@ -142,6 +146,7 @@ def regelsatz_m( @policy_function( start_date="2023-01-01", leaf_name="kosten_der_unterkunft_m", + unit=Unit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_ab_2023( bruttokaltmiete_m: float, @@ -164,7 +169,7 @@ def kosten_der_unterkunft_m_ab_2023( return out -@policy_function(start_date="2023-01-01") +@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_SQUARE_METER.PER_MONTH) def anerkannte_warmmiete_je_qm_m( bruttokaltmiete_m: float, heizkosten_m: float, @@ -176,7 +181,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=Unit.SQUARE_METER) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, @@ -196,7 +201,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=Unit.CURRENCY.PER_MONTH) def bruttokaltmiete_m( wohnen__bruttokaltmiete_m_hh: float, anzahl_personen_hh: int, @@ -210,7 +215,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=Unit.CURRENCY.PER_MONTH) def heizkosten_m( wohnen__heizkosten_m_hh: float, anzahl_personen_hh: int, @@ -224,7 +229,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=Unit.SQUARE_METER) def wohnfläche( wohnen__wohnfläche_hh: float, anzahl_personen_hh: int, @@ -260,7 +265,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], From 69ab010025d402a32c7c147af5faa5e4bc1b67df Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:04 +0200 Subject: [PATCH 19/65] Annotate grundsicherung with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the grundsicherung namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/grundsicherung/bedarfe.py | 4 +- .../germany/grundsicherung/bedarfe.yaml | 18 ++++++- .../hilfe_zum_lebensunterhalt.py | 5 +- .../grundsicherung/im_alter/einkommen.py | 35 ++++++++++--- .../freibetr\303\244ge_und_mehrbedarfe.yaml" | 23 ++++----- .../grundsicherung/im_alter/im_alter.py | 49 +++++++++++++------ 6 files changed, 92 insertions(+), 42 deletions(-) diff --git a/src/gettsim/germany/grundsicherung/bedarfe.py b/src/gettsim/germany/grundsicherung/bedarfe.py index d931836e60..c42d56cc19 100644 --- a/src/gettsim/germany/grundsicherung/bedarfe.py +++ b/src/gettsim/germany/grundsicherung/bedarfe.py @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING from gettsim.germany.param_types import Altersgrenzen, SatzMitAltersgrenzen -from gettsim.tt import param_function +from gettsim.tt import UNSET_UNIT, param_function if TYPE_CHECKING: from gettsim.typing import RawParamValue @@ -20,7 +20,7 @@ class Regelbedarfsstufen: 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..b1a476881c 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 Unit, 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=Unit.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=Unit.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..25b21a4ff6 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, + Unit, piecewise_polynomial, policy_function, ) @@ -21,6 +22,7 @@ @policy_function( end_date="2006-12-31", leaf_name="einkommen_m", + unit=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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=Unit.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..c2fa02548a 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: @@ -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..123a09cf6f 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -17,13 +17,14 @@ RegelsatzAnteilsbasiert, ) -from gettsim.tt import AggType, agg_by_p_id_function, policy_function +from gettsim.tt import AggType, Unit, agg_by_p_id_function, policy_function @policy_function( start_date="2005-01-01", end_date="2019-12-31", leaf_name="betrag_m", + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_m_mit_kindeseinkommensgrenze( anspruchshöhe_m: float, @@ -46,7 +47,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=Unit.CURRENCY.PER_MONTH +) def betrag_m_ohne_kindeseinkommensgrenze( anspruchshöhe_m: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -80,7 +83,9 @@ 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=Unit.CURRENCY.PER_MONTH +) def anspruchshöhe_m_bis_2022( individueller_restbedarf_m: float, individueller_restbedarf_m_eg: float, @@ -117,7 +122,9 @@ 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=Unit.CURRENCY.PER_MONTH +) def anspruchshöhe_m_ab_2023( individueller_restbedarf_m: float, individueller_restbedarf_m_eg: float, @@ -154,7 +161,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=Unit.CURRENCY.PER_MONTH) def individueller_restbedarf_m( bedarf_m: float, einkommen_zur_verteilung_m: float, @@ -167,7 +174,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=Unit.CURRENCY.PER_MONTH +) def bedarf_m_bis_2022( arbeitslosengeld_2__regelbedarf_m: float, mehrbedarf_schwerbehinderung_g_m: float, @@ -186,7 +195,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=Unit.CURRENCY.PER_MONTH +) def bedarf_m_ab_2023( bürgergeld__regelbedarf_m: float, mehrbedarf_schwerbehinderung_g_m: float, @@ -205,7 +216,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=Unit.CURRENCY.PER_MONTH) def einkommen_zur_verteilung_m( einkommen_m: float, sozialversicherung__rente__altersrente__hat_regelaltersgrenze_erreicht: bool, @@ -220,7 +231,7 @@ def einkommen_zur_verteilung_m( return einkommen_m -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_EG) def überschusseinkommen_m_eg( einkommen_zur_verteilung_m_eg: float, bedarf_m_eg: float, @@ -235,7 +246,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=Unit.CURRENCY.PER_MONTH, +) def mehrbedarf_schwerbehinderung_g_m_vor_2011( schwerbehindert_grad_g: bool, familie__anzahl_erwachsene_eg: int, @@ -260,7 +275,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=Unit.CURRENCY.PER_MONTH, +) def mehrbedarf_schwerbehinderung_g_m_ab_2011( schwerbehindert_grad_g: bool, familie__anzahl_erwachsene_eg: int, @@ -289,7 +308,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=Unit.DIMENSIONLESS.PER_EG) def vermögensgrenze_unterschritten_eg( vermögen_eg: float, vermögensfreibetrag_eg: float, @@ -298,7 +317,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=Unit.CURRENCY.PER_EG) def vermögensfreibetrag_eg( familie__anzahl_kinder_eg: int, familie__anzahl_erwachsene_eg: int, @@ -311,7 +330,7 @@ def vermögensfreibetrag_eg( ) -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) def hat_gesamteinkommen_über_kindeseinkommensgrenze( einkommensteuer__gesamteinkommen_y: float, einkommensgrenze_kinder: float, @@ -341,7 +360,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=Unit.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, From f7ce37638664a530c4bb48a98d5dad1969d719c5 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:04 +0200 Subject: [PATCH 20/65] Annotate elterngeld with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the elterngeld namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/elterngeld/anspruch.yaml | 12 ++---- src/gettsim/germany/elterngeld/boni.yaml | 12 ++---- src/gettsim/germany/elterngeld/einkommen.py | 19 ++++++--- src/gettsim/germany/elterngeld/elterngeld.py | 42 ++++++++++++------- src/gettsim/germany/elterngeld/formel.yaml | 27 ++++-------- .../germany/elterngeld/geschwisterbonus.py | 10 ++--- src/gettsim/germany/elterngeld/inputs.py | 10 ++--- 7 files changed, 69 insertions(+), 63 deletions(-) diff --git a/src/gettsim/germany/elterngeld/anspruch.yaml b/src/gettsim/germany/elterngeld/anspruch.yaml index 092f3e3c33..98cb0fad73 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 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..a03382a201 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: YEARS type: dict 2007-01-01: 3: 2 @@ -27,8 +26,7 @@ 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 @@ -40,8 +38,7 @@ geschwisterbonus_minimum: description: de: § 2a (1) BEEG. Früher §2 (4) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 75.0 @@ -53,8 +50,7 @@ mehrlingsbonus_pro_kind: 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..974c817339 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, Unit, policy_function -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) def anzurechnendes_nettoeinkommen_m( einnahmen__bruttolohn_m: float, lohnsteuer__betrag_m: float, @@ -20,7 +20,10 @@ 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=Unit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" + ), + unit=Unit.CURRENCY.PER_MONTH, ) def lohnersatzanteil_einkommen_untere_grenze( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, @@ -35,7 +38,10 @@ 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=Unit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" + ), + unit=Unit.CURRENCY.PER_MONTH, ) def lohnersatzanteil_einkommen_obere_grenze( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: 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=Unit.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=Unit.DIMENSIONLESS, ) def einkommen_vorjahr_unter_bezugsgrenze_ohne_unterscheidung_single_paar( zu_versteuerndes_einkommen_vorjahr_y_sn: float, @@ -96,7 +104,8 @@ 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=Unit.EUR.PER_MONTH, base=0.01, direction="down"), + unit=Unit.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..63532dd383 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -5,13 +5,14 @@ from gettsim.tt import ( AggType, RoundingSpec, + Unit, agg_by_group_function, agg_by_p_id_function, policy_function, ) -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) def ist_leistungsbegründendes_kind( alter_monate: int, max_bezugsmonate: dict[str, int], @@ -45,7 +46,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=Unit.PERSON_COUNT.PER_FG) def anzahl_mehrlinge_jüngstes_kind_fg( jüngstes_kind_oder_mehrling: bool, fg_id: int, @@ -53,13 +54,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=Unit.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=Unit.MONTHS, ) def bezugsmonate_partner_bis_2022( bisherige_bezugsmonate: int, @@ -70,7 +74,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=Unit.MONTHS, ) def bezugsmonate_partner_ab_2023( bisherige_bezugsmonate: int, @@ -82,7 +89,8 @@ def bezugsmonate_partner_ab_2023( @policy_function( start_date="2011-01-01", - rounding_spec=RoundingSpec(base=0.01, direction="down"), + rounding_spec=RoundingSpec(unit=Unit.EUR.PER_MONTH, base=0.01, direction="down"), + unit=Unit.CURRENCY.PER_MONTH, ) def betrag_m( grundsätzlich_anspruchsberechtigt: bool, @@ -92,7 +100,7 @@ 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=Unit.CURRENCY.PER_MONTH) def basisbetrag_m( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, lohnersatzanteil: float, @@ -117,14 +125,15 @@ 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=Unit.EUR.PER_MONTH, base=0.01, direction="down"), fail_msg_if_included="Elterngeld is not implemented prior to 2011.", + unit=Unit.CURRENCY.PER_MONTH, ) def elterngeld_not_implemented() -> float: pass -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) def anspruchshöhe_m( basisbetrag_m: float, geschwisterbonus_m: float, @@ -151,6 +160,7 @@ def anspruchshöhe_m( start_date="2007-01-01", end_date="2010-12-31", leaf_name="grundsätzlich_anspruchsberechtigt", + unit=Unit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_ohne_maximales_vorjahreseinkommen( claimed: bool, @@ -168,7 +178,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=Unit.DIMENSIONLESS, +) def grundsätzlich_anspruchsberechtigt_mit_maximales_vorjahreseinkommen( claimed: bool, arbeitsstunden_w: float, @@ -190,7 +204,7 @@ def grundsätzlich_anspruchsberechtigt_mit_maximales_vorjahreseinkommen( ) -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) def bezugsmonate_unter_grenze_fg( bisherige_bezugsmonate_fg: int, bezugsmonate_partner: int, @@ -220,7 +234,7 @@ def bezugsmonate_unter_grenze_fg( return out -@policy_function(start_date="2011-01-01") +@policy_function(start_date="2011-01-01", unit=Unit.DIMENSIONLESS) def lohnersatzanteil( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, lohnersatzanteil_einkommen_untere_grenze: float, @@ -272,7 +286,7 @@ 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=Unit.CURRENCY.PER_MONTH) def anrechenbarer_betrag_m( betrag_m: float, anzahl_mehrlinge_fg: int, @@ -295,7 +309,7 @@ def anrechenbarer_betrag_m( ) -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def jüngstes_kind_oder_mehrling( alter_monate: int, familie__alter_monate_jüngstes_mitglied_fg: int, diff --git a/src/gettsim/germany/elterngeld/formel.yaml b/src/gettsim/germany/elterngeld/formel.yaml index 78eb492f91..d0edf4edc6 100644 --- a/src/gettsim/germany/elterngeld/formel.yaml +++ b/src/gettsim/germany/elterngeld/formel.yaml @@ -8,8 +8,7 @@ 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 @@ -21,8 +20,7 @@ höchstbetrag: description: de: § 2 (1) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 1800.0 @@ -34,8 +32,7 @@ mindestbetrag: description: de: § 2 (5) BEEG en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: scalar 2007-01-01: value: 300 @@ -47,8 +44,7 @@ max_zu_berücksichtigendes_einkommen: 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 @@ -112,8 +105,7 @@ einkommensschritte_korrektur: 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..21606d9102 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import policy_function +from gettsim.tt import Unit, policy_function -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) def geschwisterbonus_m( basisbetrag_m: float, geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg: bool, @@ -26,13 +26,13 @@ def geschwisterbonus_m( return out -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) def mehrlingsbonus_m(anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind: float) -> float: """Elterngeld bonus for multiples.""" return anzahl_mehrlinge_fg * mehrlingsbonus_pro_kind -@policy_function(start_date="2007-01-01") +@policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( familie__anzahl_kinder_bis_2_fg: int, familie__anzahl_kinder_bis_5_fg: int, @@ -49,7 +49,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=Unit.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..d21bef15dc 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.MONTHS) def bisherige_bezugsmonate() -> int: """Number of months the individual received Elterngeld for the current youngest child.""" -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) def claimed() -> bool: """Individual claims Elterngeld.""" -@policy_input() +@policy_input(unit=Unit.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=Unit.CURRENCY.PER_YEAR) def zu_versteuerndes_einkommen_vorjahr_y_sn() -> float: """Taxable income in the calendar year prior to the youngest child's birth year. From b779c452ff3326576f73479c50faed2c236642cd Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:04 +0200 Subject: [PATCH 21/65] Annotate erziehungsgeld with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the erziehungsgeld namespace. Co-Authored-By: Claude Opus 4.8 --- .../germany/erziehungsgeld/anspruch.yaml | 15 ++--- .../germany/erziehungsgeld/erziehungsgeld.py | 57 +++++++++++++++---- .../germany/erziehungsgeld/formel.yaml | 15 ++--- src/gettsim/germany/erziehungsgeld/inputs.py | 12 ++-- 4 files changed, 63 insertions(+), 36 deletions(-) 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..0ed11d05c0 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -6,8 +6,10 @@ from typing import Any, Literal from gettsim.tt import ( + UNSET_UNIT, AggType, RoundingSpec, + Unit, agg_by_group_function, agg_by_p_id_function, param_function, @@ -28,6 +30,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], @@ -51,7 +54,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=Unit.CURRENCY.PER_MONTH +) def anspruchshöhe_m( anspruchshöhe_kind_m: float, p_id_empfänger: int, @@ -60,7 +65,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=Unit.CURRENCY.PER_MONTH +) def betrag_m( anspruchshöhe_m: float, grundsätzlich_anspruchsberechtigt: bool, @@ -75,9 +82,10 @@ def betrag_m( @policy_function( end_date="2003-12-31", leaf_name="anspruchshöhe_kind_m", - rounding_spec=RoundingSpec(base=0.01, direction="nearest"), + rounding_spec=RoundingSpec(unit=Unit.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=Unit.CURRENCY.PER_MONTH, ) def anspruchshöhe_kind_ohne_budgetsatz_m() -> float: pass @@ -87,7 +95,8 @@ 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=Unit.EUR.PER_MONTH, base=0.01, direction="nearest"), + unit=Unit.CURRENCY.PER_MONTH, ) def anspruchshöhe_kind_mit_budgetsatz_m( ist_leistungsbegründendes_kind: bool, @@ -107,7 +116,9 @@ def anspruchshöhe_kind_mit_budgetsatz_m( 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=Unit.CURRENCY.PER_MONTH +) def basisbetrag_m( budgetsatz: bool, anzurechnendes_einkommen_y_fg: float, @@ -130,7 +141,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=Unit.CURRENCY.PER_MONTH.PER_FG, +) def abzug_durch_einkommen_m_fg( anzurechnendes_einkommen_m_fg: float, einkommensgrenze_m_fg: float, @@ -156,6 +171,7 @@ def abzug_durch_einkommen_m_fg( start_date="2004-01-01", end_date="2006-12-10", leaf_name="ist_leistungsbegründendes_kind", + unit=Unit.DIMENSIONLESS, ) def _leistungsbegründendes_kind_vor_abschaffung( p_id_empfänger: int, @@ -181,6 +197,7 @@ def _leistungsbegründendes_kind_vor_abschaffung( start_date="2006-12-11", end_date="2008-12-31", leaf_name="ist_leistungsbegründendes_kind", + unit=Unit.DIMENSIONLESS, ) def _leistungsbegründendes_kind_nach_abschaffung( p_id_empfänger: int, @@ -216,7 +233,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=Unit.DIMENSIONLESS +) def grundsätzlich_anspruchsberechtigt( arbeitsstunden_w: float, leistungsbegründende_kinder_fg: bool, @@ -231,7 +250,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=Unit.CURRENCY.PER_YEAR.PER_FG, +) def anzurechnendes_einkommen_y_fg( bruttolohn_vorjahr_nach_abzug_werbungskosten_y_fg: float, ist_leistungsbegründendes_kind: bool, @@ -254,7 +277,11 @@ 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=Unit.CURRENCY.PER_YEAR.PER_FG, +) def einkommensgrenze_y_fg( einkommensgrenze_ohne_geschwisterbonus: float, familie__anzahl_kinder_fg: int, @@ -274,7 +301,9 @@ def einkommensgrenze_y_fg( 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=Unit.CURRENCY.PER_YEAR +) def einkommensgrenze_ohne_geschwisterbonus( alter_monate: int, einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze: float, @@ -292,7 +321,9 @@ def einkommensgrenze_ohne_geschwisterbonus( return einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze -@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=Unit.CURRENCY.PER_YEAR +) def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze( familie__alleinerziehend_fg: bool, budgetsatz: bool, @@ -312,7 +343,9 @@ 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") +@policy_function( + start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR +) def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze( familie__alleinerziehend_fg: bool, budgetsatz: bool, diff --git a/src/gettsim/germany/erziehungsgeld/formel.yaml b/src/gettsim/germany/erziehungsgeld/formel.yaml index 42cf632801..fb4c24a7e8 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 @@ -59,8 +57,7 @@ aufschlag_einkommen: 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..103b9c5c75 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, Unit, policy_input -@policy_input(end_date="2008-12-31") +@policy_input(end_date="2008-12-31", unit=Unit.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=Unit.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=Unit.DIMENSIONLESS, +) def p_id_empfänger() -> int: pass From 4af3b66672aac3cb9424666ed66c4d2545200105 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:04 +0200 Subject: [PATCH 22/65] Annotate kinderzuschlag with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the kinderzuschlag namespace. Co-Authored-By: Claude Opus 4.8 --- .../germany/kinderzuschlag/einkommen.py | 60 +++++++++++++++---- .../germany/kinderzuschlag/kinderzuschlag.py | 41 +++++++++---- .../kinderzuschlag/kinderzuschlag.yaml | 21 +++---- 3 files changed, 85 insertions(+), 37 deletions(-) diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 4e4fb38920..6230949544 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, + Unit, 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=Unit.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=Unit.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=Unit.CURRENCY.PER_MONTH, +) def bruttoeinkommen_eltern_m_ab_2023( bürgergeld__bruttoeinkommen_m: float, familie__hat_kind_in_gleicher_bedarfsgemeinschaft: bool, @@ -73,7 +84,10 @@ 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=Unit.EUR.PER_MONTH, base=10, direction="down", reference="§ 6a Abs. 4 BKGG" + ), + unit=Unit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_grober_rundung( arbeitslosengeld_2__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -95,7 +109,10 @@ 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=Unit.EUR.PER_MONTH, base=1, direction="down", reference="§ 11 Abs. 2 BKGG" + ), + unit=Unit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_genauer_rundung_bis_2022( arbeitslosengeld_2__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -116,7 +133,10 @@ 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=Unit.EUR.PER_MONTH, base=1, direction="down", reference="§ 11 Abs. 2 BKGG" + ), + unit=Unit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( bürgergeld__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -137,6 +157,7 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( @policy_function( start_date="2005-01-01", end_date="2019-06-30", + unit=Unit.CURRENCY.PER_MONTH, ) def maximales_nettoeinkommen_m_bg( erwachsenenbedarf_m_bg: float, @@ -152,7 +173,7 @@ def maximales_nettoeinkommen_m_bg( return erwachsenenbedarf_m_bg + satz * anzahl_kinder_bg -@policy_function(start_date="2008-10-01") +@policy_function(start_date="2008-10-01", unit=Unit.CURRENCY.PER_MONTH) def mindestbruttoeinkommen_m_bg( anzahl_kinder_bg: int, familie__alleinerziehend_bg: bool, @@ -173,7 +194,7 @@ def mindestbruttoeinkommen_m_bg( return out -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) def anzurechnendes_einkommen_eltern_m_bg( nettoeinkommen_eltern_m_bg: float, erwachsenenbedarf_m_bg: float, @@ -194,6 +215,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=Unit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_bg_bis_2022( wohnbedarf_anteil_eltern_bg: float, @@ -211,7 +233,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=Unit.CURRENCY.PER_MONTH, +) def kosten_der_unterkunft_m_bg_ab_2023( wohnbedarf_anteil_eltern_bg: float, bürgergeld__bruttokaltmiete_m_bg: float, @@ -230,6 +256,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 +284,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 +314,7 @@ def existenzminimum_mit_bildung_und_teilhabe( ) -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) def wohnbedarf_anteil_eltern_bg( anzahl_kinder_bg: int, familie__alleinerziehend_bg: bool, @@ -320,7 +347,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=Unit.CURRENCY.PER_MONTH, ) def erwachsenenbedarf_m_bg_bis_2022( arbeitslosengeld_2__erwachsenensatz_m_bg: float, @@ -330,7 +360,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=Unit.CURRENCY.PER_MONTH, +) 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..2d7e3d1c8b 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 Unit, param_function, policy_function if TYPE_CHECKING: from gettsim.germany.param_types import ( @@ -15,7 +15,12 @@ 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", + unit=Unit.CURRENCY.PER_MONTH, +) def satz_mit_gestaffeltem_kindergeld( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, @@ -40,7 +45,7 @@ def satz_mit_gestaffeltem_kindergeld( ) -@param_function(leaf_name="satz", start_date="2024-01-01") +@param_function(leaf_name="satz", start_date="2024-01-01", unit=Unit.CURRENCY.PER_MONTH) def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, kindergeld__satz: float, @@ -67,7 +72,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=Unit.CURRENCY.PER_MONTH) def betrag_m_bg( anspruchshöhe_m_bg: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -79,7 +84,7 @@ def betrag_m_bg( return 0.0 -@policy_function(start_date="2005-01-01") +@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) def anspruchshöhe_m( anspruchshöhe_m_bg: float, familie__anzahl_personen_bg: int, @@ -88,7 +93,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=Unit.CURRENCY.PER_MONTH) def anspruchshöhe_m_bg( basisbetrag_m_bg: float, vermögen_bg: float, @@ -109,6 +114,7 @@ def anspruchshöhe_m_bg( start_date="2005-01-01", end_date="2022-12-31", leaf_name="vermögensfreibetrag_bg", + unit=Unit.CURRENCY, ) def vermögensfreibetrag_bg_bis_2022( arbeitslosengeld_2__vermögensfreibetrag_bg: float, @@ -117,7 +123,9 @@ 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=Unit.CURRENCY +) def vermögensfreibetrag_bg_ab_2023( bürgergeld__vermögensfreibetrag_in_karenzzeit_bg: float, ) -> float: @@ -129,6 +137,7 @@ def vermögensfreibetrag_bg_ab_2023( start_date="2005-01-01", end_date="2008-09-30", leaf_name="basisbetrag_m_bg", + unit=Unit.CURRENCY.PER_MONTH, ) def basisbetrag_m_bg_check_maximales_netteinkommen( nettoeinkommen_eltern_m_bg: float, @@ -161,6 +170,7 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( start_date="2008-10-01", end_date="2019-06-30", leaf_name="basisbetrag_m_bg", + unit=Unit.CURRENCY.PER_MONTH, ) def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( bruttoeinkommen_eltern_m_bg: float, @@ -194,7 +204,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=Unit.CURRENCY.PER_MONTH, +) def basisbetrag_m_bg_check_mindestbruttoeinkommen( bruttoeinkommen_eltern_m_bg: float, mindestbruttoeinkommen_m_bg: float, @@ -223,7 +237,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=Unit.CURRENCY.PER_MONTH, ) def basisbetrag_kind_m_bis_2022( kindergeld__ist_leistungsbegründendes_kind: bool, @@ -249,7 +266,11 @@ 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=Unit.CURRENCY.PER_MONTH, +) def basisbetrag_kind_m_ab_2023( kindergeld__ist_leistungsbegründendes_kind: bool, einnahmen__bruttolohn_m: float, diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml index 9ad12a1426..561f2aaacc 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml @@ -6,8 +6,7 @@ satz: 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 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 From 2ad9e9c548716db8fe7c13419161a5ab5cd715de Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:29:04 +0200 Subject: [PATCH 23/65] Annotate wohngeld with GEP-10 units (#1192) Decorator unit=, YAML unit tokens (reference_period dropped), and aggregation / rounding-spec units for the wohngeld namespace. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/wohngeld/einkommen.py | 35 ++++++++++++++----- src/gettsim/germany/wohngeld/einkommen.yaml | 21 +++++------ src/gettsim/germany/wohngeld/inputs.py | 4 +-- src/gettsim/germany/wohngeld/miete.py | 23 ++++++++---- src/gettsim/germany/wohngeld/miete.yaml | 22 ++++++------ .../germany/wohngeld/voraussetzungen.py | 18 +++++++--- .../germany/wohngeld/voraussetzungen.yaml | 3 +- src/gettsim/germany/wohngeld/wohngeld.py | 16 ++++++--- src/gettsim/germany/wohngeld/wohngeld.yaml | 12 +++---- 9 files changed, 94 insertions(+), 60 deletions(-) diff --git a/src/gettsim/germany/wohngeld/einkommen.py b/src/gettsim/germany/wohngeld/einkommen.py index c0bb38e6a5..b03c9461de 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, + Unit, 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=Unit.PERSON_COUNT +) def alleinerziehendenbonus( kindergeld__kind_bis_10_mit_kindergeld: bool, kindergeld__p_id_empfänger: int, @@ -32,7 +36,7 @@ def alleinerziehendenbonus( pass -@param_function() +@param_function(unit=UNSET_UNIT) def min_einkommen_lookup_table( min_einkommen: dict[int, float], xnp: ModuleType, @@ -41,7 +45,7 @@ def min_einkommen_lookup_table( return get_consecutive_int_lookup_table_param_value(raw=min_einkommen, xnp=xnp) -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_MONTH) def einkommen_m_wthh( anzahl_personen_wthh: int, freibetrag_m_wthh: float, @@ -64,7 +68,7 @@ def einkommen_m_wthh( return xnp.maximum(einkommen_ohne_freibetrag, mindesteinkommen) -@policy_function() +@policy_function(unit=Unit.DIMENSIONLESS) def abzugsanteil_vom_einkommen_für_steuern_sozialversicherung( einkommensteuer__betrag_y_sn: float, sozialversicherung__rente__beitrag__betrag_versicherter_y: float, @@ -88,7 +92,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=Unit.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 +134,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=Unit.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 +182,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=Unit.CURRENCY.PER_MONTH +) def freibetrag_m_bis_2015( einnahmen__bruttolohn_m: float, ist_kind_mit_erwerbseinkommen: bool, @@ -210,6 +224,7 @@ def freibetrag_m_bis_2015( start_date="2016-01-01", end_date="2020-12-31", leaf_name="freibetrag_m", + unit=Unit.CURRENCY.PER_MONTH, ) def freibetrag_m_ab_2016_bis_2020( einnahmen__bruttolohn_m: float, @@ -237,7 +252,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=Unit.CURRENCY.PER_MONTH +) def freibetrag_m_ab_2021( einnahmen__bruttolohn_m: float, einnahmen__renten__gesetzliche_m: float, @@ -295,7 +312,7 @@ def freibetrag_m_ab_2021( return freibetrag_bei_behinderung + freibetrag_kinder + freibetrag_grundrente -@policy_function() +@policy_function(unit=Unit.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..15dfbcddf4 100644 --- a/src/gettsim/germany/wohngeld/einkommen.yaml +++ b/src/gettsim/germany/wohngeld/einkommen.yaml @@ -15,8 +15,7 @@ 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 + unit: EUR_PER_MONTH type: dict 1984-01-01: 1: 0 @@ -125,8 +124,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,8 +150,7 @@ 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 @@ -181,8 +179,8 @@ freibetrag_bei_behinderung_gestaffelt_y: Achtung: Die Zahlen vor 1991 erscheinen falsch. Senkung in 1986 unwahrscheinlich, im Zweifel wurde dort eher die Stufe mit Behinderungsgrad 1-80% eingeführt. en: null - unit: Euros - reference_period: Year + input_unit: DIMENSIONLESS + output_unit: EUR_PER_YEAR type: piecewise_constant 1984-01-01: intervals: @@ -224,8 +222,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 +249,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..0637f1c036 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 Unit, policy_input -@policy_input() +@policy_input(unit=Unit.DIMENSIONLESS) 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..ce7f546c2a 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, + Unit, 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=Unit.CURRENCY.PER_MONTH) 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=Unit.CURRENCY.PER_MONTH) 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=Unit.CURRENCY.PER_MONTH, ) 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=Unit.CURRENCY.PER_MONTH, ) 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=Unit.CURRENCY.PER_MONTH, ) 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=Unit.CURRENCY.PER_MONTH, ) 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..ee246caa41 100644 --- a/src/gettsim/germany/wohngeld/miete.yaml +++ b/src/gettsim/germany/wohngeld/miete.yaml @@ -14,8 +14,7 @@ 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 + unit: EUR_PER_MONTH type: dict 1984-01-01: 1: 0 @@ -110,8 +109,7 @@ raw_max_miete_m_nach_baujahr: - maximales Baujahr des Hauses - Mietstufe en: null - unit: Euros - reference_period: Month + unit: EUR_PER_MONTH type: require_converter 1981-01-01: 1: @@ -1014,8 +1012,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 +1264,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 type: require_converter 2021-01-01: reference: §12 (6) WoGG, Art. 1 G. v. 15.05.2020, BGBl I S. 1015. @@ -1288,8 +1286,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 type: require_converter 2023-01-01: reference: Art. 1 G. v. 08.12.2022 BGBl. I Nr. 48 S. 2160 @@ -1312,8 +1310,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 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..df8256b6b1 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 Unit, policy_function @policy_function( start_date="2005-01-01", end_date="2008-12-31", leaf_name="grundsätzlich_anspruchsberechtigt_wthh", + unit=Unit.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=Unit.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=Unit.DIMENSIONLESS) 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=Unit.DIMENSIONLESS, ) 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=Unit.DIMENSIONLESS, +) 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=Unit.CURRENCY.PER_MONTH, ) 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=Unit.CURRENCY.PER_MONTH, ) 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..bd372abdf2 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, + Unit, agg_by_group_function, get_consecutive_int_lookup_table_param_value, param_function, @@ -29,7 +31,7 @@ def anzahl_personen_wthh(wthh_id: int) -> int: pass -@policy_function() +@policy_function(unit=Unit.CURRENCY.PER_MONTH) 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=Unit.CURRENCY.PER_MONTH) 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=Unit.EUR.PER_MONTH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), + unit=Unit.CURRENCY.PER_MONTH, ) def basisbetrag_m_wthh_bis_2000( anzahl_personen_wthh: int, @@ -88,10 +92,12 @@ def basisbetrag_m_wthh_bis_2000( leaf_name="basisbetrag_m_wthh", start_date="2001-01-01", rounding_spec=RoundingSpec( + unit=Unit.EUR.PER_MONTH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), + unit=Unit.CURRENCY.PER_MONTH, ) def basisbetrag_m_wthh_ab_2001( anzahl_personen_wthh: int, @@ -128,7 +134,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]], @@ -168,7 +174,9 @@ 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]], diff --git a/src/gettsim/germany/wohngeld/wohngeld.yaml b/src/gettsim/germany/wohngeld/wohngeld.yaml index efcd453676..496fb54973 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: DIMENSIONLESS 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 @@ -569,8 +566,7 @@ 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 + unit: EUR_PER_MONTH type: scalar 2001-01-01: value: 40 From b44e094cebeccecae0c6a3f3947f8803ee254ddb Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:35:01 +0200 Subject: [PATCH 24/65] Rename mehrbedarf_alleinerziehend_m -> mehrbedarf_alleinerziehend (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Mehrbedarf für Alleinerziehende is a dimensionless share (applied as `out * (1 + mehrbedarf_alleinerziehend)`), so a monthly `_m` flow suffix is wrong under GEP-10's name/period consistency rule — the auto `_y` variant (×12 on a share) would be nonsense. Drop the suffix (D4). Bürgergeld and Arbeitslosengeld II twins. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py | 10 +++++----- "src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py index dcedd8a39f..3f61e5ebeb 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py +++ b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py @@ -38,7 +38,7 @@ def regelbedarf_m( @policy_function( start_date="2005-01-01", end_date="2022-12-31", unit=Unit.DIMENSIONLESS ) -def mehrbedarf_alleinerziehend_m( +def mehrbedarf_alleinerziehend( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, familie__anzahl_kinder_bis_6_fg: int, @@ -206,7 +206,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( unit=Unit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_bis_2010( - mehrbedarf_alleinerziehend_m: float, + mehrbedarf_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, regelsatz_anteilsbasiert: RegelsatzAnteilsbasiert, @@ -223,7 +223,7 @@ def erwachsenensatz_m_bis_2010( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend_m) + return out * (1 + mehrbedarf_alleinerziehend) @policy_function( @@ -233,7 +233,7 @@ def erwachsenensatz_m_bis_2010( unit=Unit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( - mehrbedarf_alleinerziehend_m: float, + mehrbedarf_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, @@ -248,7 +248,7 @@ def erwachsenensatz_m_ab_2011( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend_m) + return out * (1 + mehrbedarf_alleinerziehend) @policy_function( diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index 0c56e179fa..0751e8f5f9 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -34,7 +34,7 @@ def regelbedarf_m( @policy_function(start_date="2023-01-01", unit=Unit.DIMENSIONLESS) -def mehrbedarf_alleinerziehend_m( +def mehrbedarf_alleinerziehend( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, familie__anzahl_kinder_bis_6_fg: int, @@ -116,7 +116,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( unit=Unit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( - mehrbedarf_alleinerziehend_m: float, + mehrbedarf_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, @@ -131,7 +131,7 @@ def erwachsenensatz_m_ab_2011( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend_m) + return out * (1 + mehrbedarf_alleinerziehend) @policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) From 12168a539e4f197533a982bf9362fca938f18378 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:40:28 +0200 Subject: [PATCH 25/65] Mirror nested value shape in raw_mindestunterhalt unit mapping (#1192) The per-leaf unit mapping must match the value's nesting (per age group kleinkind/schulkind/jugendliche), else the mandatory-units check reports each leaf as unannotated. Co-Authored-By: Claude Opus 4.8 --- .../germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml index 358692f48f..e5d213888d 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml @@ -10,7 +10,10 @@ raw_mindestunterhalt: en: >- Minimum Child Alimony depending on age of child (0 - 5 years, 6 - 11 years, 12 - 17 years). - unit: {satz: EUR_PER_MONTH, min_alter: YEARS, max_alter: YEARS} + 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: From 12f64d17e91ce76231c77e25a3bacce18f414d93 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 00:40:28 +0200 Subject: [PATCH 26/65] =?UTF-8?q?Rename=20anteil=5Fsteuerf=C3=A4lliger=5Fe?= =?UTF-8?q?innahmen=5Fy=20->=20drop=20=5Fy=20(#1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A dimensionless share carries no flow period, so the _y suffix violates the name/period consistency rule. No external consumers. Co-Authored-By: Claude Opus 4.8 --- .../aus_nichtselbstst\303\244ndiger_arbeit.py" | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 faee564313..f2c607ff1d 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" @@ -51,7 +51,7 @@ 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. @@ -61,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 @@ -70,7 +70,7 @@ def werbungskosten_y( @policy_function(unit=Unit.DIMENSIONLESS) -def anteil_steuerfälliger_einnahmen_y( +def anteil_steuerfälliger_einnahmen( einnahmen__bruttolohn_y: float, steuerbefreite_einnahmen_y: float, ) -> float: From 2ac9df770209c697963321b0435b7c619ae665cc Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:06:25 +0200 Subject: [PATCH 27/65] Round C (part 1): suffix/period/level renames + first body-check batch (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve GEP-10 name↔unit consistency and start the dry-run body checks: - Rename flow-valued leaves to carry their period suffix: rentenwert_m, minijobgrenze_m, betrag_versicherter_regulärer_beitragssatz_m, lohnersatzanteil_einkommen_*_grenze_m, einkommensgrenze_ohne_geschwisterbonus*_y, kinderzuschlag satz_m, rente mean_entgeltpunkte_pro_bewertungsmonat_{m,y} + mean_entgeltpunkte_zuschlag_m (+ consumers and test cases). - familie: cast_unit(alter/anzahl, DIMENSIONLESS) for the dimensioned-literal age/count comparisons. - verify_units=False on dry-run-opaque bodies (midijob faktor_f/bemessungsentgelt, wohngeld abzugsanteil, lohnsteuer tarif_klassen_5_und_6, soli betrag_y_sn, rente erwerbsminderung/grundrente lookups). - Fix two SUM-aggregation declarations to DIMENSIONLESS.PER_ (a person-level count collapses to dimensionless, so the sum derives 1/[level]). Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/elterngeld/einkommen.py | 4 +- src/gettsim/germany/elterngeld/elterngeld.py | 8 ++-- .../germany/erziehungsgeld/erziehungsgeld.py | 22 ++++++---- src/gettsim/germany/familie/familie.py | 32 +++++++++++---- src/gettsim/germany/kindergeld/kindergeld.py | 2 +- .../germany/kinderzuschlag/einkommen.py | 6 +-- .../germany/kinderzuschlag/kinderzuschlag.py | 14 ++++--- src/gettsim/germany/lohnsteuer/lohnsteuer.py | 4 +- .../solidarit\303\244tszuschlag.py" | 2 + .../kranken/beitrag/beitrag.py | 14 +++---- .../germany/sozialversicherung/midijob.py | 33 ++++++++------- .../germany/sozialversicherung/minijob.py | 8 ++-- .../germany/sozialversicherung/minijob.yaml | 2 +- .../pflege/beitrag/beitrag.py | 14 +++---- .../regul\303\244r_besch\303\244ftigt.py" | 4 +- .../rente/altersrente/altersrente.py | 4 +- .../rente/beitrag/beitrag.py | 26 ++++++------ .../sozialversicherung/rente/entgeltpunkte.py | 2 +- .../erwerbsminderung/erwerbsminderung.py | 22 +++++----- .../rente/grundrente/grundrente.py | 41 ++++++++++--------- .../rente/rentenformel.yaml | 4 +- src/gettsim/germany/wohngeld/einkommen.py | 2 +- .../2022-01-01/minijobgrenze.yaml" | 2 +- .../2023-01-01/minijobgrenze.yaml" | 2 +- .../2024-01-01/minijobgrenze.yaml" | 2 +- .../2025-01-01/minijobgrenze.yaml" | 2 +- .../2026-01-01/minijobgrenze.yaml" | 2 +- .../2027-01-01/minijobgrenze.yaml" | 2 +- .../rente/grundrente/2021-07-01/hh_id_1.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_10.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_11.yaml | 4 +- .../rente/grundrente/2021-07-01/hh_id_12.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_2.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_3.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_4.yaml | 4 +- .../rente/grundrente/2021-07-01/hh_id_5.yaml | 4 +- .../rente/grundrente/2021-07-01/hh_id_6.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_7.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_8.yaml | 2 +- .../rente/grundrente/2021-07-01/hh_id_9.yaml | 4 +- .../grundrente/2021-07-01/married_couple.yaml | 2 +- 41 files changed, 174 insertions(+), 142 deletions(-) diff --git a/src/gettsim/germany/elterngeld/einkommen.py b/src/gettsim/germany/elterngeld/einkommen.py index 974c817339..1d2fc93b9f 100644 --- a/src/gettsim/germany/elterngeld/einkommen.py +++ b/src/gettsim/germany/elterngeld/einkommen.py @@ -25,7 +25,7 @@ def anzurechnendes_nettoeinkommen_m( ), unit=Unit.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: @@ -43,7 +43,7 @@ def lohnersatzanteil_einkommen_untere_grenze( ), unit=Unit.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: diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index 63532dd383..e77557e2bc 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -237,8 +237,8 @@ def bezugsmonate_unter_grenze_fg( @policy_function(start_date="2011-01-01", unit=Unit.DIMENSIONLESS) def lohnersatzanteil( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, - lohnersatzanteil_einkommen_untere_grenze: float, - lohnersatzanteil_einkommen_obere_grenze: float, + lohnersatzanteil_einkommen_untere_grenze_m: float, + lohnersatzanteil_einkommen_obere_grenze_m: float, einkommensschritte_korrektur: float, satz: float, prozent_korrektur: float, @@ -258,7 +258,7 @@ def lohnersatzanteil( and mean_nettoeinkommen_in_12_monaten_vor_geburt_m > 0 ): out = satz + ( - lohnersatzanteil_einkommen_untere_grenze + lohnersatzanteil_einkommen_untere_grenze_m / einkommensschritte_korrektur * prozent_korrektur ) @@ -271,7 +271,7 @@ def lohnersatzanteil( out = max( satz - ( - lohnersatzanteil_einkommen_obere_grenze + lohnersatzanteil_einkommen_obere_grenze_m / einkommensschritte_korrektur * prozent_korrektur ), diff --git a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py index 0ed11d05c0..c8ba075606 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -283,7 +283,7 @@ def anzurechnendes_einkommen_y_fg( unit=Unit.CURRENCY.PER_YEAR.PER_FG, ) def einkommensgrenze_y_fg( - einkommensgrenze_ohne_geschwisterbonus: float, + einkommensgrenze_ohne_geschwisterbonus_y: float, familie__anzahl_kinder_fg: int, ist_leistungsbegründendes_kind: bool, aufschlag_einkommen: float, @@ -294,7 +294,7 @@ def einkommensgrenze_y_fg( """ if ist_leistungsbegründendes_kind: return ( - einkommensgrenze_ohne_geschwisterbonus + einkommensgrenze_ohne_geschwisterbonus_y + (familie__anzahl_kinder_fg - 1) * aufschlag_einkommen ) else: @@ -304,10 +304,10 @@ def einkommensgrenze_y_fg( @policy_function( start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR ) -def einkommensgrenze_ohne_geschwisterbonus( +def einkommensgrenze_ohne_geschwisterbonus_y( 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: float, + einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y: float, altersgrenze_für_reduziertes_einkommenslimit_kind_monate: int, ) -> float: """Income threshold for parental leave benefit (Erziehungsgeld) before adding the @@ -316,15 +316,19 @@ 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 + ) else: - return einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze + return ( + einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y + ) @policy_function( start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR ) -def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze( +def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y( familie__alleinerziehend_fg: bool, budgetsatz: bool, einkommensgrenzen: Einkommensgrenzen, @@ -346,7 +350,7 @@ def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze( @policy_function( start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR ) -def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze( +def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y( familie__alleinerziehend_fg: bool, budgetsatz: bool, einkommensgrenzen: Einkommensgrenzen, diff --git a/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index 6a1545c31a..a2e8725b12 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -11,6 +11,7 @@ from gettsim.tt import ( AggType, Unit, + cast_unit, agg_by_group_function, join, policy_function, @@ -64,7 +65,9 @@ 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 ( + cast_unit(alter, Unit.DIMENSIONLESS) <= 2 + ) @agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) @@ -79,7 +82,9 @@ 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 ( + cast_unit(alter, Unit.DIMENSIONLESS) <= 5 + ) @agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) @@ -94,7 +99,9 @@ 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 ( + cast_unit(alter, Unit.DIMENSIONLESS) <= 6 + ) @agg_by_group_function( @@ -111,7 +118,9 @@ 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 ( + cast_unit(alter, Unit.DIMENSIONLESS) <= 15 + ) @agg_by_group_function( @@ -128,7 +137,9 @@ 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 ( + cast_unit(alter, Unit.DIMENSIONLESS) <= 17 + ) @agg_by_group_function( @@ -219,7 +230,9 @@ 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 ( + cast_unit(alter, Unit.DIMENSIONLESS) <= 17 + ) @agg_by_group_function( @@ -242,7 +255,10 @@ def hat_kind_in_gleicher_bedarfsgemeinschaft( ist_erwachsener_in_bedarfsgemeinschaft: bool, ) -> bool: """Has a child in the same Bedarfsgemeinschaft.""" - return anzahl_kinder_bg >= 1 and ist_erwachsener_in_bedarfsgemeinschaft + return ( + cast_unit(anzahl_kinder_bg, Unit.DIMENSIONLESS) >= 1 + and ist_erwachsener_in_bedarfsgemeinschaft + ) @agg_by_group_function(agg_type=AggType.COUNT) @@ -324,7 +340,7 @@ def anzahl_personen_ehe(ehe_id: int) -> int: @policy_function(unit=Unit.DIMENSIONLESS) def volljährig(alter: int) -> bool: """Person over the age of 18.""" - return alter >= 18 + return cast_unit(alter, Unit.DIMENSIONLESS) >= 18 @policy_function(unit=Unit.DIMENSIONLESS) diff --git a/src/gettsim/germany/kindergeld/kindergeld.py b/src/gettsim/germany/kindergeld/kindergeld.py index 15bd496cbd..bd71f4a313 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -22,7 +22,7 @@ from gettsim.typing import BoolColumn, IntColumn -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.DIMENSIONLESS) def anzahl_ansprüche( ist_leistungsbegründendes_kind: bool, p_id_empfänger: int, diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 6230949544..16789a5116 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -25,7 +25,7 @@ @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_BG + start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.DIMENSIONLESS.PER_BG ) def anzahl_kinder_bg(kindergeld__anzahl_ansprüche: int, bg_id: int) -> int: pass @@ -162,7 +162,7 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( 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). @@ -170,7 +170,7 @@ 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", unit=Unit.CURRENCY.PER_MONTH) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index 2d7e3d1c8b..ea78d08b5b 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -18,7 +18,7 @@ @param_function( start_date="2021-01-01", end_date="2022-12-31", - leaf_name="satz", + leaf_name="satz_m", unit=Unit.CURRENCY.PER_MONTH, ) def satz_mit_gestaffeltem_kindergeld( @@ -45,7 +45,9 @@ def satz_mit_gestaffeltem_kindergeld( ) -@param_function(leaf_name="satz", start_date="2024-01-01", unit=Unit.CURRENCY.PER_MONTH) +@param_function( + leaf_name="satz_m", start_date="2024-01-01", unit=Unit.CURRENCY.PER_MONTH +) def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, kindergeld__satz: float, @@ -248,12 +250,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 @@ -277,12 +279,12 @@ def basisbetrag_kind_m_ab_2023( 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/lohnsteuer/lohnsteuer.py b/src/gettsim/germany/lohnsteuer/lohnsteuer.py index 0773b25253..ea29d8ba86 100644 --- a/src/gettsim/germany/lohnsteuer/lohnsteuer.py +++ b/src/gettsim/germany/lohnsteuer/lohnsteuer.py @@ -122,7 +122,7 @@ def splittingtarif( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) +@policy_function(verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY) def tarif_klassen_5_und_6( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -201,7 +201,7 @@ def splittingtarif_mit_kinderfreibetrag( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) +@policy_function(verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY) def tarif_klassen_5_und_6_mit_kinderfreibetrag( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, 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 8867a15f07..2bdfce69ff 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" @@ -30,6 +30,7 @@ def solidaritätszuschlagstarif( @policy_function( + verify_units=False, end_date="2008-12-31", leaf_name="betrag_y_sn", unit=Unit.CURRENCY.PER_YEAR.PER_SN, @@ -63,6 +64,7 @@ def betrag_y_sn_ohne_abgelt_st( @policy_function( + verify_units=False, start_date="2009-01-01", leaf_name="betrag_y_sn", unit=Unit.CURRENCY.PER_YEAR.PER_SN, diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py index 6f85b3e997..80e8932b66 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py @@ -11,10 +11,10 @@ unit=Unit.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( @@ -27,7 +27,7 @@ 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. @@ -39,7 +39,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 health insurance contribution for pensions return out + betrag_rentner_m @@ -56,7 +56,7 @@ def betrag_versicherter_m_mit_midijob( 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. @@ -70,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 @@ -156,7 +156,7 @@ def betrag_arbeitgeber_m_mit_midijob( @policy_function(unit=Unit.CURRENCY.PER_MONTH) -def betrag_versicherter_regulärer_beitragssatz( +def betrag_versicherter_regulärer_beitragssatz_m( einkommen_m: float, beitragssatz_arbeitnehmer: float, ) -> float: diff --git a/src/gettsim/germany/sozialversicherung/midijob.py b/src/gettsim/germany/sozialversicherung/midijob.py index 9394154be0..22065a2c4e 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.py +++ b/src/gettsim/germany/sozialversicherung/midijob.py @@ -22,10 +22,10 @@ def in_gleitzone( return (einnahmen__bruttolohn_m <= midijobgrenze) and (not geringfügig_beschäftigt) -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(verify_units=False, unit=Unit.CURRENCY.PER_MONTH) def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( einnahmen__bruttolohn_m: float, - minijobgrenze: float, + minijobgrenze_m: float, midijobgrenze: float, ) -> float: """Income subject to employee social insurance contributions for Bruttolöhne in @@ -33,13 +33,14 @@ def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( Legal reference: § 20 SGB IV ("Gesonderte beitragspflichtige Einnahmen") """ - quotient = midijobgrenze / (midijobgrenze - minijobgrenze) - einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze + quotient = midijobgrenze / (midijobgrenze - minijobgrenze_m) + einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze_m return quotient * einkommen_diff @param_function( + verify_units=False, start_date="2003-04-01", end_date="2004-12-31", leaf_name="midijob_faktor_f", @@ -83,6 +84,7 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_bis_2004( @param_function( + verify_units=False, start_date="2005-01-01", end_date="2022-09-30", leaf_name="midijob_faktor_f", @@ -126,6 +128,7 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( @param_function( + verify_units=False, start_date="2022-10-01", leaf_name="midijob_faktor_f", unit=Unit.DIMENSIONLESS, @@ -171,6 +174,7 @@ def midijob_faktor_f_ohne_minijob_steuerpauschale( @policy_function( + verify_units=False, start_date="2003-04-01", end_date="2022-09-30", leaf_name="midijob_bemessungsentgelt_m", @@ -179,7 +183,7 @@ def midijob_faktor_f_ohne_minijob_steuerpauschale( def midijob_bemessungsentgelt_m_bis_09_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, - minijobgrenze: float, + minijobgrenze_m: float, midijobgrenze: float, ) -> float: """Income subject to social insurance contributions for midijob until September @@ -192,16 +196,17 @@ 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 / (midijobgrenze - minijobgrenze_m)) - ( + minijobgrenze_m / (midijobgrenze - minijobgrenze_m) * midijob_faktor_f ) return minijob_anteil + lohn_über_mini * gewichtete_midijob_rate @policy_function( + verify_units=False, start_date="2022-10-01", leaf_name="midijob_bemessungsentgelt_m", unit=Unit.CURRENCY.PER_MONTH, @@ -209,7 +214,7 @@ def midijob_bemessungsentgelt_m_bis_09_2022( def midijob_bemessungsentgelt_m_ab_10_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, - minijobgrenze: float, + minijobgrenze_m: float, midijobgrenze: float, ) -> float: """Total income subject to social insurance contributions for midijobs since October @@ -223,11 +228,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) / (midijobgrenze - minijobgrenze_m) + quotient2 = (minijobgrenze_m) / (midijobgrenze - 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/minijob.py b/src/gettsim/germany/sozialversicherung/minijob.py index 7f0b05b04a..b205181fad 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.py +++ b/src/gettsim/germany/sozialversicherung/minijob.py @@ -8,19 +8,19 @@ @policy_function(unit=Unit.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=Unit.EUR.PER_MONTH, base=1, @@ -46,7 +46,7 @@ def minijobgrenze_unterscheidung_ost_west( @policy_function( start_date="2022-10-01", - leaf_name="minijobgrenze", + leaf_name="minijobgrenze_m", rounding_spec=RoundingSpec( unit=Unit.EUR.PER_MONTH, base=1, diff --git a/src/gettsim/germany/sozialversicherung/minijob.yaml b/src/gettsim/germany/sozialversicherung/minijob.yaml index dfcd266626..45de3e33d4 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/minijob.yaml @@ -1,5 +1,5 @@ --- -minijobgrenze: +minijobgrenze_m: name: de: Minijobgrenze en: Thresholds for marginal employment (minijobs) diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py index ca90f516fe..04992dad12 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py @@ -11,10 +11,10 @@ unit=Unit.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( @@ -27,7 +27,7 @@ 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. @@ -40,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 @@ -57,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.""" @@ -68,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 @@ -158,7 +158,7 @@ def betrag_selbstständig_m( @policy_function(start_date="1995-01-01", unit=Unit.CURRENCY.PER_MONTH) -def betrag_versicherter_regulärer_beitragssatz( +def betrag_versicherter_regulärer_beitragssatz_m( sozialversicherung__kranken__beitrag__einkommen_m: float, beitragssatz_arbeitnehmer: float, ) -> float: 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 a439fe6d7f..6d0ac3aef7 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" @@ -12,12 +12,12 @@ ) 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( diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py index d2dc753d2c..5621172896 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py @@ -88,7 +88,7 @@ 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: @@ -103,7 +103,7 @@ def bruttorente_basisbetrag_m( if sozialversicherung__rente__bezieht_rente: out = ( sozialversicherung__rente__entgeltpunkte - * sozialversicherung__rente__rentenwert + * sozialversicherung__rente__rentenwert_m * zugangsfaktor ) else: diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py index 526c11d089..7becbb95f7 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py @@ -11,10 +11,10 @@ unit=Unit.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( @@ -25,7 +25,7 @@ def betrag_versicherter_m_bis_03_1999( ) 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. @@ -35,7 +35,7 @@ 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 @@ -48,7 +48,7 @@ def betrag_versicherter_m_ohne_midijob( 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. @@ -63,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(unit=Unit.CURRENCY.PER_MONTH) -def betrag_versicherter_regulärer_beitragssatz( +def betrag_versicherter_regulärer_beitragssatz_m( einkommen_m: float, beitragssatz: float, ) -> float: @@ -83,13 +83,13 @@ def betrag_versicherter_regulärer_beitragssatz( unit=Unit.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( @@ -100,7 +100,7 @@ def betrag_arbeitgeber_m_ohne_arbeitgeberpauschale( ) 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: @@ -112,7 +112,7 @@ 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 @@ -125,7 +125,7 @@ def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( 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, @@ -139,7 +139,7 @@ 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 diff --git a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py index ffb9b04ebd..9cc61aa28d 100644 --- a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py +++ b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py @@ -61,7 +61,7 @@ def neue_entgeltpunkte_einheitlich( @policy_function( start_date="1992-01-01", end_date="2023-06-30", - leaf_name="rentenwert", + leaf_name="rentenwert_m", unit=Unit.CURRENCY.PER_MONTH, ) def rentenwert_nach_wohnort( diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py index 49954c7214..98eb223777 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py @@ -57,7 +57,7 @@ def betrag_m_einheitlich( entgeltpunkte: float, rentenartfaktor: float, grundsätzlich_anspruchsberechtigt: bool, - sozialversicherung__rente__rentenwert: float, + sozialversicherung__rente__rentenwert_m: float, ) -> float: """Erwerbsminderungsrente (public disability insurance). @@ -67,7 +67,7 @@ def betrag_m_einheitlich( out = ( entgeltpunkte * zugangsfaktor - * sozialversicherung__rente__rentenwert + * sozialversicherung__rente__rentenwert_m * rentenartfaktor ) else: @@ -162,7 +162,7 @@ def entgeltpunkte( unit=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_bis_06_2014( - mean_entgeltpunkte_pro_bewertungsmonat: float, + mean_entgeltpunkte_pro_bewertungsmonat_y: float, sozialversicherung__rente__alter_bei_renteneintritt: float, sozialversicherung__rente__jahr_renteneintritt: int, sozialversicherung__rente__monat_renteneintritt: int, @@ -186,7 +186,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren return ( altersgrenze_zurechnungszeit - (sozialversicherung__rente__alter_bei_renteneintritt) - ) * mean_entgeltpunkte_pro_bewertungsmonat + ) * mean_entgeltpunkte_pro_bewertungsmonat_y @policy_function( @@ -196,7 +196,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren unit=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgrenze( - mean_entgeltpunkte_pro_bewertungsmonat: float, + mean_entgeltpunkte_pro_bewertungsmonat_y: float, sozialversicherung__rente__alter_bei_renteneintritt: float, zurechnungszeitgrenze: float, ) -> float: @@ -210,7 +210,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre """ return ( zurechnungszeitgrenze - (sozialversicherung__rente__alter_bei_renteneintritt) - ) * mean_entgeltpunkte_pro_bewertungsmonat + ) * mean_entgeltpunkte_pro_bewertungsmonat_y @policy_function( @@ -219,7 +219,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre unit=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_ab_07_2017( - mean_entgeltpunkte_pro_bewertungsmonat: float, + mean_entgeltpunkte_pro_bewertungsmonat_y: float, sozialversicherung__rente__alter_bei_renteneintritt: float, sozialversicherung__rente__jahr_renteneintritt: int, sozialversicherung__rente__monat_renteneintritt: int, @@ -243,7 +243,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren return ( altersgrenze_zurechnungszeit - (sozialversicherung__rente__alter_bei_renteneintritt) - ) * mean_entgeltpunkte_pro_bewertungsmonat + ) * mean_entgeltpunkte_pro_bewertungsmonat_y @policy_function(start_date="2001-01-01", unit=Unit.DIMENSIONLESS) @@ -409,8 +409,9 @@ def anteil_entgeltpunkte_ost( @policy_function( + verify_units=False, end_date="2023-06-30", - leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", + leaf_name="mean_entgeltpunkte_pro_bewertungsmonat_y", unit=Unit.DIMENSIONLESS.PER_YEAR, ) def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( @@ -438,8 +439,9 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( @policy_function( + verify_units=False, start_date="2023-07-01", - leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", + leaf_name="mean_entgeltpunkte_pro_bewertungsmonat_y", unit=Unit.DIMENSIONLESS.PER_YEAR, ) def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py index 95dfd37651..3be897c318 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py @@ -67,19 +67,20 @@ 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=Unit.EUR.PER_MONTH, base=0.01, @@ -92,7 +93,7 @@ def _anzurechnendes_einkommen_m( 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, @@ -108,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, ) @@ -138,9 +139,9 @@ def anzurechnendes_einkommen_m( unit=Unit.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], @@ -160,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", unit=Unit.DIMENSIONLESS.PER_MONTH) -def mean_entgeltpunkte_pro_bewertungsmonat( +def mean_entgeltpunkte_pro_bewertungsmonat_m( mean_entgeltpunkte: float, bewertungszeiten_monate: int, ) -> float: @@ -221,8 +222,8 @@ def höchstbetrag_m( start_date="2021-01-01", unit=Unit.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], @@ -242,15 +243,15 @@ 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 diff --git a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml index 45f1066dd2..22b3315bf1 100644 --- a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml @@ -131,8 +131,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. diff --git a/src/gettsim/germany/wohngeld/einkommen.py b/src/gettsim/germany/wohngeld/einkommen.py index b03c9461de..98e2d05b5c 100644 --- a/src/gettsim/germany/wohngeld/einkommen.py +++ b/src/gettsim/germany/wohngeld/einkommen.py @@ -68,7 +68,7 @@ def einkommen_m_wthh( return xnp.maximum(einkommen_ohne_freibetrag, mindesteinkommen) -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(verify_units=False, unit=Unit.DIMENSIONLESS) def abzugsanteil_vom_einkommen_für_steuern_sozialversicherung( einkommensteuer__betrag_y_sn: float, sozialversicherung__rente__beitrag__betrag_versicherter_y: float, 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/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 From 41812409f31acc3b4c196d631a19757d4031abf5 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:10:03 +0200 Subject: [PATCH 28/65] Annotate Existenzminimum/Regelbedarf dataclass fields with units (#1192) Annotate the structured-parameter dataclass fields (Regelbedarfsstufen, Existenzminimum elements, SatzMitAltersgrenzen, Altersgrenzen) with Annotated[..., Unit...] so the dry-run gives plucked values their unit at the structure instead of at every pluck site (GEP 10). Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/grundsicherung/bedarfe.py | 10 +++++----- src/gettsim/germany/param_types.py | 17 ++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/gettsim/germany/grundsicherung/bedarfe.py b/src/gettsim/germany/grundsicherung/bedarfe.py index c42d56cc19..caf5c83d60 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 UNSET_UNIT, param_function +from gettsim.tt import UNSET_UNIT, Unit, param_function if TYPE_CHECKING: from gettsim.typing import RawParamValue @@ -12,9 +12,9 @@ @dataclass(frozen=True) class Regelbedarfsstufen: - rbs_1: float - rbs_2: float - rbs_3: float + rbs_1: Annotated[float, Unit.CURRENCY.PER_MONTH] + rbs_2: Annotated[float, Unit.CURRENCY.PER_MONTH] + rbs_3: Annotated[float, Unit.CURRENCY.PER_MONTH] rbs_4: SatzMitAltersgrenzen rbs_5: SatzMitAltersgrenzen rbs_6: SatzMitAltersgrenzen diff --git a/src/gettsim/germany/param_types.py b/src/gettsim/germany/param_types.py index 83d42a200b..2d9cd75346 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 Unit @dataclass(frozen=True) class Altersgrenzen: - min_alter: int - max_alter: int + min_alter: Annotated[int, Unit.YEARS] + max_alter: Annotated[int, Unit.YEARS] @dataclass(frozen=True) class SatzMitAltersgrenzen: - satz: float + satz: Annotated[float, Unit.CURRENCY.PER_MONTH] altersgrenzen: Altersgrenzen @dataclass(frozen=True) class ElementExistenzminimum: - single: float - paar: float - kind: float + single: Annotated[float, Unit.CURRENCY.PER_YEAR] + paar: Annotated[float, Unit.CURRENCY.PER_YEAR] + kind: Annotated[float, Unit.CURRENCY.PER_YEAR] @dataclass(frozen=True) class ElementExistenzminimumNurKind: - kind: float + kind: Annotated[float, Unit.CURRENCY.PER_YEAR] @dataclass(frozen=True) From ff347c893c826ee95b9ace6eb285ec92067f4bd7 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:12:18 +0200 Subject: [PATCH 29/65] Round C (part 2): count-literal casts + lohnsteuer _y renames (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cast_unit(count, DIMENSIONLESS) for n-1/n+1/n>1 count arithmetic (bürgergeld, einkommensteuer alleinerziehend, elterngeld, grundsicherung). - lohnsteuer: the yearly Tarif/Vorsorge leaves declared bare CURRENCY now carry _y + CURRENCY.PER_YEAR (basistarif_y, splittingtarif_y, tarif_klassen_5_und_6_y, their _mit_kinderfreibetrag twins, vorsorge_*_y), fixing betrag_y/vorsorgepauschale_y. Co-Authored-By: Claude Opus 4.8 --- .../freibetr\303\244ge_verm\303\266gen.py" | 4 +- .../germany/b\303\274rgergeld/regelbedarf.py" | 3 +- .../abz\303\274ge/alleinerziehend.py" | 4 +- src/gettsim/germany/elterngeld/elterngeld.py | 3 +- .../germany/elterngeld/geschwisterbonus.py | 4 +- .../grundsicherung/im_alter/im_alter.py | 10 ++-- src/gettsim/germany/lohnsteuer/einkommen.py | 30 ++++++----- src/gettsim/germany/lohnsteuer/lohnsteuer.py | 52 ++++++++++--------- 8 files changed, 61 insertions(+), 49 deletions(-) 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 ff43d1f2e5..d33d016528 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,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, policy_function, cast_unit @policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_BG) @@ -16,7 +16,7 @@ def vermögensfreibetrag_in_karenzzeit_bg( """ return ( vermögensfreibetrag_je_person_nach_karenzzeit["während_karenzzeit"] - + (familie__anzahl_personen_bg - 1) + + (cast_unit(familie__anzahl_personen_bg, Unit.DIMENSIONLESS) - 1) * vermögensfreibetrag_je_person_nach_karenzzeit["normaler_satz"] ) diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index 0751e8f5f9..a9c12266a5 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -12,6 +12,7 @@ get_consecutive_int_lookup_table_param_value, param_function, policy_function, + cast_unit, ) if TYPE_CHECKING: @@ -195,7 +196,7 @@ def berechtigte_wohnfläche( else: maximum = ( berechtigte_wohnfläche_miete["single"] - + max(anzahl_personen_hh - 1, 0) + + max(cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) - 1, 0) * berechtigte_wohnfläche_miete["je_weitere_person"] ) return min(wohnfläche, maximum / anzahl_personen_hh) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" index 0e48000a79..13dc27c62f 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, policy_function, cast_unit @policy_function( @@ -33,7 +33,7 @@ def alleinerziehend_betrag_y_nach_kinderzahl( if familie__alleinerziehend_sn: out = ( alleinerziehendenfreibetrag_basis - + (kindergeld__anzahl_ansprüche_sn - 1) + + (cast_unit(kindergeld__anzahl_ansprüche_sn, Unit.DIMENSIONLESS) - 1) * alleinerziehendenfreibetrag_zusatz_pro_kind ) else: diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index e77557e2bc..72cb837739 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -9,6 +9,7 @@ agg_by_group_function, agg_by_p_id_function, policy_function, + cast_unit, ) @@ -226,7 +227,7 @@ def bezugsmonate_unter_grenze_fg( ) elif anzahl_anträge_fg > 1: out = ( - bisherige_bezugsmonate_fg + 1 + cast_unit(bisherige_bezugsmonate_fg, Unit.DIMENSIONLESS) + 1 < max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] ) else: diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index 21606d9102..04a4859a85 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, policy_function, cast_unit @policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) @@ -54,5 +54,5 @@ def anzahl_mehrlinge_fg( anzahl_mehrlinge_jüngstes_kind_fg: int, ) -> int: """Number of multiples of the youngest child.""" - out = anzahl_mehrlinge_jüngstes_kind_fg - 1 + out = cast_unit(anzahl_mehrlinge_jüngstes_kind_fg, Unit.DIMENSIONLESS) - 1 return max(out, 0) diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index 123a09cf6f..59821182b7 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -17,7 +17,7 @@ RegelsatzAnteilsbasiert, ) -from gettsim.tt import AggType, Unit, agg_by_p_id_function, policy_function +from gettsim.tt import AggType, Unit, agg_by_p_id_function, policy_function, cast_unit @policy_function( @@ -263,7 +263,9 @@ def mehrbedarf_schwerbehinderung_g_m_vor_2011( arbeitslosengeld_2__regelsatz_anteilsbasiert.basissatz * mehrbedarf_bei_schwerbehinderungsgrad_g ) - elif (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg > 1): + elif (schwerbehindert_grad_g) and ( + cast_unit(familie__anzahl_erwachsene_eg, Unit.DIMENSIONLESS) > 1 + ): out = ( arbeitslosengeld_2__regelsatz_anteilsbasiert.basissatz * arbeitslosengeld_2__regelsatz_anteilsbasiert.erwachsen.je_erwachsener_ab_drei_erwachsene @@ -300,7 +302,9 @@ def mehrbedarf_schwerbehinderung_g_m_ab_2011( if (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg == 1): out = mehrbedarf_single - elif (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg > 1): + elif (schwerbehindert_grad_g) and ( + cast_unit(familie__anzahl_erwachsene_eg, Unit.DIMENSIONLESS) > 1 + ): out = mehrbedarf_in_couple else: out = 0.0 diff --git a/src/gettsim/germany/lohnsteuer/einkommen.py b/src/gettsim/germany/lohnsteuer/einkommen.py index 3793629ca7..02b1fd6cca 100644 --- a/src/gettsim/germany/lohnsteuer/einkommen.py +++ b/src/gettsim/germany/lohnsteuer/einkommen.py @@ -109,8 +109,10 @@ def einkommen_y_ab_2026( ) -@policy_function(start_date="2010-01-01", end_date="2025-12-31", unit=Unit.CURRENCY) -def vorsorge_krankenversicherungsbeiträge_option_a( +@policy_function( + start_date="2010-01-01", end_date="2025-12-31", unit=Unit.CURRENCY.PER_YEAR +) +def vorsorge_krankenversicherungsbeiträge_option_a_y( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, steuerklasse: int, vorsorgepauschale_mindestanteil: float, @@ -145,8 +147,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", - unit=Unit.CURRENCY, + leaf_name="vorsorge_krankenversicherungsbeiträge_option_b_y", + unit=Unit.CURRENCY.PER_YEAR, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -173,8 +175,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", - unit=Unit.CURRENCY, + leaf_name="vorsorge_krankenversicherungsbeiträge_option_b_y", + unit=Unit.CURRENCY.PER_YEAR, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -221,8 +223,8 @@ def vorsorge_gesetzliche_krankenversicherungsbeiträge_y( ) -@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY) -def vorsorge_arbeitslosenversicherungsbeiträge( +@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY.PER_YEAR) +def vorsorge_arbeitslosenversicherungsbeiträge_y( sozialversicherung__rente__beitrag__einkommen_y: float, sozialversicherung__arbeitslosen__beitrag__beitragssatz: float, ) -> float: @@ -340,7 +342,7 @@ def vorsorgepauschale_ohne_arbeitslosenversicherungsbeiträge_y( def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( vorsorge_rentenversicherungsbeiträge_y: float, vorsorge_gesetzliche_krankenversicherungsbeiträge_y: float, - vorsorge_arbeitslosenversicherungsbeiträge: float, + vorsorge_arbeitslosenversicherungsbeiträge_y: float, vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge: float, ) -> float: """Vorsorgepauschale considering unemployment insurance contributions. @@ -351,7 +353,7 @@ 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, ) @@ -378,8 +380,8 @@ def vorsorgepauschale_y_ab_2005_bis_2009() -> float: ) 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. @@ -387,8 +389,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 diff --git a/src/gettsim/germany/lohnsteuer/lohnsteuer.py b/src/gettsim/germany/lohnsteuer/lohnsteuer.py index ea29d8ba86..2f59ef2bfb 100644 --- a/src/gettsim/germany/lohnsteuer/lohnsteuer.py +++ b/src/gettsim/germany/lohnsteuer/lohnsteuer.py @@ -94,8 +94,8 @@ def parameter_max_lohnsteuer_klasse_5_6( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) -def basistarif( +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +def basistarif_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, xnp: ModuleType, @@ -108,8 +108,8 @@ def basistarif( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) -def splittingtarif( +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +def splittingtarif_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, xnp: ModuleType, @@ -122,8 +122,10 @@ def splittingtarif( ) -@policy_function(verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY) -def tarif_klassen_5_und_6( +@policy_function( + verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR +) +def tarif_klassen_5_und_6_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, parameter_max_lohnsteuer_klasse_5_6: PiecewisePolynomialParamValue, @@ -149,22 +151,22 @@ def tarif_klassen_5_und_6( @policy_function(start_date="2015-01-01", unit=Unit.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", unit=Unit.CURRENCY) -def basistarif_mit_kinderfreibetrag( +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +def basistarif_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, kinderfreibetrag_soli_y: float, @@ -182,8 +184,8 @@ def basistarif_mit_kinderfreibetrag( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY) -def splittingtarif_mit_kinderfreibetrag( +@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +def splittingtarif_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, kinderfreibetrag_soli_y: float, @@ -201,8 +203,10 @@ def splittingtarif_mit_kinderfreibetrag( ) -@policy_function(verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY) -def tarif_klassen_5_und_6_mit_kinderfreibetrag( +@policy_function( + verify_units=False, start_date="2015-01-01", unit=Unit.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, @@ -235,9 +239,9 @@ def tarif_klassen_5_und_6_mit_kinderfreibetrag( @policy_function(start_date="2015-01-01", unit=Unit.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. @@ -246,11 +250,11 @@ 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) From 30bfb5c9106949fbcc3a765859f1808e7e55570c Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:16:08 +0200 Subject: [PATCH 30/65] Round C (part 3): kinderzuschlag _bg totals declare .PER_BG (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Kinderzuschlag _bg needs (kosten_der_unterkunft, erwachsenenbedarf, anzurechnendes_einkommen, basisbetrag, vermögensfreibetrag, maximales/ mindest-einkommen) are genuine Bedarfsgemeinschaft totals, so they declare CURRENCY.PER_MONTH.PER_BG; anspruchshöhe_m = _bg / anzahl_personen_bg then resolves to the per-person amount. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/kinderzuschlag/einkommen.py | 14 +++++++------- .../germany/kinderzuschlag/kinderzuschlag.py | 16 +++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 16789a5116..58ffe0796a 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -157,7 +157,7 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( @policy_function( start_date="2005-01-01", end_date="2019-06-30", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def maximales_nettoeinkommen_m_bg( erwachsenenbedarf_m_bg: float, @@ -173,7 +173,7 @@ def maximales_nettoeinkommen_m_bg( return erwachsenenbedarf_m_bg + satz_m * anzahl_kinder_bg -@policy_function(start_date="2008-10-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2008-10-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) def mindestbruttoeinkommen_m_bg( anzahl_kinder_bg: int, familie__alleinerziehend_bg: bool, @@ -194,7 +194,7 @@ def mindestbruttoeinkommen_m_bg( return out -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) def anzurechnendes_einkommen_eltern_m_bg( nettoeinkommen_eltern_m_bg: float, erwachsenenbedarf_m_bg: float, @@ -215,7 +215,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=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def kosten_der_unterkunft_m_bg_bis_2022( wohnbedarf_anteil_eltern_bg: float, @@ -236,7 +236,7 @@ def kosten_der_unterkunft_m_bg_bis_2022( @policy_function( leaf_name="kosten_der_unterkunft_m_bg", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def kosten_der_unterkunft_m_bg_ab_2023( wohnbedarf_anteil_eltern_bg: float, @@ -350,7 +350,7 @@ def wohnbedarf_anteil_eltern_bg( leaf_name="erwachsenenbedarf_m_bg", start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def erwachsenenbedarf_m_bg_bis_2022( arbeitslosengeld_2__erwachsenensatz_m_bg: float, @@ -363,7 +363,7 @@ def erwachsenenbedarf_m_bg_bis_2022( @policy_function( leaf_name="erwachsenenbedarf_m_bg", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def erwachsenenbedarf_m_bg_ab_2023( bürgergeld__erwachsenensatz_m_bg: float, diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index ea78d08b5b..d90a891f65 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -74,7 +74,7 @@ def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( return satz_ohne_kindersofortzuschlag + bürgergeld__kindersofortzuschlag -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) def betrag_m_bg( anspruchshöhe_m_bg: float, vorrangprüfungen__wohngeld_kinderzuschlag_vorrangig_oder_günstiger: bool, @@ -95,7 +95,7 @@ def anspruchshöhe_m( return anspruchshöhe_m_bg / familie__anzahl_personen_bg -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) def anspruchshöhe_m_bg( basisbetrag_m_bg: float, vermögen_bg: float, @@ -116,7 +116,7 @@ def anspruchshöhe_m_bg( start_date="2005-01-01", end_date="2022-12-31", leaf_name="vermögensfreibetrag_bg", - unit=Unit.CURRENCY, + unit=Unit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg_bis_2022( arbeitslosengeld_2__vermögensfreibetrag_bg: float, @@ -126,7 +126,9 @@ def vermögensfreibetrag_bg_bis_2022( @policy_function( - start_date="2023-01-01", leaf_name="vermögensfreibetrag_bg", unit=Unit.CURRENCY + start_date="2023-01-01", + leaf_name="vermögensfreibetrag_bg", + unit=Unit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg_ab_2023( bürgergeld__vermögensfreibetrag_in_karenzzeit_bg: float, @@ -139,7 +141,7 @@ def vermögensfreibetrag_bg_ab_2023( start_date="2005-01-01", end_date="2008-09-30", leaf_name="basisbetrag_m_bg", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_maximales_netteinkommen( nettoeinkommen_eltern_m_bg: float, @@ -172,7 +174,7 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( start_date="2008-10-01", end_date="2019-06-30", leaf_name="basisbetrag_m_bg", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( bruttoeinkommen_eltern_m_bg: float, @@ -209,7 +211,7 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( @policy_function( start_date="2019-07-01", leaf_name="basisbetrag_m_bg", - unit=Unit.CURRENCY.PER_MONTH, + unit=Unit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_mindestbruttoeinkommen( bruttoeinkommen_eltern_m_bg: float, From a6faa876176cc9ad325b6ec21419c16cb1e00e34 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:18:53 +0200 Subject: [PATCH 31/65] Round C (part 4): rente D2 calendar-point casts (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the D2 cast to the month-since-AD constructions: cast_unit(y_to_m(cast_unit(geburtsjahr, DIMENSIONLESS)) + (geburtsmonat - 1), CALENDAR_MONTH) in für_frauen/langjährig/wegen_arbeitslosigkeit altersgrenze look-ups, and re-tag the Regelaltersgrenze epsilon comparison as YEARS. Co-Authored-By: Claude Opus 4.8 --- .../rente/altersrente/altersgrenzen.py | 8 ++-- .../f\303\274r_frauen/f\303\274r_frauen.py" | 17 +++++++-- .../langj\303\244hrig/langj\303\244hrig.py" | 12 +++++- .../wegen_arbeitslosigkeit.py | 37 +++++++++++++++---- 4 files changed, 59 insertions(+), 15 deletions(-) diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py index 3c61002c29..26060c3b94 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 Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function if TYPE_CHECKING: from types import ModuleType @@ -348,6 +348,8 @@ 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 + return m_to_y(alter_monate) > cast_unit( + sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze + + 0.00001, + Unit.YEARS, ) 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 870473a44a..a9903377b0 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,7 +7,12 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function +from gettsim.tt import ( + ConsecutiveIntLookupTableParamValue, + Unit, + policy_function, + cast_unit, +) @policy_function( @@ -27,7 +32,10 @@ def altersgrenze_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -48,7 +56,10 @@ def altersgrenze_vorzeitig_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) 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 f0791a97dd..009a6592c2 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,7 +4,12 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function +from gettsim.tt import ( + ConsecutiveIntLookupTableParamValue, + Unit, + policy_function, + cast_unit, +) @policy_function( @@ -27,7 +32,10 @@ def altersgrenze_gestaffelt_ab_1989( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) 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 f4be3cebbb..9d347f8904 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,7 +11,12 @@ from ttsim.unit_converters import y_to_m -from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function +from gettsim.tt import ( + ConsecutiveIntLookupTableParamValue, + Unit, + policy_function, + cast_unit, +) @policy_function( @@ -29,7 +34,10 @@ def altersgrenze_bis_1996( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -92,7 +100,10 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -157,7 +168,10 @@ def altersgrenze_ohne_vertrauensschutz( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -169,7 +183,10 @@ def altersgrenze_mit_vertrauensschutz( altersgrenze_gestaffelt_vertrauensschutz: ConsecutiveIntLookupTableParamValue, ) -> float: """Full retirement age for unemployed for individuals under Vertrauensschutz.""" - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_gestaffelt_vertrauensschutz.look_up(birth_month_since_ad) @@ -191,7 +208,10 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -213,7 +233,10 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) + birth_month_since_ad = cast_unit( + y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + Unit.CALENDAR_MONTH, + ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) From 23a8a9cb19f9cf3231f0d7a431c2fdda89bfb598 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:20:34 +0200 Subject: [PATCH 32/65] Round C: cast alter_bis_24 dimensioned-literal comparison (#1192) Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/individual_characteristics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gettsim/germany/individual_characteristics.py b/src/gettsim/germany/individual_characteristics.py index 8355e806c2..4fe921d8d2 100644 --- a/src/gettsim/germany/individual_characteristics.py +++ b/src/gettsim/germany/individual_characteristics.py @@ -1,6 +1,6 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, policy_function, cast_unit @policy_function(unit=Unit.DIMENSIONLESS) @@ -9,4 +9,4 @@ def alter_bis_24(alter: int) -> bool: Trivial, but necessary in order to use the target for aggregation. """ - return alter <= 24 # noqa: PLR2004 + return cast_unit(alter, Unit.DIMENSIONLESS) <= 24 # noqa: PLR2004 From 4e9ae74fe3bd08dd5e4868a5cc10da00cb346181 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:41:59 +0200 Subject: [PATCH 33/65] Round C (part 6): rente calendar-point + Entgeltpunkte casts (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Finish the D2 month-since-AD constructions and the remaining rente body casts: - The `y_to_m(...) + month_offset` re-basing needs the year operand cast to YEARS (so y_to_m rebases it to MONTHS, not month/year) and the dimensionless month offset cast to MONTHS before the sum is re-anchored to CALENDAR_MONTH. Corrects the für_frauen / wegen_arbeitslosigkeit twins (inactive at 2024 but exercised by earlier-date cases) and applies the same to langjährig altersgrenze and the erwerbsminderung claiming-month look-ups. - alter_bei_renteneintritt: re-tag the m_to_y month term as YEARS so it adds to the delta_calendar_year (year − birth-year) age difference. - älter_als_regelaltersgrenze: tag the 1e-05 float-comparison epsilon as YEARS. - grundrente höchstbetrag_m: `increment` is a per-additional-month effect on the monthly Höchstwert, so the month count enters as a dimensionless multiplier and the sum is re-tagged DIMENSIONLESS.PER_MONTH. Co-Authored-By: Claude Opus 4.8 --- .../rente/alter_bei_renteneintritt.py | 9 ++++---- .../rente/altersrente/altersgrenzen.py | 5 ++-- .../f\303\274r_frauen/f\303\274r_frauen.py" | 6 +++-- .../langj\303\244hrig/langj\303\244hrig.py" | 3 ++- .../wegen_arbeitslosigkeit.py | 18 ++++++++++----- .../erwerbsminderung/erwerbsminderung.py | 23 +++++++++++-------- .../rente/grundrente/grundrente.py | 9 ++++++-- 7 files changed, 44 insertions(+), 29 deletions(-) diff --git a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py index 55e0f571a3..59133e910d 100644 --- a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py +++ b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py @@ -4,7 +4,7 @@ from ttsim.unit_converters import m_to_y -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function @policy_function(unit=Unit.YEARS) @@ -22,8 +22,7 @@ def alter_bei_renteneintritt( month will be considered a month too young. Hence, subtract 1 additional month from monat_renteneintritt. """ - return ( - jahr_renteneintritt - - geburtsjahr - + m_to_y(monat_renteneintritt - geburtsmonat - 1) + return (jahr_renteneintritt - geburtsjahr) + cast_unit( + m_to_y(monat_renteneintritt - geburtsmonat - 1), + Unit.YEARS, ) diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py index 26060c3b94..d4b1e1b83d 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py @@ -348,8 +348,7 @@ 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) > cast_unit( + return m_to_y(alter_monate) > ( sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze - + 0.00001, - Unit.YEARS, + + cast_unit(0.00001, Unit.YEARS) ) 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 a9903377b0..5333610b57 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" @@ -33,7 +33,8 @@ def altersgrenze_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -57,7 +58,8 @@ def altersgrenze_vorzeitig_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) 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 009a6592c2..756393e970 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" @@ -33,7 +33,8 @@ def altersgrenze_gestaffelt_ab_1989( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) 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 9d347f8904..4bae6bb16a 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 @@ -35,7 +35,8 @@ def altersgrenze_bis_1996( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) @@ -101,7 +102,8 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) @@ -169,7 +171,8 @@ def altersgrenze_ohne_vertrauensschutz( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) @@ -184,7 +187,8 @@ def altersgrenze_mit_vertrauensschutz( ) -> float: """Full retirement age for unemployed for individuals under Vertrauensschutz.""" birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) @@ -209,7 +213,8 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) @@ -234,7 +239,8 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.DIMENSIONLESS)) + (geburtsmonat - 1), + y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) + + cast_unit(geburtsmonat - 1, Unit.MONTHS), Unit.CALENDAR_MONTH, ) diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py index 98eb223777..bfc6e0a0fe 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py @@ -6,7 +6,7 @@ from ttsim.unit_converters import m_to_y, y_to_m -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function if TYPE_CHECKING: from gettsim.tt import ConsecutiveIntLookupTableParamValue @@ -176,9 +176,10 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren additional earning points. They receive their average earned income points for each year between their age of retirement and the "Zurechnungszeitgrenze". """ - claiming_month_since_ad = ( - y_to_m(sozialversicherung__rente__jahr_renteneintritt) - + sozialversicherung__rente__monat_renteneintritt + claiming_month_since_ad = cast_unit( + y_to_m(cast_unit(sozialversicherung__rente__jahr_renteneintritt, Unit.YEARS)) + + cast_unit(sozialversicherung__rente__monat_renteneintritt, Unit.MONTHS), + Unit.CALENDAR_MONTH, ) altersgrenze_zurechnungszeit = zurechnungszeitgrenze_gestaffelt.look_up( claiming_month_since_ad @@ -233,9 +234,10 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren additional earning points. They receive their average earned income points for each year between their age of retirement and the "Zurechnungszeitgrenze". """ - claiming_month_since_ad = ( - y_to_m(sozialversicherung__rente__jahr_renteneintritt) - + sozialversicherung__rente__monat_renteneintritt + claiming_month_since_ad = cast_unit( + y_to_m(cast_unit(sozialversicherung__rente__jahr_renteneintritt, Unit.YEARS)) + + cast_unit(sozialversicherung__rente__monat_renteneintritt, Unit.MONTHS), + Unit.CALENDAR_MONTH, ) altersgrenze_zurechnungszeit = zurechnungszeitgrenze_gestaffelt.look_up( claiming_month_since_ad @@ -321,9 +323,10 @@ def zugangsfaktor_mit_gestaffelter_altersgrenze( 63 without deductions if they can prove 40 years of (Pflichtbeiträge, Berücksichtigungszeiten and certain Anrechnungszeiten or Ersatzzeiten). """ - claiming_month_since_ad = ( - y_to_m(sozialversicherung__rente__jahr_renteneintritt) - + sozialversicherung__rente__monat_renteneintritt + claiming_month_since_ad = cast_unit( + y_to_m(cast_unit(sozialversicherung__rente__jahr_renteneintritt, Unit.YEARS)) + + cast_unit(sozialversicherung__rente__monat_renteneintritt, Unit.MONTHS), + Unit.CALENDAR_MONTH, ) if wartezeit_langjährig_versichert_erfüllt: diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py index 3be897c318..dabfcd82e3 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py @@ -6,6 +6,7 @@ PiecewisePolynomialParamValue, RoundingSpec, Unit, + cast_unit, piecewise_polynomial, policy_function, ) @@ -207,9 +208,13 @@ def höchstbetrag_m( - berücksichtigte_wartezeit_monate["min"] ) - return ( + # `increment` is a per-additional-month effect on the (monthly) Höchstwert, so the + # month count enters as a plain multiplier; the sum is the monthly Höchstwert. + return cast_unit( höchstwert_der_entgeltpunkte["base"] - + höchstwert_der_entgeltpunkte["increment"] * months_above_thresh + + höchstwert_der_entgeltpunkte["increment"] + * cast_unit(months_above_thresh, Unit.DIMENSIONLESS), + Unit.DIMENSIONLESS.PER_MONTH, ) From 488a408e324b7b5772909f22a01c71204a60a893 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 07:52:47 +0200 Subject: [PATCH 34/65] =?UTF-8?q?Round=20C=20(part=207):=20b=C3=BCrgergeld?= =?UTF-8?q?=20per-capita=20+=20cross-level=20casts=20(#1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Per-capita attributions (bruttokaltmiete_m, heizkosten_m, wohnfläche): the `X_m_hh / anzahl_personen_hh` division carries a stray hh/person level, so the result is cast to the intended per-person target. - mehrbedarf_alleinerziehend: the child count enters the per-child share as a dimensionless multiplier. - vermögensfreibetrag_in_karenzzeit_bg: the per-person exemptions sum to the BG-level total, so the result is re-tagged .PER_BG. - überschusseinkommen_m: the BG-level surplus is attributed to each member (the `_m` name feeds the downstream `_m_eg` aggregation), so cast to per-person. - differenz_kindergeld_kindbedarf_m: reconcile the BG need and the per-capita Wohngeld share to per-person before the shortfall subtraction. - berechtigte_wohnfläche: the Eigentum branch looks up a dynamically built table whose axes the dry-run cannot model; opt the body out (the per-person division is covered by `wohnfläche`). Co-Authored-By: Claude Opus 4.8 --- .../b\303\274rgergeld/b\303\274rgergeld.py" | 9 ++++-- .../freibetr\303\244ge_verm\303\266gen.py" | 6 ++-- .../kindergeld\303\274bertrag.py" | 8 +++-- .../germany/b\303\274rgergeld/regelbedarf.py" | 32 +++++++++++++------ 4 files changed, 40 insertions(+), 15 deletions(-) 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 c5a45d23ba..d6007aeb69 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" @@ -9,7 +9,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function @policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) @@ -117,4 +117,9 @@ def überschusseinkommen_m( Reference: BSG B 14 AS 89/20 R """ - return max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg) + # The BG-level surplus is attributed to each member; downstream code aggregates + # `_m_eg` for the mixed-BG partner's Grundsicherung. + return cast_unit( + max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg), + Unit.CURRENCY.PER_MONTH, + ) 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 d33d016528..e1503bfe1a 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" @@ -14,10 +14,12 @@ def vermögensfreibetrag_in_karenzzeit_bg( This variable is also referred to as 'erhebliches Vermögen'. """ - return ( + # Per-person exemptions sum to the BG-level total wealth exemption. + return cast_unit( vermögensfreibetrag_je_person_nach_karenzzeit["während_karenzzeit"] + (cast_unit(familie__anzahl_personen_bg, Unit.DIMENSIONLESS) - 1) - * vermögensfreibetrag_je_person_nach_karenzzeit["normaler_satz"] + * vermögensfreibetrag_je_person_nach_karenzzeit["normaler_satz"], + Unit.CURRENCY.PER_BG, ) 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 4038804dbb..f3d3b89a9c 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/kindergeld\303\274bertrag.py" @@ -8,6 +8,7 @@ AggType, Unit, agg_by_p_id_function, + cast_unit, join, policy_function, ) @@ -98,8 +99,11 @@ def differenz_kindergeld_kindbedarf_m( to the parental level. """ fehlbetrag = max( - regelbedarf_m_bg - - wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh + cast_unit(regelbedarf_m_bg, Unit.CURRENCY.PER_MONTH) + - cast_unit( + wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh, + Unit.CURRENCY.PER_MONTH, + ) - nettoeinkommen_nach_abzug_freibetrag_m - unterhalt__tatsächlich_erhaltener_betrag_m - unterhaltsvorschuss__betrag_m, diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index a9c12266a5..5d0f2e8849 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -50,10 +50,9 @@ def mehrbedarf_alleinerziehend( Reference: §21 SGB II """ - basis_mehrbedarf = ( - parameter_mehrbedarf_alleinerziehend["basis_je_kind_bis_17"] - * familie__anzahl_kinder_bis_17_fg - ) + basis_mehrbedarf = parameter_mehrbedarf_alleinerziehend[ + "basis_je_kind_bis_17" + ] * cast_unit(familie__anzahl_kinder_bis_17_fg, Unit.DIMENSIONLESS) if ( familie__anzahl_kinder_bis_6_fg == 1 @@ -182,7 +181,13 @@ def anerkannte_warmmiete_je_qm_m( return min(out, mietobergrenze_pro_qm) -@policy_function(start_date="2023-01-01", unit=Unit.SQUARE_METER) +@policy_function( + start_date="2023-01-01", + unit=Unit.SQUARE_METER, + # The Eigentum branch looks up a dynamically built table whose axes the dry-run + # cannot model; the per-person division is covered by `wohnfläche` above. + verify_units=False, +) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, @@ -196,7 +201,7 @@ def berechtigte_wohnfläche( else: maximum = ( berechtigte_wohnfläche_miete["single"] - + max(cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) - 1, 0) + + max(anzahl_personen_hh - 1, 0) * berechtigte_wohnfläche_miete["je_weitere_person"] ) return min(wohnfläche, maximum / anzahl_personen_hh) @@ -213,7 +218,10 @@ def bruttokaltmiete_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh + return cast_unit( + wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh, + Unit.CURRENCY.PER_MONTH, + ) @policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) @@ -227,7 +235,10 @@ def heizkosten_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return wohnen__heizkosten_m_hh / anzahl_personen_hh + return cast_unit( + wohnen__heizkosten_m_hh / anzahl_personen_hh, + Unit.CURRENCY.PER_MONTH, + ) @policy_function(start_date="2023-01-01", unit=Unit.SQUARE_METER) @@ -236,7 +247,10 @@ def wohnfläche( anzahl_personen_hh: int, ) -> float: """Share of household's dwelling size attributed to a single person.""" - return wohnen__wohnfläche_hh / anzahl_personen_hh + return cast_unit( + wohnen__wohnfläche_hh / anzahl_personen_hh, + Unit.SQUARE_METER, + ) @dataclass(frozen=True) From 715012f792d7d21a791b8d2a3e96a38797f0883b Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:04:26 +0200 Subject: [PATCH 35/65] Round C (part 8): einkommensteuer SN totals + gesamteinkommen rename (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename `gesamteinkommen_y` → `gesamteinkommen_y_sn` and declare it .PER_SN: the body subtracts two `_y_sn` totals, so it is a Steuernummer-level quantity. The rename resolves the zu_versteuerndes_einkommen branches and betrag_ohne_ kinderfreibetrag (which assign/subtract it against `_y_sn` operands). Touches the consumers in einkommensteuer + grundsicherung and 47 test policy_case YAMLs. - anteil_steuerfälliger_einnahmen: the taxable/gross ratio is a dimensionless share; re-tag it so the `max(…, 0.0) / bruttolohn` floor branch (bare `0.0` over money) does not read as reciprocal money. - altersfreibetrag_y (ab 2005): reads two geburtsjahr-keyed lookup tables the dry-run cannot evaluate symbolically; opt the body out (unit + edges stay checked). Co-Authored-By: Claude Opus 4.8 --- .../einkommensteuer/abz\303\274ge/alter.py" | 3 +++ src/gettsim/germany/einkommensteuer/einkommen.py | 4 ++-- .../germany/einkommensteuer/einkommensteuer.py | 4 ++-- .../aus_nichtselbstst\303\244ndiger_arbeit.py" | 7 ++++--- .../zu_versteuerndes_einkommen.py | 16 ++++++++-------- .../germany/grundsicherung/im_alter/im_alter.py | 4 ++-- .../betrag/2009-01-01/hh_id_4.yaml | 2 +- .../betrag/2012-01-01/hh_id_3.yaml | 2 +- .../betrag/2015-01-01/hh_id_2.yaml | 2 +- .../betrag/2018-01-01/couple_1_child.yaml | 2 +- .../betrag/2018-01-01/hh_id_1.yaml | 2 +- .../betrag/2018-01-01/hh_id_5.yaml | 2 +- .../betrag/2023-01-01/hh_id_6.yaml | 2 +- .../betrag/2024-01-01/couple_1_child.yaml | 2 +- .../2024-01-01/couple_above_soli_freibetrag.yaml | 2 +- .../2024-01-01/single_above_soli_freibetrag.yaml | 2 +- .../2024-01-01/single_below_soli_freibetrag.yaml | 2 +- .../2010-01-01/hh_id_4.yaml" | 2 +- .../2012-01-01/hh_id_2.yaml" | 2 +- .../2016-01-01/hh_id_1.yaml" | 2 +- .../skip_2019/hh_id_5.yaml" | 2 +- .../2010-01-01/hh_id_1.yaml | 2 +- .../2010-01-01/hh_id_2.yaml | 2 +- .../2010-01-01/hh_id_3.yaml | 2 +- .../2010-01-01/hh_id_4.yaml | 2 +- .../2010-01-01/hh_id_5.yaml | 2 +- .../2015-01-01/hh_id_16.yaml | 2 +- .../2015-01-01/hh_id_17.yaml | 2 +- .../2017-01-01/hh_id_18.yaml | 2 +- .../2018-01-01/hh_id_10.yaml | 2 +- .../2018-01-01/hh_id_11.yaml | 2 +- .../2018-01-01/hh_id_12.yaml | 2 +- .../2018-01-01/hh_id_7.yaml | 2 +- .../2018-01-01/hh_id_8.yaml | 2 +- .../2018-01-01/hh_id_9.yaml | 2 +- .../2019-01-01/hh_id_13.yaml | 2 +- .../2020-01-01/hh_id_14.yaml | 2 +- .../2020-01-01/hh_id_19.yaml | 2 +- .../2020-01-01/hh_id_20.yaml | 2 +- .../kindergeld/2002-01-01/hh_id_2.yaml | 2 +- .../kindergeld/2010-01-01/hh_id_4.yaml | 2 +- .../kindergeld/2010-01-01/hh_id_6.yaml | 2 +- .../kindergeld/2011-01-01/hh_id_7.yaml | 2 +- .../kindergeld/2013-01-01/hh_id_8.yaml | 2 +- .../kindergeld/2019-01-01/hh_id_0.yaml | 2 +- .../kindergeld/2019-01-01/hh_id_1.yaml | 2 +- .../kindergeld/2019-01-01/hh_id_3.yaml | 2 +- .../kindergeld/2019-01-01/hh_id_5.yaml | 2 +- .../kindergeld/2020-01-01/hh_id_10.yaml | 2 +- .../kindergeld/2021-01-01/3_children.yaml | 2 +- .../kindergeld/2021-01-01/hh_id_11.yaml | 2 +- .../kindergeld/2021-01-01/hh_id_12.yaml | 2 +- .../kindergeld/2023-01-01/hh_id_13.yaml | 2 +- 53 files changed, 68 insertions(+), 64 deletions(-) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" index f1b4c82c16..c7d9bf1ef7 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" @@ -56,6 +56,9 @@ def altersfreibetrag_y_bis_2004( start_date="2005-01-01", leaf_name="altersfreibetrag_y", unit=Unit.CURRENCY.PER_YEAR, + # Reads two geburtsjahr-keyed lookup tables the dry-run cannot evaluate + # symbolically; its declared unit and edges stay checked. + verify_units=False, ) def altersfreibetrag_y_ab_2005( alter: int, diff --git a/src/gettsim/germany/einkommensteuer/einkommen.py b/src/gettsim/germany/einkommensteuer/einkommen.py index 4ad7963914..fe33cbce84 100644 --- a/src/gettsim/germany/einkommensteuer/einkommen.py +++ b/src/gettsim/germany/einkommensteuer/einkommen.py @@ -9,8 +9,8 @@ from gettsim.tt import Unit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_YEAR) -def gesamteinkommen_y( +@policy_function(unit=Unit.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 4d47d21f42..2e121460f0 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuer.py +++ b/src/gettsim/germany/einkommensteuer/einkommensteuer.py @@ -164,7 +164,7 @@ def betrag_mit_kinderfreibetrag_y_sn_ab_2002( unit=Unit.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, @@ -173,7 +173,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, 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 f2c607ff1d..4755d7d303 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,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, param_function, policy_function +from gettsim.tt import Unit, cast_unit, param_function, policy_function @policy_function( @@ -76,12 +76,13 @@ def anteil_steuerfälliger_einnahmen( ) -> float: """Anteil steuerfälliger Einnahmen an Einnahmen aus nichtselbstständiger Arbeit.""" if einnahmen__bruttolohn_y > 0.0: - return ( + return cast_unit( max( einnahmen__bruttolohn_y - steuerbefreite_einnahmen_y, 0.0, ) - / einnahmen__bruttolohn_y + / einnahmen__bruttolohn_y, + Unit.DIMENSIONLESS, ) else: return 0.0 diff --git a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py index a068964922..12461a10cd 100644 --- a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py +++ b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py @@ -18,14 +18,14 @@ ) 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 @@ -45,14 +45,14 @@ def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( ) 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 @@ -71,23 +71,23 @@ def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( ) 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(unit=Unit.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/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index 59821182b7..f02e4467f5 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -336,14 +336,14 @@ def vermögensfreibetrag_eg( @policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) def hat_gesamteinkommen_über_kindeseinkommensgrenze( - einkommensteuer__gesamteinkommen_y: float, + einkommensteuer__gesamteinkommen_y_sn: float, einkommensgrenze_kinder: 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 einkommensteuer__gesamteinkommen_y_sn >= einkommensgrenze_kinder @agg_by_p_id_function(agg_type=AggType.ANY) 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/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 From 3f8360105fcb359cad6ecf21c388c7954640cfb4 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:08:17 +0200 Subject: [PATCH 36/65] Round C (part 9): elterngeld count multipliers + fg levels (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - geschwisterbonus_altersgrenzen carries child-count thresholds (keys are ages, values are counts), so declare it DIMENSIONLESS, not YEARS, and compare the per-fg child counts against it as dimensionless. - mehrlingsbonus_m / anrechenbarer_betrag_m: the multiple count enters the bonus as a dimensionless multiplier. - anzahl_mehrlinge_fg: re-tag the count-minus-one result as PERSON_COUNT.PER_FG. - jüngstes_kind_oder_mehrling: read the fg-level youngest age at the person level and tag the 0.1-month comparison threshold. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/elterngeld/boni.yaml | 2 +- src/gettsim/germany/elterngeld/elterngeld.py | 9 +++++++-- src/gettsim/germany/elterngeld/geschwisterbonus.py | 10 ++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/gettsim/germany/elterngeld/boni.yaml b/src/gettsim/germany/elterngeld/boni.yaml index a03382a201..b1416d677b 100644 --- a/src/gettsim/germany/elterngeld/boni.yaml +++ b/src/gettsim/germany/elterngeld/boni.yaml @@ -14,7 +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 + unit: DIMENSIONLESS type: dict 2007-01-01: 3: 2 diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index 72cb837739..e299ac510a 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -305,7 +305,8 @@ def anrechenbarer_betrag_m( """ return max( - betrag_m - ((1 + anzahl_mehrlinge_fg) * mindestbetrag), + betrag_m + - ((1 + cast_unit(anzahl_mehrlinge_fg, Unit.DIMENSIONLESS)) * mindestbetrag), 0, ) @@ -324,5 +325,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, Unit.MONTHS) + ) + < cast_unit(0.1, Unit.MONTHS) ) and ist_leistungsbegründendes_kind diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index 04a4859a85..2f955abd0e 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -29,7 +29,7 @@ def geschwisterbonus_m( @policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) def mehrlingsbonus_m(anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind: float) -> float: """Elterngeld bonus for multiples.""" - return anzahl_mehrlinge_fg * mehrlingsbonus_pro_kind + return cast_unit(anzahl_mehrlinge_fg, Unit.DIMENSIONLESS) * mehrlingsbonus_pro_kind @policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) @@ -40,10 +40,12 @@ def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( ) -> bool: """Siblings that give rise to Elterngeld siblings bonus.""" geschwister_unter_3 = ( - familie__anzahl_kinder_bis_2_fg >= geschwisterbonus_altersgrenzen[3] + cast_unit(familie__anzahl_kinder_bis_2_fg, Unit.DIMENSIONLESS) + >= geschwisterbonus_altersgrenzen[3] ) geschwister_unter_6 = ( - familie__anzahl_kinder_bis_5_fg >= geschwisterbonus_altersgrenzen[6] + cast_unit(familie__anzahl_kinder_bis_5_fg, Unit.DIMENSIONLESS) + >= geschwisterbonus_altersgrenzen[6] ) return geschwister_unter_3 or geschwister_unter_6 @@ -55,4 +57,4 @@ def anzahl_mehrlinge_fg( ) -> int: """Number of multiples of the youngest child.""" out = cast_unit(anzahl_mehrlinge_jüngstes_kind_fg, Unit.DIMENSIONLESS) - 1 - return max(out, 0) + return cast_unit(max(out, 0), Unit.PERSON_COUNT.PER_FG) From 6d8ea656f9d9fd50b31210b7b56da1b79d0e83db Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:13:55 +0200 Subject: [PATCH 37/65] Round C (part 10): kinderzuschlag count multipliers + BG threshold (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - wohnbedarf_anteil_eltern_bg: the per-bg child count enters the min against a plain count param as a dimensionless multiplier. - mindestbruttoeinkommen_m_bg: the statutory min-income thresholds apply to the Bedarfsgemeinschaft, so re-tag the plucked value .PER_BG. - basisbetrag_m_bg: compare the per-bg adult count against the literal `1` as a dimensionless count. - basisbetrag_kind_m: the leistungsbegründend selector enters as a dimensionless 0/1 multiplier so the per-child amount stays per-person. Co-Authored-By: Claude Opus 4.8 --- .../germany/kinderzuschlag/einkommen.py | 6 +++-- .../germany/kinderzuschlag/kinderzuschlag.py | 22 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 58ffe0796a..56b6615302 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -16,6 +16,7 @@ RoundingSpec, Unit, agg_by_group_function, + cast_unit, param_function, policy_function, ) @@ -191,7 +192,8 @@ def mindestbruttoeinkommen_m_bg( else: out = mindesteinkommen["paar"] - return out + # The statutory thresholds apply to the Bedarfsgemeinschaft as a whole. + return cast_unit(out, Unit.CURRENCY.PER_MONTH.PER_BG) @policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) @@ -339,7 +341,7 @@ def wohnbedarf_anteil_eltern_bg( ) kinderbetrag = min( - anzahl_kinder_bg, + cast_unit(anzahl_kinder_bg, Unit.DIMENSIONLESS), wohnbedarf_anteil_berücksichtigte_kinder, ) * (existenzminimum.kosten_der_unterkunft.kind + existenzminimum.heizkosten.kind) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index d90a891f65..9d524a1e89 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 Unit, param_function, policy_function +from gettsim.tt import Unit, cast_unit, param_function, policy_function if TYPE_CHECKING: from gettsim.germany.param_types import ( @@ -157,12 +157,12 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( threshold. Kinderzuschlag is only paid out if parents are part of the BG - (familie__anzahl_erwachsene_bg >= 1). + (cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1). """ if ( nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg - ) and familie__anzahl_erwachsene_bg >= 1: + ) and cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1: out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: out = 0.0 @@ -193,13 +193,13 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( threshold. Kinderzuschlag is only paid out if parents are part of the BG - (familie__anzahl_erwachsene_bg >= 1). + (cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1). """ if ( (bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg) and (nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg) - and familie__anzahl_erwachsene_bg >= 1 + and cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1 ): out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: @@ -227,12 +227,12 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( minimum income threshold. Kinderzuschlag is only paid out if parents are part of the BG - (familie__anzahl_erwachsene_bg >= 1). + (cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1). """ if ( bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg - ) and familie__anzahl_erwachsene_bg >= 1: + ) and cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1: out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: out = 0.0 @@ -256,7 +256,9 @@ def basisbetrag_kind_m_bis_2022( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = kindergeld__ist_leistungsbegründendes_kind * ( + out = cast_unit( + kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS + ) * ( satz_m - entzugsrate_kindeseinkommen * ( @@ -285,7 +287,9 @@ def basisbetrag_kind_m_ab_2023( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = kindergeld__ist_leistungsbegründendes_kind * ( + out = cast_unit( + kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS + ) * ( satz_m - entzugsrate_kindeseinkommen * ( From 1e7c146ae70170190f387214cd076b01a02155e6 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:24:43 +0200 Subject: [PATCH 38/65] Round C (part 11): grundsicherung/vorrang/unterhaltsvorschuss casts (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - grundsicherung im_alter anspruchshöhe_m: the Verhältnislösung distributes the EG surplus by each member's restbedarf share; re-tag the per-person result so the surplus-is-zero branch keeps its currency. - hat_gesamteinkommen_über_kindeseinkommensgrenze: read the child's Steuernummer-level Gesamteinkommen as their individual income for the threshold. - vorrangprüfungen (both eras): the check assumes WTHH = BG, so cast the Wohngeld claim to BG level and tag the BG-level comparison as the person-level flag. - unterhaltsvorschuss: cast the literal-index Kindergeld look-up to its currency; opt out the anspruchshöhe variants that pluck age bounds off a dict-of-dataclass parameter (opaque through the dict subscript). Co-Authored-By: Claude Opus 4.8 --- .../grundsicherung/im_alter/im_alter.py | 24 +++++++++++++------ .../unterhaltsvorschuss.py | 15 +++++++++++- .../vorrangpr\303\274fungen.py" | 18 ++++++++------ 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index f02e4467f5..c2368a2f5c 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -117,9 +117,12 @@ def anspruchshöhe_m_bis_2022( if individueller_restbedarf_m_eg == 0.0 or not vermögensgrenze_unterschritten_eg: return 0.0 else: - return ( - individueller_restbedarf_m / individueller_restbedarf_m_eg - ) * anspruch_m_eg + # Distribute the EG-level surplus by each member's share of the EG restbedarf. + return cast_unit( + (individueller_restbedarf_m / individueller_restbedarf_m_eg) + * anspruch_m_eg, + Unit.CURRENCY.PER_MONTH, + ) @policy_function( @@ -156,9 +159,12 @@ def anspruchshöhe_m_ab_2023( if individueller_restbedarf_m_eg == 0.0 or not vermögensgrenze_unterschritten_eg: return 0.0 else: - return ( - individueller_restbedarf_m / individueller_restbedarf_m_eg - ) * anspruch_m_eg + # Distribute the EG-level surplus by each member's share of the EG restbedarf. + return cast_unit( + (individueller_restbedarf_m / individueller_restbedarf_m_eg) + * anspruch_m_eg, + Unit.CURRENCY.PER_MONTH, + ) @policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) @@ -343,7 +349,11 @@ def hat_gesamteinkommen_über_kindeseinkommensgrenze( Reference: § 43 SGB XII (BGBl. I 2003 S. 3022) """ - return einkommensteuer__gesamteinkommen_y_sn >= einkommensgrenze_kinder + # The child's Steuernummer-level Gesamteinkommen is read as their individual income. + return ( + cast_unit(einkommensteuer__gesamteinkommen_y_sn, Unit.CURRENCY.PER_YEAR) + >= einkommensgrenze_kinder + ) @agg_by_p_id_function(agg_type=AggType.ANY) diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py index 62949843bf..9a7820212a 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py @@ -14,6 +14,7 @@ RoundingSpec, Unit, agg_by_p_id_function, + cast_unit, join, param_function, policy_function, @@ -131,7 +132,9 @@ def kindergeld_erstes_kind_gestaffelt_m( kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, ) -> float: """Kindergeld for first child when Kindergeld depends on number of children.""" - return kindergeld__satz_nach_anzahl_kinder.look_up(1) + return cast_unit( + kindergeld__satz_nach_anzahl_kinder.look_up(1), Unit.CURRENCY.PER_MONTH + ) @policy_function( @@ -139,6 +142,8 @@ def kindergeld_erstes_kind_gestaffelt_m( end_date="2014-12-31", leaf_name="anspruchshöhe_m", unit=Unit.CURRENCY.PER_MONTH, + # Plucks age bounds off a dict-of-dataclass parameter the dry-run cannot follow. + verify_units=False, ) def unterhaltsvorschuss_anspruch_m_2009_bis_2014( alter: int, @@ -189,6 +194,8 @@ def unterhaltsvorschuss_anspruch_m_2009_bis_2014( end_date="2015-12-31", leaf_name="anspruchshöhe_m", unit=Unit.CURRENCY.PER_MONTH, + # Plucks age bounds off a dict-of-dataclass parameter the dry-run cannot follow. + verify_units=False, ) def anspruchshöhe_m_anwendungsvors( alter: int, @@ -222,6 +229,9 @@ def anspruchshöhe_m_anwendungsvors( end_date="2017-06-30", leaf_name="anspruchshöhe_m", unit=Unit.CURRENCY.PER_MONTH, + # Plucks age bounds and Satz off a dict-of-dataclass parameter the dry-run + # cannot follow through the dict subscript. + verify_units=False, ) def anspruchshöhe_m_2016_bis_2017_06( alter: int, @@ -256,6 +266,9 @@ def anspruchshöhe_m_2016_bis_2017_06( start_date="2017-07-01", leaf_name="anspruchshöhe_m", unit=Unit.CURRENCY.PER_MONTH, + # Plucks age bounds and Satz off a dict-of-dataclass parameter, which the + # dry-run cannot follow through the dict subscript. + verify_units=False, ) def anspruchshöhe_m_ab_2017_07( alter: int, 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 f2ef11143a..ca74009312 100644 --- "a/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" +++ "b/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" @@ -3,7 +3,7 @@ from __future__ import annotations from gettsim.germany import WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function @policy_function( @@ -26,11 +26,13 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( """ # TODO (@MImmesberger): Vorrangprüfung probably not precise for SGB XII households. # https://github.com/ttsim-dev/gettsim/issues/1165 - return ( + # The check assumes WTHH = BG, so compare BG-level resources against the BG need. + return cast_unit( arbeitslosengeld_2__anzurechnendes_einkommen_m_bg - + wohngeld__anspruchshöhe_m_wthh + + cast_unit(wohngeld__anspruchshöhe_m_wthh, Unit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg - >= arbeitslosengeld_2__regelbedarf_m_bg + >= arbeitslosengeld_2__regelbedarf_m_bg, + Unit.DIMENSIONLESS, ) @@ -54,9 +56,11 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( """ # TODO (@MImmesberger): Vorrangprüfung probably not precise for SGB XII households. # https://github.com/ttsim-dev/gettsim/issues/1165 - return ( + # The check assumes WTHH = BG, so compare BG-level resources against the BG need. + return cast_unit( bürgergeld__anzurechnendes_einkommen_m_bg - + wohngeld__anspruchshöhe_m_wthh + + cast_unit(wohngeld__anspruchshöhe_m_wthh, Unit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg - >= bürgergeld__regelbedarf_m_bg + >= bürgergeld__regelbedarf_m_bg, + Unit.DIMENSIONLESS, ) From c0927bd62c34744fa284cf7a8cca604c9283835a Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:39:14 +0200 Subject: [PATCH 39/65] Round C (part 12): wohngeld plucks/axes + cross-level Vertikalmethode (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wohngeld: - miete_m_wthh / min_miete_m_hh: cast the per-capita reweighting and the count-keyed min-rent look-up to their per-person currency. - miete_m_hh (2009+): the max-Miete / heating look-ups are dimensionless-indexed, so cast the person-per-hh count to a plain index; the pre-2009 Baujahr variant uses `xnp.searchsorted` over three axes and opts out (GEP 10 D3). - einkommen_m_wthh: raw `xnp`/`.shape` index clamping opts out. - basisbetrag_m_wthh: the Basisformel is quadratic in (Miete, Einkommen) with per-currency coefficients the grammar cannot spell, so it opts out (GEP 10 D1). - mindesteinkommen_erreicht / einkommen_für_mindesteinkommen / vermögensgrenze: reconcile the wthh totals and per-person threshold levels. Cross-level casts surfaced once the masking errors cleared: - bürgergeld anspruchshöhe_m: fold the EG surplus into the BG pool and distribute by Bedarf share (Vertikalmethode). - kinderzuschlag anspruchshöhe_m_bg: net excess wealth (a stock) against the monthly claim. Co-Authored-By: Claude Opus 4.8 --- .../b\303\274rgergeld/b\303\274rgergeld.py" | 12 +++++--- .../germany/kinderzuschlag/kinderzuschlag.py | 6 +++- src/gettsim/germany/wohngeld/einkommen.py | 7 ++++- src/gettsim/germany/wohngeld/miete.py | 30 +++++++++++++------ .../germany/wohngeld/voraussetzungen.py | 26 +++++++++------- src/gettsim/germany/wohngeld/wohngeld.py | 6 ++++ 6 files changed, 62 insertions(+), 25 deletions(-) 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 d6007aeb69..9f8261e2aa 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" @@ -43,16 +43,20 @@ 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 + total_income_m_bg = einkommen_zur_verteilung_m_bg + cast_unit( + grundsicherung__im_alter__überschusseinkommen_m_eg, + Unit.CURRENCY.PER_MONTH.PER_BG, ) anspruch_m_bg = max(0.0, ungedeckter_bedarf_m_bg - total_income_m_bg) if ungedeckter_bedarf_m_bg == 0.0 or vermögen_bg > vermögensfreibetrag_bg: return 0.0 else: - return (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg + # Distribute the BG surplus by each member's share of the BG Bedarf. + return cast_unit( + (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg, + Unit.CURRENCY.PER_MONTH, + ) @policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index 9d524a1e89..529468621e 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -103,8 +103,12 @@ 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, Unit.CURRENCY.PER_MONTH.PER_BG + ), 0.0, ) else: diff --git a/src/gettsim/germany/wohngeld/einkommen.py b/src/gettsim/germany/wohngeld/einkommen.py index 98e2d05b5c..17a13f7902 100644 --- a/src/gettsim/germany/wohngeld/einkommen.py +++ b/src/gettsim/germany/wohngeld/einkommen.py @@ -45,7 +45,12 @@ def min_einkommen_lookup_table( return get_consecutive_int_lookup_table_param_value(raw=min_einkommen, xnp=xnp) -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function( + unit=Unit.CURRENCY.PER_MONTH, + # Clamps the look-up index with a raw `xnp` op reading the table's `.shape`, + # which the dry-run cannot evaluate symbolically. + verify_units=False, +) def einkommen_m_wthh( anzahl_personen_wthh: int, freibetrag_m_wthh: float, diff --git a/src/gettsim/germany/wohngeld/miete.py b/src/gettsim/germany/wohngeld/miete.py index ce7f546c2a..976a38c560 100644 --- a/src/gettsim/germany/wohngeld/miete.py +++ b/src/gettsim/germany/wohngeld/miete.py @@ -9,6 +9,7 @@ UNSET_UNIT, ConsecutiveIntLookupTableParamValue, Unit, + cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -174,7 +175,10 @@ def miete_m_wthh( """Rent considered in housing benefit calculation on wohngeldrechtlicher Teilhaushalt level. """ - return miete_m_hh * (anzahl_personen_wthh / anzahl_personen_hh) + return cast_unit( + miete_m_hh * (anzahl_personen_wthh / anzahl_personen_hh), + Unit.CURRENCY.PER_MONTH, + ) @policy_function(unit=Unit.CURRENCY.PER_MONTH) @@ -183,7 +187,9 @@ def min_miete_m_hh( min_miete_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Minimum rent considered in Wohngeld calculation.""" - return min_miete_lookup.look_up(anzahl_personen_hh) + return cast_unit( + min_miete_lookup.look_up(anzahl_personen_hh), Unit.CURRENCY.PER_MONTH + ) @policy_function( @@ -191,6 +197,9 @@ def min_miete_m_hh( end_date="2008-12-31", leaf_name="miete_m_hh", unit=Unit.CURRENCY.PER_MONTH, + # Three input axes with different units resolved via `xnp.searchsorted`, which + # the dry-run cannot evaluate symbolically. + verify_units=False, ) def miete_m_hh_mit_baujahr( mietstufe_hh: int, @@ -227,7 +236,8 @@ def miete_m_hh_ohne_baujahr_ohne_heizkostenentlastung( max_miete_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - max_miete_m = max_miete_m_lookup.look_up(anzahl_personen_hh, mietstufe_hh) + anzahl_personen = cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) + max_miete_m = max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh) return max(min(wohnen__bruttokaltmiete_m_hh, max_miete_m), min_miete_m_hh) @@ -247,9 +257,10 @@ def miete_m_hh_mit_heizkostenentlastung( heizkostenentlastung_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - max_miete_m = max_miete_m_lookup.look_up(anzahl_personen_hh, mietstufe_hh) + anzahl_personen = cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) + max_miete_m = max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh) - heating_allowance_m = heizkostenentlastung_m_lookup.look_up(anzahl_personen_hh) + heating_allowance_m = heizkostenentlastung_m_lookup.look_up(anzahl_personen) return ( max(min(wohnen__bruttokaltmiete_m_hh, max_miete_m), min_miete_m_hh) @@ -273,13 +284,14 @@ def miete_m_hh_mit_heizkostenentlastung_dauerhafte_heizkostenkomponente_klimakom klimakomponente_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - max_miete_m = max_miete_m_lookup.look_up(anzahl_personen_hh, mietstufe_hh) + anzahl_personen = cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) + max_miete_m = max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh) - heizkostenentlastung = heizkostenentlastung_m_lookup.look_up(anzahl_personen_hh) + heizkostenentlastung = heizkostenentlastung_m_lookup.look_up(anzahl_personen) dauerhafte_heizkostenkomponente = dauerhafte_heizkostenkomponente_m_lookup.look_up( - anzahl_personen_hh + anzahl_personen ) - klimakomponente = klimakomponente_m_lookup.look_up(anzahl_personen_hh) + klimakomponente = klimakomponente_m_lookup.look_up(anzahl_personen) return ( max( min(wohnen__bruttokaltmiete_m_hh, max_miete_m + klimakomponente), diff --git a/src/gettsim/germany/wohngeld/voraussetzungen.py b/src/gettsim/germany/wohngeld/voraussetzungen.py index df8256b6b1..bd33d9cf64 100644 --- a/src/gettsim/germany/wohngeld/voraussetzungen.py +++ b/src/gettsim/germany/wohngeld/voraussetzungen.py @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function @policy_function( @@ -40,9 +40,11 @@ def vermögensgrenze_unterschritten_wthh( """Wealth is below the eligibility threshold for housing benefits.""" vermögensfreibetrag = parameter_vermögensfreibetrag[ "grundfreibetrag" - ] + parameter_vermögensfreibetrag["je_weitere_person"] * (anzahl_personen_wthh - 1) + ] + parameter_vermögensfreibetrag["je_weitere_person"] * ( + cast_unit(anzahl_personen_wthh, Unit.DIMENSIONLESS) - 1 + ) - return vermögen_wthh <= vermögensfreibetrag + return cast_unit(vermögen_wthh, Unit.CURRENCY) <= vermögensfreibetrag @policy_function( @@ -67,8 +69,8 @@ def mindesteinkommen_erreicht_wthh_bis_2022( The allowance for discretionary judgment is ignored here. """ - return ( - einkommen_für_mindesteinkommen_m_wthh >= arbeitslosengeld_2__regelbedarf_m_wthh + return einkommen_für_mindesteinkommen_m_wthh >= cast_unit( + arbeitslosengeld_2__regelbedarf_m_wthh, Unit.CURRENCY.PER_MONTH ) @@ -93,7 +95,9 @@ def mindesteinkommen_erreicht_wthh_ab_2023( The allowance for discretionary judgment is ignored here. """ - return einkommen_für_mindesteinkommen_m_wthh >= bürgergeld__regelbedarf_m_wthh + return einkommen_für_mindesteinkommen_m_wthh >= cast_unit( + bürgergeld__regelbedarf_m_wthh, Unit.CURRENCY.PER_MONTH + ) @policy_function( @@ -120,13 +124,14 @@ def einkommen_für_mindesteinkommen_m_wthh_bis_2022( Kindergeld count as income for this check. """ - return ( + return cast_unit( arbeitslosengeld_2__nettoeinkommen_vor_abzug_freibetrag_m_wthh + unterhalt__tatsächlich_erhaltener_betrag_m_wthh + unterhaltsvorschuss__betrag_m_wthh + kindergeld__betrag_m_wthh + kinderzuschlag__anspruchshöhe_m_wthh - + basisbetrag_m_wthh + + cast_unit(basisbetrag_m_wthh, Unit.CURRENCY.PER_MONTH.PER_WTHH), + Unit.CURRENCY.PER_MONTH, ) @@ -153,11 +158,12 @@ def einkommen_für_mindesteinkommen_m_wthh_ab_2023( Kindergeld count as income for this check. """ - return ( + return cast_unit( bürgergeld__nettoeinkommen_vor_abzug_freibetrag_m_wthh + unterhalt__tatsächlich_erhaltener_betrag_m_wthh + unterhaltsvorschuss__betrag_m_wthh + kindergeld__betrag_m_wthh + kinderzuschlag__anspruchshöhe_m_wthh - + basisbetrag_m_wthh + + cast_unit(basisbetrag_m_wthh, Unit.CURRENCY.PER_MONTH.PER_WTHH), + Unit.CURRENCY.PER_MONTH, ) diff --git a/src/gettsim/germany/wohngeld/wohngeld.py b/src/gettsim/germany/wohngeld/wohngeld.py index bd372abdf2..6aff938051 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.py +++ b/src/gettsim/germany/wohngeld/wohngeld.py @@ -65,6 +65,9 @@ def anspruchshöhe_m_wthh( reference="§ 19 WoGG Abs.2 Anlage 3", ), unit=Unit.CURRENCY.PER_MONTH, + # Quadratic in (Miete, Einkommen); its per-currency coefficients are not + # spellable in the unit grammar (GEP 10 D1). + verify_units=False, ) def basisbetrag_m_wthh_bis_2000( anzahl_personen_wthh: int, @@ -98,6 +101,9 @@ def basisbetrag_m_wthh_bis_2000( reference="§ 19 WoGG Abs.2 Anlage 3", ), unit=Unit.CURRENCY.PER_MONTH, + # Quadratic in (Miete, Einkommen); its per-currency coefficients are not + # spellable in the unit grammar (GEP 10 D1). + verify_units=False, ) def basisbetrag_m_wthh_ab_2001( anzahl_personen_wthh: int, From e20b595b5bd54e21f1c92161f5c9cecb67c52847 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:49:55 +0200 Subject: [PATCH 40/65] Round C (part 13): arbeitslosengeld_2 (pre-2023 twin) + RegelsatzAnteil (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pre-2023 ALG II namespace mirrors bürgergeld, so it needs the same casts: per-capita miete/heizkosten/wohnfläche, mehrbedarf count multiplier, the Bedarfsanteils-/Vertikalmethode (EG surplus → BG pool, distribute by Bedarf share), überschusseinkommen BG→person, differenz_kindergeld reconciliation, and the dynamically built Eigentum lookup opt-out. - nettoquote: the net/gross ratio is dimensionless; re-tag it so the `max(…, 0)` floor branch does not read as reciprocal money. - Annotate the `RegelsatzAnteilsbasiert` dataclass tree (basissatz CURRENCY.PER_ MONTH, the Anteile DIMENSIONLESS, the age bounds YEARS) so the erwachsenensatz / kindersatz / grundsicherung mehrbedarf-schwerbehinderung plucks carry units. Co-Authored-By: Claude Opus 4.8 --- .../arbeitslosengeld_2/arbeitslosengeld_2.py | 21 ++++++--- .../germany/arbeitslosengeld_2/einkommen.py | 3 +- .../kindergeld\303\274bertrag.py" | 8 +++- .../germany/arbeitslosengeld_2/regelbedarf.py | 46 +++++++++++++------ 4 files changed, 54 insertions(+), 24 deletions(-) diff --git a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py index 7dea284a23..06c64bc61b 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py +++ b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py @@ -9,7 +9,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import Unit, cast_unit, policy_function @policy_function( @@ -47,16 +47,20 @@ 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 + total_income_m_bg = einkommen_zur_verteilung_m_bg + cast_unit( + grundsicherung__im_alter__überschusseinkommen_m_eg, + Unit.CURRENCY.PER_MONTH.PER_BG, ) anspruch_m_bg = max(0.0, ungedeckter_bedarf_m_bg - total_income_m_bg) if ungedeckter_bedarf_m_bg == 0.0 or vermögen_bg > vermögensfreibetrag_bg: return 0.0 else: - return (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg + # Distribute the BG surplus by each member's share of the BG Bedarf. + return cast_unit( + (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg, + Unit.CURRENCY.PER_MONTH, + ) @policy_function( @@ -127,4 +131,9 @@ def überschusseinkommen_m( Reference: BSG B 14 AS 89/20 R """ - return max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg) + # The BG-level surplus is attributed to each member; downstream code aggregates + # `_m_eg` for the mixed-BG partner's Grundsicherung. + return cast_unit( + max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg), + Unit.CURRENCY.PER_MONTH, + ) diff --git a/src/gettsim/germany/arbeitslosengeld_2/einkommen.py b/src/gettsim/germany/arbeitslosengeld_2/einkommen.py index b397301a44..5e664e4c72 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/einkommen.py +++ b/src/gettsim/germany/arbeitslosengeld_2/einkommen.py @@ -7,6 +7,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, Unit, + cast_unit, piecewise_polynomial, policy_function, ) @@ -127,7 +128,7 @@ def nettoquote( 0, ) - return alg2_2005_bne / einnahmen__bruttolohn_m + return cast_unit(alg2_2005_bne / einnahmen__bruttolohn_m, Unit.DIMENSIONLESS) @policy_function( diff --git "a/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" "b/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" index 8efb877571..af7f5e40f5 100644 --- "a/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" +++ "b/src/gettsim/germany/arbeitslosengeld_2/kindergeld\303\274bertrag.py" @@ -8,6 +8,7 @@ AggType, Unit, agg_by_p_id_function, + cast_unit, join, policy_function, ) @@ -109,8 +110,11 @@ def differenz_kindergeld_kindbedarf_m( to the parental level. """ fehlbetrag = max( - regelbedarf_m_bg - - wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh + cast_unit(regelbedarf_m_bg, Unit.CURRENCY.PER_MONTH) + - cast_unit( + wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh, + Unit.CURRENCY.PER_MONTH, + ) - nettoeinkommen_nach_abzug_freibetrag_m - unterhalt__tatsächlich_erhaltener_betrag_m - unterhaltsvorschuss__betrag_m, diff --git a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py index 3f61e5ebeb..2506f41b72 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py +++ b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py @@ -3,12 +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, Unit, + cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -53,10 +54,9 @@ def mehrbedarf_alleinerziehend( Reference: §21 SGB II """ - basis_mehrbedarf = ( - parameter_mehrbedarf_alleinerziehend["basis_je_kind_bis_17"] - * familie__anzahl_kinder_bis_17_fg - ) + basis_mehrbedarf = parameter_mehrbedarf_alleinerziehend[ + "basis_je_kind_bis_17" + ] * cast_unit(familie__anzahl_kinder_bis_17_fg, Unit.DIMENSIONLESS) if ( familie__anzahl_kinder_bis_6_fg == 1 @@ -292,7 +292,14 @@ def anerkannte_warmmiete_je_qm_m( return min(out, mietobergrenze_pro_qm) -@policy_function(start_date="2005-01-01", end_date="2022-12-31", unit=Unit.SQUARE_METER) +@policy_function( + start_date="2005-01-01", + end_date="2022-12-31", + unit=Unit.SQUARE_METER, + # The Eigentum branch looks up a dynamically built table whose axes the dry-run + # cannot model; the per-person division is covered by `wohnfläche` above. + verify_units=False, +) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, @@ -325,7 +332,10 @@ def bruttokaltmiete_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh + return cast_unit( + wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh, + Unit.CURRENCY.PER_MONTH, + ) @policy_function( @@ -341,7 +351,10 @@ def heizkosten_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return wohnen__heizkosten_m_hh / anzahl_personen_hh + return cast_unit( + wohnen__heizkosten_m_hh / anzahl_personen_hh, + Unit.CURRENCY.PER_MONTH, + ) @policy_function(start_date="2005-01-01", end_date="2022-12-31", unit=Unit.SQUARE_METER) @@ -350,20 +363,23 @@ def wohnfläche( anzahl_personen_hh: int, ) -> float: """Share of household's dwelling size attributed to a single person.""" - return wohnen__wohnfläche_hh / anzahl_personen_hh + return cast_unit( + wohnen__wohnfläche_hh / anzahl_personen_hh, + Unit.SQUARE_METER, + ) @dataclass(frozen=True) class RegelsatzAnteilErwachsen: - je_erwachsener_bei_zwei_erwachsenen: float - je_erwachsener_ab_drei_erwachsene: float + je_erwachsener_bei_zwei_erwachsenen: Annotated[float, Unit.DIMENSIONLESS] + je_erwachsener_ab_drei_erwachsene: Annotated[float, Unit.DIMENSIONLESS] @dataclass(frozen=True) class RegelsatzAnteilKind: - anteil: float - min_alter: int - max_alter: int + anteil: Annotated[float, Unit.DIMENSIONLESS] + min_alter: Annotated[int, Unit.YEARS] + max_alter: Annotated[int, Unit.YEARS] @dataclass(frozen=True) @@ -375,7 +391,7 @@ class RegelsatzAnteilKindNachAlter: @dataclass(frozen=True) class RegelsatzAnteilsbasiert: - basissatz: float + basissatz: Annotated[float, Unit.CURRENCY.PER_MONTH] erwachsen: RegelsatzAnteilErwachsen kind: RegelsatzAnteilKindNachAlter From 067776b443a381b3cbd2d57ef5eaae0df3c18c2e Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 08:52:11 +0200 Subject: [PATCH 41/65] Round C (part 14): kindergeld staffelung look-ups + kind_bis_10 (#1192) The pre-2023 Kindergeld-nach-Kinderzahl look-up returns an untagged value, so tag its currency at each `.look_up` site: kindergeld betrag_gestaffelt_m, kinderzuschlag satz_m, einkommensteuer relevantes_kindergeld_m. Also tag the age-10 literal in kind_bis_10_mit_kindergeld. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/einkommensteuer/einkommensteuer.py | 9 ++++++++- src/gettsim/germany/kindergeld/kindergeld.py | 9 +++++++-- src/gettsim/germany/kinderzuschlag/kinderzuschlag.py | 4 +++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuer.py b/src/gettsim/germany/einkommensteuer/einkommensteuer.py index 2e121460f0..fe027cf072 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuer.py +++ b/src/gettsim/germany/einkommensteuer/einkommensteuer.py @@ -14,6 +14,7 @@ RoundingSpec, Unit, agg_by_p_id_function, + cast_unit, get_piecewise_parameters, intervals_to_thresholds, param_function, @@ -203,7 +204,13 @@ def relevantes_kindergeld_mit_staffelung_m( """ kindergeld_ansprüche = anzahl_kindergeld_ansprüche_1 + anzahl_kindergeld_ansprüche_2 - return kindergeld__satz_nach_anzahl_kinder.look_up(kindergeld_ansprüche) / 2 + return ( + cast_unit( + kindergeld__satz_nach_anzahl_kinder.look_up(kindergeld_ansprüche), + Unit.CURRENCY.PER_MONTH, + ) + / 2 + ) @policy_function( diff --git a/src/gettsim/germany/kindergeld/kindergeld.py b/src/gettsim/germany/kindergeld/kindergeld.py index bd71f4a313..4e7581d624 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -10,6 +10,7 @@ ConsecutiveIntLookupTableParamValue, Unit, agg_by_p_id_function, + cast_unit, get_consecutive_int_lookup_table_param_value, join, param_function, @@ -60,7 +61,9 @@ 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), Unit.CURRENCY.PER_MONTH + ) @policy_function( @@ -131,7 +134,9 @@ def kind_bis_10_mit_kindergeld( 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, Unit.YEARS) # noqa: PLR2004 + ) @policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index 529468621e..b7789ad509 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -40,7 +40,9 @@ def satz_mit_gestaffeltem_kindergeld( + existenzminimum.kosten_der_unterkunft.kind + existenzminimum.heizkosten.kind ) - - kindergeld__satz_nach_anzahl_kinder.look_up(1), + - cast_unit( + kindergeld__satz_nach_anzahl_kinder.look_up(1), Unit.CURRENCY.PER_MONTH + ), satz_vorjahr_ohne_kindersofortzuschlag, ) From ee19a8ee877aa09cb6f6f8fb889f0e653da8f398 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 09:02:40 +0200 Subject: [PATCH 42/65] Round C (part 15): erziehungsgeld + vorsorge/ertragsanteil opt-outs (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - erziehungsgeld: reconcile the fg-level Abzug against the per-person Anspruch and re-tag the fg-level Einkommensgrenze (with the child count as a dimensionless multiplier); the base thresholds pluck dict-typed dataclass fields the dry-run cannot follow through the subscript, so those two functions opt out. - einkommensteuer vorsorge (regime_bis_2004 + vorwegabzug_lohnsteuer): per-capita Splitting formulas (÷ then × anzahl_personen_sn) the level model cannot follow. - einkünfte sonstige ertragsanteil_gesetzliche_rente: the look-up index is built with raw `xnp.floor(...).astype(int)`. The `fail_msg_if_included` placeholder stubs (elterngeld/lohnsteuer/unterhalts- vorschuss betrag_m etc.) are handled upstream — the dry-run now skips them. Co-Authored-By: Claude Opus 4.8 --- .../abz\303\274ge/vorsorge.py" | 16 +++++++++-- .../eink\303\274nfte/sonstige/rente/rente.py" | 8 +++++- .../germany/erziehungsgeld/erziehungsgeld.py | 27 +++++++++++++++---- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" index 33ff56592d..7e73c7c447 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" @@ -109,7 +109,13 @@ def vorsorgeaufwendungen_y_sn_ab_2020( return vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn -@policy_function(end_date="2019-12-31", unit=Unit.CURRENCY.PER_YEAR.PER_SN) +@policy_function( + end_date="2019-12-31", + unit=Unit.CURRENCY.PER_YEAR.PER_SN, + # A per-capita Splitting formula (÷ then × anzahl_personen_sn) the dry-run's + # level model cannot follow; declared unit and edges stay checked. + verify_units=False, +) def vorsorgeaufwendungen_regime_bis_2004_y_sn( vorwegabzug_lohnsteuer_y_sn: float, sozialversicherung__kranken__beitrag__betrag_versicherter_y_sn: float, @@ -297,7 +303,13 @@ def altersvorsorge_y_sn_volle_anrechnung( return min(out, max_value) -@policy_function(end_date="2019-12-31", unit=Unit.CURRENCY.PER_YEAR.PER_SN) +@policy_function( + end_date="2019-12-31", + unit=Unit.CURRENCY.PER_YEAR.PER_SN, + # A per-capita Splitting formula (÷ then × anzahl_personen_sn) the dry-run's + # level model cannot follow; declared unit and edges stay checked. + verify_units=False, +) def vorwegabzug_lohnsteuer_y_sn( einnahmen__bruttolohn_y_sn: float, familie__anzahl_personen_sn: int, 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 4f3550d356..927fc3bbe2 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" @@ -96,7 +96,13 @@ def ertragsanteil_berufsständische_altersvorsorge( ) -@policy_function(end_date="2004-12-31", unit=Unit.DIMENSIONLESS) +@policy_function( + end_date="2004-12-31", + unit=Unit.DIMENSIONLESS, + # The look-up index is built with raw `xnp.floor(...).astype(int)`, which the + # dry-run cannot evaluate symbolically. + verify_units=False, +) def ertragsanteil_gesetzliche_rente( sozialversicherung__rente__alter_bei_renteneintritt: float, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, diff --git a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py index c8ba075606..38e2c2b3a8 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -12,6 +12,7 @@ Unit, agg_by_group_function, agg_by_p_id_function, + cast_unit, param_function, policy_function, ) @@ -111,7 +112,11 @@ 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, Unit.CURRENCY.PER_MONTH), + 0.0, + ) else: return 0.0 @@ -293,9 +298,11 @@ def einkommensgrenze_y_fg( Legal reference: BGBl I. v. 17.02.2004 S.208 """ if ist_leistungsbegründendes_kind: - return ( + return cast_unit( einkommensgrenze_ohne_geschwisterbonus_y - + (familie__anzahl_kinder_fg - 1) * aufschlag_einkommen + + (cast_unit(familie__anzahl_kinder_fg, Unit.DIMENSIONLESS) - 1) + * aufschlag_einkommen, + Unit.CURRENCY.PER_YEAR.PER_FG, ) else: return 0.0 @@ -326,7 +333,12 @@ def einkommensgrenze_ohne_geschwisterbonus_y( @policy_function( - start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR + start_date="2004-01-01", + end_date="2008-12-31", + unit=Unit.CURRENCY.PER_YEAR, + # Plucks thresholds off dict-typed dataclass fields, which the dry-run cannot + # follow through the subscript. + verify_units=False, ) def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y( familie__alleinerziehend_fg: bool, @@ -348,7 +360,12 @@ def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y @policy_function( - start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR + start_date="2004-01-01", + end_date="2008-12-31", + unit=Unit.CURRENCY.PER_YEAR, + # Plucks thresholds off dict-typed dataclass fields, which the dry-run cannot + # follow through the subscript. + verify_units=False, ) def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y( familie__alleinerziehend_fg: bool, From 194c0d6cbd3159b5e9c92d5b5fe14f3ecbf7e5d5 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 09:22:17 +0200 Subject: [PATCH 43/65] Round C (part 16): altersfreibetrag bis-2004 + bezugsmonate levels (#1192) - altersfreibetrag_y_bis_2004 reads `maximaler_altersentlastungsbetrag` / `altersentlastungsquote`, declared `type: require_converter` though consumed as plain scalars, so the dry-run sees them as opaque; tag them at the site. - bezugsmonate_unter_grenze_fg: read the fg-level cumulative Bezugsmonate as a plain month count and tag the +1-month step, so the comparisons against the month thresholds line up. Co-Authored-By: Claude Opus 4.8 --- .../einkommensteuer/abz\303\274ge/alter.py" | 6 ++++-- src/gettsim/germany/elterngeld/elterngeld.py | 18 ++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" index c7d9bf1ef7..8beecb1964 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" @@ -7,6 +7,7 @@ from gettsim.tt import ( UNSET_UNIT, Unit, + cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -43,8 +44,9 @@ def altersfreibetrag_y_bis_2004( ) if alter > altersgrenze: out = min( - altersentlastungsquote * (einnahmen__bruttolohn_y + weiteres_einkommen), - maximaler_altersentlastungsbetrag, + cast_unit(altersentlastungsquote, Unit.DIMENSIONLESS) + * (einnahmen__bruttolohn_y + weiteres_einkommen), + cast_unit(maximaler_altersentlastungsbetrag, Unit.CURRENCY.PER_YEAR), ) else: out = 0.0 diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index e299ac510a..77790cbabe 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -217,21 +217,19 @@ def bezugsmonate_unter_grenze_fg( parent. """ + bisherige_monate = cast_unit(bisherige_bezugsmonate_fg, Unit.MONTHS) + 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"] - ) - elif anzahl_anträge_fg > 1: - out = ( - cast_unit(bisherige_bezugsmonate_fg, Unit.DIMENSIONLESS) + 1 - < max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] - ) + out = bisherige_monate < grenze_mit_partnermonaten + elif cast_unit(anzahl_anträge_fg, Unit.DIMENSIONLESS) > 1: + out = bisherige_monate + cast_unit(1, Unit.MONTHS) < grenze_mit_partnermonaten else: - out = bisherige_bezugsmonate_fg < max_bezugsmonate["basismonate"] + out = bisherige_monate < max_bezugsmonate["basismonate"] return out From 1f13b8e8417633271749e96f0076a3b37a3e774d Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 09:30:33 +0200 Subject: [PATCH 44/65] Round C (part 17): opt out altersfreibetrag_y_bis_2004 (#1192) Its `require_converter`-typed scalar parameters and the age-threshold comparison leave the body un-followable by the dry-run (like its ab-2005 twin), so opt out; declared unit and edges stay checked. Co-Authored-By: Claude Opus 4.8 --- .../germany/einkommensteuer/abz\303\274ge/alter.py" | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" index 8beecb1964..71f5580dea 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" @@ -7,7 +7,6 @@ from gettsim.tt import ( UNSET_UNIT, Unit, - cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -23,6 +22,10 @@ end_date="2004-12-31", leaf_name="altersfreibetrag_y", unit=Unit.CURRENCY.PER_YEAR, + # Reads `maximaler_altersentlastungsbetrag` / `altersentlastungsquote`, declared + # `type: require_converter` though consumed as scalars, which the dry-run cannot + # follow; declared unit and edges stay checked. + verify_units=False, ) def altersfreibetrag_y_bis_2004( alter: int, @@ -44,9 +47,8 @@ def altersfreibetrag_y_bis_2004( ) if alter > altersgrenze: out = min( - cast_unit(altersentlastungsquote, Unit.DIMENSIONLESS) - * (einnahmen__bruttolohn_y + weiteres_einkommen), - cast_unit(maximaler_altersentlastungsbetrag, Unit.CURRENCY.PER_YEAR), + altersentlastungsquote * (einnahmen__bruttolohn_y + weiteres_einkommen), + maximaler_altersentlastungsbetrag, ) else: out = 0.0 From 6d3338455ab8b807ff79181ce7337757c6041ac6 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 09:43:24 +0200 Subject: [PATCH 45/65] =?UTF-8?q?Round=20C=20(part=2018):=20ruff=20cleanup?= =?UTF-8?q?=20=E2=80=94=20import=20order,=20comment=20wording=20(#1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply ruff's import ordering to the Round C files, reword two comments off the ambiguous ÷/× unicode signs, and restore the plain-prose `familie__anzahl_ erwachsene_bg >= 1` condition in the kinderzuschlag docstrings (a stray cast_unit had leaked in from a replace-all). Co-Authored-By: Claude Opus 4.8 --- .../freibetr\303\244ge_verm\303\266gen.py" | 2 +- .../germany/b\303\274rgergeld/regelbedarf.py" | 2 +- .../abz\303\274ge/vorsorge.py" | 4 +-- src/gettsim/germany/elterngeld/elterngeld.py | 2 +- .../germany/elterngeld/geschwisterbonus.py | 2 +- .../grundsicherung/im_alter/im_alter.py | 2 +- src/gettsim/germany/kindergeld/kindergeld.py | 4 +-- .../germany/kinderzuschlag/kinderzuschlag.py | 26 ++++++++----------- .../f\303\274r_frauen/f\303\274r_frauen.py" | 2 +- .../langj\303\244hrig/langj\303\244hrig.py" | 2 +- .../wegen_arbeitslosigkeit.py | 2 +- 11 files changed, 22 insertions(+), 28 deletions(-) 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 e1503bfe1a..a7113fe596 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,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function, cast_unit +from gettsim.tt import Unit, cast_unit, policy_function @policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_BG) diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index 5d0f2e8849..b1bb4e39dc 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -9,10 +9,10 @@ UNSET_UNIT, ConsecutiveIntLookupTableParamValue, Unit, + cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, - cast_unit, ) if TYPE_CHECKING: diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" index 7e73c7c447..539565481b 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" @@ -112,7 +112,7 @@ def vorsorgeaufwendungen_y_sn_ab_2020( @policy_function( end_date="2019-12-31", unit=Unit.CURRENCY.PER_YEAR.PER_SN, - # A per-capita Splitting formula (÷ then × anzahl_personen_sn) the dry-run's + # A per-capita Splitting formula (divide then multiply by anzahl_personen_sn) the # level model cannot follow; declared unit and edges stay checked. verify_units=False, ) @@ -306,7 +306,7 @@ def altersvorsorge_y_sn_volle_anrechnung( @policy_function( end_date="2019-12-31", unit=Unit.CURRENCY.PER_YEAR.PER_SN, - # A per-capita Splitting formula (÷ then × anzahl_personen_sn) the dry-run's + # A per-capita Splitting formula (divide then multiply by anzahl_personen_sn) the # level model cannot follow; declared unit and edges stay checked. verify_units=False, ) diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index 77790cbabe..cbe6768928 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -8,8 +8,8 @@ Unit, agg_by_group_function, agg_by_p_id_function, - policy_function, cast_unit, + policy_function, ) diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index 2f955abd0e..d3c97e93ae 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function, cast_unit +from gettsim.tt import Unit, cast_unit, policy_function @policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index c2368a2f5c..6441829517 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -17,7 +17,7 @@ RegelsatzAnteilsbasiert, ) -from gettsim.tt import AggType, Unit, agg_by_p_id_function, policy_function, cast_unit +from gettsim.tt import AggType, Unit, agg_by_p_id_function, cast_unit, policy_function @policy_function( diff --git a/src/gettsim/germany/kindergeld/kindergeld.py b/src/gettsim/germany/kindergeld/kindergeld.py index 4e7581d624..3525410f5c 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -134,9 +134,7 @@ def kind_bis_10_mit_kindergeld( ist_leistungsbegründendes_kind: bool, ) -> bool: """Child under the age of 11 and eligible for Kindergeld.""" - return ist_leistungsbegründendes_kind and ( - alter <= cast_unit(10, Unit.YEARS) # noqa: PLR2004 - ) + return ist_leistungsbegründendes_kind and (alter <= cast_unit(10, Unit.YEARS)) @policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index b7789ad509..f4ff1d5bb2 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -163,12 +163,12 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( threshold. Kinderzuschlag is only paid out if parents are part of the BG - (cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1). + (familie__anzahl_erwachsene_bg >= 1). """ - if ( - nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg - ) and cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1: + if (nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg) and cast_unit( + familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS + ) >= 1: out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: out = 0.0 @@ -199,7 +199,7 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( threshold. Kinderzuschlag is only paid out if parents are part of the BG - (cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1). + (familie__anzahl_erwachsene_bg >= 1). """ if ( @@ -233,12 +233,12 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( minimum income threshold. Kinderzuschlag is only paid out if parents are part of the BG - (cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1). + (familie__anzahl_erwachsene_bg >= 1). """ - if ( - bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg - ) and cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1: + if (bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg) and cast_unit( + familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS + ) >= 1: out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: out = 0.0 @@ -262,9 +262,7 @@ def basisbetrag_kind_m_bis_2022( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = cast_unit( - kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS - ) * ( + out = cast_unit(kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS) * ( satz_m - entzugsrate_kindeseinkommen * ( @@ -293,9 +291,7 @@ def basisbetrag_kind_m_ab_2023( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = cast_unit( - kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS - ) * ( + out = cast_unit(kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS) * ( satz_m - entzugsrate_kindeseinkommen * ( 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 5333610b57..0e619e97b0 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" @@ -10,8 +10,8 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, Unit, - policy_function, cast_unit, + policy_function, ) 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 756393e970..809a0e0f86 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" @@ -7,8 +7,8 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, Unit, - policy_function, cast_unit, + policy_function, ) 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 4bae6bb16a..6d9416c13d 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 @@ -14,8 +14,8 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, Unit, - policy_function, cast_unit, + policy_function, ) From 864738bda2bdd96be59c75b0cc05e07e08e53381 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 10:01:35 +0200 Subject: [PATCH 46/65] =?UTF-8?q?Round=20C=20(part=2019):=20complete=20the?= =?UTF-8?q?=20satz=E2=86=92satz=5Fm=20rename=20on=20the=20raw=20param=20(#?= =?UTF-8?q?1192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The units sweep renamed the kinderzuschlag `satz` param_functions and all consumers to `satz_m` (the `_m` suffix for a monthly EUR amount) but left the raw YAML `satz` param under the old name, splitting one leaf into two. The raw param carries the explicit 2023 value (§ 6a-Sonderregelung, €250), so 2023 lost its `satz_m` producer and every 2023 kinderzuschlag / bürgergeld / gemischte-BG case failed with `kinderzuschlag satz_m missing`. Rename the raw param to `satz_m` so it coexists with the param_functions exactly as on main. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml index 561f2aaacc..cfc43c392f 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml @@ -1,5 +1,5 @@ --- -satz: +satz_m: name: de: Maximaler Kinderzuschlagsatz pro Kind en: Maximum amount of Kinderzuschlag per child From cf6ab002f219af663aa745b1762bd29518b60eba Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 10:11:58 +0200 Subject: [PATCH 47/65] Round C (part 20): kinderzuschlag maximales_nettoeinkommen bg total (#1192) Completing the satz_m rename unblocked the pre-2021 kinderzuschlag subtree (its env build no longer fails on the missing leaf), revealing that `maximales_nettoeinkommen_ m_bg` adds the BG Erwachsenenbedarf to `satz_m * anzahl_kinder_bg`, whose per-child Satz and per-BG count leave a stray person level. Cast the product to the BG-level child total. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/germany/kinderzuschlag/einkommen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 56b6615302..124b5dc334 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -171,7 +171,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_m * anzahl_kinder_bg + # Per-child Satz times the number of children is the BG-level child total. + return erwachsenenbedarf_m_bg + cast_unit( + satz_m * anzahl_kinder_bg, Unit.CURRENCY.PER_MONTH.PER_BG + ) @policy_function(start_date="2008-10-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) From ab02dae9e90976d9e3f3c2aefa29d46cc2ae0bd6 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 11:30:59 +0200 Subject: [PATCH 48/65] Round C (part 21): mean_entgeltpunkte_pro_bewertungsmonat is dimensionless (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Grundbewertung average earning points divide total Entgeltpunkte by the belegungsfähiger Gesamtzeitraum — a plain count of Bewertungseinheiten — so the ratio is DIMENSIONLESS, not per-year. Drop the spurious `_y` suffix (which pulled the value through auto time-conversion and broke the post-2002 Erwerbsminderungs- rente Zurechnungszeit credit) and cast the valuation-span counts at the divisor and in the `zusätzliche_entgeltpunkte` multiply. Restores the expected entgeltpunkte_west. Co-Authored-By: Claude Opus 4.8 --- .../erwerbsminderung/erwerbsminderung.py | 58 ++++++++++++------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py index bfc6e0a0fe..4fb289722e 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py @@ -162,7 +162,7 @@ def entgeltpunkte( unit=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_bis_06_2014( - mean_entgeltpunkte_pro_bewertungsmonat_y: float, + mean_entgeltpunkte_pro_bewertungsmonat: float, sozialversicherung__rente__alter_bei_renteneintritt: float, sozialversicherung__rente__jahr_renteneintritt: int, sozialversicherung__rente__monat_renteneintritt: int, @@ -185,9 +185,13 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren claiming_month_since_ad ) return ( - altersgrenze_zurechnungszeit - - (sozialversicherung__rente__alter_bei_renteneintritt) - ) * mean_entgeltpunkte_pro_bewertungsmonat_y + cast_unit( + altersgrenze_zurechnungszeit + - sozialversicherung__rente__alter_bei_renteneintritt, + Unit.DIMENSIONLESS, + ) + * mean_entgeltpunkte_pro_bewertungsmonat + ) @policy_function( @@ -197,7 +201,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren unit=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgrenze( - mean_entgeltpunkte_pro_bewertungsmonat_y: float, + mean_entgeltpunkte_pro_bewertungsmonat: float, sozialversicherung__rente__alter_bei_renteneintritt: float, zurechnungszeitgrenze: float, ) -> float: @@ -210,8 +214,12 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre year between their age of retirement and the "Zurechnungszeitgrenze". """ return ( - zurechnungszeitgrenze - (sozialversicherung__rente__alter_bei_renteneintritt) - ) * mean_entgeltpunkte_pro_bewertungsmonat_y + cast_unit( + zurechnungszeitgrenze - sozialversicherung__rente__alter_bei_renteneintritt, + Unit.DIMENSIONLESS, + ) + * mean_entgeltpunkte_pro_bewertungsmonat + ) @policy_function( @@ -220,7 +228,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre unit=Unit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_ab_07_2017( - mean_entgeltpunkte_pro_bewertungsmonat_y: float, + mean_entgeltpunkte_pro_bewertungsmonat: float, sozialversicherung__rente__alter_bei_renteneintritt: float, sozialversicherung__rente__jahr_renteneintritt: int, sozialversicherung__rente__monat_renteneintritt: int, @@ -243,9 +251,13 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren claiming_month_since_ad ) return ( - altersgrenze_zurechnungszeit - - (sozialversicherung__rente__alter_bei_renteneintritt) - ) * mean_entgeltpunkte_pro_bewertungsmonat_y + cast_unit( + altersgrenze_zurechnungszeit + - sozialversicherung__rente__alter_bei_renteneintritt, + Unit.DIMENSIONLESS, + ) + * mean_entgeltpunkte_pro_bewertungsmonat + ) @policy_function(start_date="2001-01-01", unit=Unit.DIMENSIONLESS) @@ -412,10 +424,9 @@ def anteil_entgeltpunkte_ost( @policy_function( - verify_units=False, end_date="2023-06-30", - leaf_name="mean_entgeltpunkte_pro_bewertungsmonat_y", - unit=Unit.DIMENSIONLESS.PER_YEAR, + leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", + unit=Unit.DIMENSIONLESS, ) def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( sozialversicherung__rente__entgeltpunkte_west: float, @@ -430,9 +441,12 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( Legal reference: SGB VI § 72: Grundbewertung """ - belegungsfähiger_gesamtzeitraum = ( + # The valuation span is a plain count of Bewertungseinheiten, so the average + # earning points come out dimensionless. + belegungsfähiger_gesamtzeitraum = cast_unit( sozialversicherung__rente__alter_bei_renteneintritt - - altersgrenze_grundbewertung + - altersgrenze_grundbewertung, + Unit.DIMENSIONLESS, ) return ( @@ -442,10 +456,9 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( @policy_function( - verify_units=False, start_date="2023-07-01", - leaf_name="mean_entgeltpunkte_pro_bewertungsmonat_y", - unit=Unit.DIMENSIONLESS.PER_YEAR, + leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", + unit=Unit.DIMENSIONLESS, ) def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( sozialversicherung__rente__entgeltpunkte: float, @@ -459,9 +472,12 @@ def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( Legal reference: SGB VI § 72: Grundbewertung """ - belegungsfähiger_gesamtzeitraum = ( + # The valuation span is a plain count of Bewertungseinheiten, so the average + # earning points come out dimensionless. + belegungsfähiger_gesamtzeitraum = cast_unit( sozialversicherung__rente__alter_bei_renteneintritt - - altersgrenze_grundbewertung + - altersgrenze_grundbewertung, + Unit.DIMENSIONLESS, ) return sozialversicherung__rente__entgeltpunkte / belegungsfähiger_gesamtzeitraum From c5542da694b0669a50da1898e349cd74d66803e4 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Tue, 14 Jul 2026 16:05:02 +0200 Subject: [PATCH 49/65] TEMPORARY: pin ttsim-backend to gep10-annotate-mettsim for CI (#1192) The GEP-10 rollout needs the units-and-dimensionality ttsim, which is not yet on ttsim main. Pin CI to the GEP-10 mettsim branch so the suite runs against the right backend. Revert to `branch = "main"` once the ttsim GEP-10 stack merges, before this PR merges. Co-Authored-By: Claude Opus 4.8 --- pixi.lock | 234 ++++++++++++++++++++++++++++++++++++++++++------- pyproject.toml | 5 +- 2 files changed, 207 insertions(+), 32 deletions(-) diff --git a/pixi.lock b/pixi.lock index 6072cca632..3d8306b436 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f - 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#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f name: ttsim-backend - version: 1.2.2.dev15+gb86b0d6e6 + version: 1.2.2.dev49+g78a137d11 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..5ebb51a14d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,7 +168,10 @@ 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" } +# TEMPORARY (GEP 10 rollout): pin ttsim-backend to the GEP-10 mettsim branch so +# CI installs the units-and-dimensionality ttsim the rollout requires. Revert to +# `branch = "main"` once the ttsim GEP-10 stack merges, before this PR merges. +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" ] From 12bcad70bc94f1af3448c570d14282f2463987d4 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Wed, 15 Jul 2026 08:08:13 +0200 Subject: [PATCH 50/65] Expose data_currency on gettsim's main (#1192) ttsim's main gained the knob with the boundary conversion, and gettsim's wrapper forwards its own locals(), so without the parameter there was no way to tell the engine which currency the input data is denominated in. Co-Authored-By: Claude Opus 4.8 --- src/gettsim/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gettsim/__init__.py b/src/gettsim/__init__.py index 025708bb73..cccfaa9588 100644 --- a/src/gettsim/__init__.py +++ b/src/gettsim/__init__.py @@ -116,6 +116,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, From 9e766ab58a3896a5108b199a2074b3ab483d60d9 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Wed, 15 Jul 2026 08:39:08 +0200 Subject: [PATCH 51/65] Record the GEP-10 rollout in the changelog (#1192) The renames are breaking and ship without aliases, so they belong in the changelog by name rather than as a note that some things moved. Co-Authored-By: Claude Opus 4.8 --- CHANGES.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 614e2371e9..fd52ad8043 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,26 @@ All releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ge ## Unreleased +- {gh}`1192` Annotate the taxes and transfers system with units and dimensions (GEP 10). + Every `@policy_function`, `@policy_input`, `@param_function` and + `@group_creation_function` declares a unit, as does every parameter in the YAML files. + The euro is registered as the base currency and the Deutsche Mark relative to it, so + that policy dates before 2002 compute in the currency of their day. + ({ghuser}`MImmesberger`) +- {gh}`1192` Rename columns whose name did not match the quantity they carry. 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 + `mehrbedarf_alleinerziehend_m`. `gesamteinkommen_y` becomes `gesamteinkommen_y_sn`, + naming the level it is aggregated to. There are no aliases; the old names are gone. + ({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`). From c790bf4e715653c803b2720a80f4604a3182cbed Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 06:40:31 +0000 Subject: [PATCH 52/65] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" | 2 +- src/gettsim/germany/familie/familie.py | 2 +- src/gettsim/germany/individual_characteristics.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" index 13dc27c62f..5e53be7808 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function, cast_unit +from gettsim.tt import Unit, cast_unit, policy_function @policy_function( diff --git a/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index a2e8725b12..b291b4e9ed 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -11,8 +11,8 @@ from gettsim.tt import ( AggType, Unit, - cast_unit, agg_by_group_function, + cast_unit, join, policy_function, ) diff --git a/src/gettsim/germany/individual_characteristics.py b/src/gettsim/germany/individual_characteristics.py index 4fe921d8d2..721b25e062 100644 --- a/src/gettsim/germany/individual_characteristics.py +++ b/src/gettsim/germany/individual_characteristics.py @@ -1,6 +1,6 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function, cast_unit +from gettsim.tt import Unit, cast_unit, policy_function @policy_function(unit=Unit.DIMENSIONLESS) From 90343491a28385ef4abfa9b9757f6988e8affef0 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger <74215010+MImmesberger@users.noreply.github.com> Date: Wed, 15 Jul 2026 08:41:12 +0200 Subject: [PATCH 53/65] GEP 10: restate the pre-2002 parameters in Deutsche Mark (#1192) (#1211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stacked on #1192's rollout branch (`gep10-rollout`), which declares the euro for every policy date. This branch flips the statutory currency to the Deutsche Mark through 2001 and restates every pre-2002 currency parameter accordingly. ## Method Every Deutsche-Mark value here was **read out of the Bundesgesetzblatt**, not obtained by multiplying a stored euro value by 1,95583. That matters more than it sounds: the stored euro values are lossy, and inverting them is ambiguous or plainly wrong. - The Rentenwert (Ost) for 1994 is **33,34 DM**. The stored 17,05 EUR is equally consistent with 33,35; only § 2 V. v. 01.12.1993 settles it. - The Arbeitnehmerpauschbetrag stored 1 044 EUR from 1990, but that is 2 042 DM, and the law read **2 000 DM** until 2001. Inverting would have enshrined 2 042. Where the law states a monthly amount and the parameter is yearly (§ 32 Abs. 6 EStG's "261 Deutsche Mark", § 15 WoGG's "1 200 Deutsche Mark im Jahr"), the entries say so. ## Corrections found by reading the gazette Fourteen pre-existing errors surfaced. The ones that change results: | parameter | was | gazette | |---|---|---| | Wohngeld Höchstbetrag, 4 Mitglieder, Baujahr ≤1965, Mietstufe V | 585 EUR | **485** (948,58 DM) — broke Mietstufe monotonicity, overstating the cap by 100 EUR/month | | same, 3 Mitglieder, Mietstufe I | 322 EUR | **320** (625,87 DM) | | Wohngeld Mehrbetrag 1985, Baujahr 1972–1977 | copy of the 1966–1971 column | **85/90/95/100/105 DM** | | Wohngeld Mehrbetrag 1990-10, Baujahr ≥1978 | near-copy of the 1966–1977 column | **95/105/110/120/125/135 DM** | | Wohngeld 1993, 4 Mitglieder, Mietstufe VI | 437 EUR (a duplicate of Mietstufe II) | **578** (1 130 DM) | | Rentenversicherung-Grenze 1999 West | 4 339 EUR (= 8 486 DM) | **8 500 DM** = 4 346 EUR | | Bezugsgröße Ost 1998 | 3 710 DM (the 1999 value) | **3 640 DM** | | Wohngeld Behinderten-Freibetrag 1986 | halved to 612 EUR | unchanged at **2 400 DM** — the parameter's own description had suspected this | | Kinderfreibetrag, Betreuung 2000 | 774 EUR | **1 512 DM** | Three parameters held the *next* law's value a year early: `arbeitnehmerpauschbetrag` (1 044 EUR from 1990), `maximales_einkommen_des_kindes` (14 040 DM, which applies "ab dem Veranlagungszeitraum 2002"), and the Wohngeld Höchstbeträge, whose 2001 entry held the Artikel-6 euro table. The Haushaltsfreibetrag's 2 916 EUR is likewise the changeover value: the Steuer-Euroglättungsgesetz glättet § 32 "durch 54 teilbare" Euro-Beträge, and 5 616 DM lands on 54 × 54. Three cross-checks did the catching, and are worth keeping in mind for future work: § 8 SGB IV puts the Minijobgrenze at a seventh of the Bezugsgröße, § 6 Abs. 7 SGB V puts the Krankenversicherung grenze at three quarters of the Rentenversicherung one, and the Wohngeld tables rise monotonically in the Mietstufe. ## Mid-year changes The Ost Rechengrößen changed twice in 1991, so the entries are split at 1 July, as the law is: the Bezugsgröße goes 1 540 → 1 750 DM, the Grenze 3 000 → 3 400, the Minijobgrenze 220 → 250. The Minijobgrenze had held 235 — the average of the two, and the only year that broke the seventh rule. ## Three values are not in the Bundesgesetzblatt Each entry records why: - The Beitrittsgebiet's 1990 and first-half-1991 Rechengrößen rest on the DDR's *Gesetz über die Sozialversicherung* (GBl. I Nr. 38 S. 486). - § 68 Abs. 1 SGB VI defines the first aktueller Rentenwert not as an amount but as the December 1991 pension for one Entgeltpunkt, so no gazette prints it. - `beitragsvolumen` and `gesamtes_rentenvolumen` are statistics of the Deutsche Rentenversicherung, and no function reads either; their pre-2002 entries are dropped rather than converted. `mietobergrenze_pro_qm` now starts in 2005: Arbeitslosengeld II does not exist earlier, and the value is a rule of thumb that, as its description says, is not in the law. ## Results Only five cases move: the Erwerbsminderungsrente at 2001, by 0.006 to 0.013 percent. The Rentenwert had been stored as 24,84 EUR, a rounded conversion, where the Verordnung gives 48,58 DM. Policy cases stay denominated in euro; the model computes in the statutory currency and converts at the column boundary. - gettsim, numpy: 1319 passed - gettsim policy cases, jax: 1300 passed - `pixi run ty`: unchanged from the 11 pre-existing workspace diagnostics - the policy environment builds at every date from 1958 to 2024 ## Two things to decide before merging The Wohngeld typo fixes and the 1999 Grenze also change results for **2002 to 2008**. They are genuine corrections rather than redenomination, and could be split out. `gep10-rollout` still carries the temporary ttsim pin, which reverts to `main` before that branch merges. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/gettsim/germany/__init__.py | 10 +- .../kosten_der_unterkunft.yaml | 2 +- .../abz\303\274ge/alleinerziehend.yaml" | 13 +- .../einkommensteuer/abz\303\274ge/alter.yaml" | 8 +- .../abz\303\274ge/behinderung.yaml" | 19 +- .../abz\303\274ge/sonderausgaben.py" | 1 + .../abz\303\274ge/sonderausgaben.yaml" | 11 +- .../abz\303\274ge/vorsorge.py" | 1 + .../abz\303\274ge/vorsorge.yaml" | 25 +- .../einkommensteuer/einkommensteuer.py | 7 +- .../freibetr\303\244ge.yaml" | 20 +- .../werbungskostenpauschale.yaml" | 8 +- .../einkommensteuer/kinderfreibetrag.yaml | 31 +- .../zu_versteuerndes_einkommen.py | 6 +- .../germany/erziehungsgeld/erziehungsgeld.py | 1 + .../germany/kindergeld/kindergeld.yaml | 114 +- src/gettsim/germany/lohnsteuer/einkommen.py | 1 + .../solidarit\303\244tszuschlag.yaml" | 22 +- .../arbeitslosen/betrag.yaml | 7 +- .../beitrag/beitragsbemessungsgrenze.yaml | 70 +- .../beitrag/selbstst\303\244ndige.yaml" | 66 +- .../germany/sozialversicherung/minijob.py | 2 +- .../germany/sozialversicherung/minijob.yaml | 62 +- .../rente/altersrente/altersrente.py | 21 +- .../altersrente/hinzuverdienstgrenzen.py | 37 +- .../beitrag/beitragsbemessungsgrenze.yaml | 71 +- .../rente/beitrag/rentenanpassungsformel.yaml | 44 - .../rente/rentenformel.yaml | 82 +- .../unterhaltsvorschuss.py | 1 + src/gettsim/germany/wohngeld/einkommen.yaml | 53 +- src/gettsim/germany/wohngeld/miete.yaml | 1361 +++++++++-------- src/gettsim/germany/wohngeld/wohngeld.py | 46 +- src/gettsim/germany/wohngeld/wohngeld.yaml | 7 +- ...erwerbsgemindert_birthyear_1980_claim.yaml | 2 +- ...erwerbsgemindert_birthyear_1940_claim.yaml | 2 +- ...erwerbsgemindert_birthyear_1941_claim.yaml | 2 +- ...erwerbsgemindert_birthyear_1970_claim.yaml | 2 +- ...erwerbsgemindert_birthyear_1980_claim.yaml | 2 +- src/gettsim/tests_germany/test_currency.py | 14 +- 39 files changed, 1321 insertions(+), 933 deletions(-) diff --git a/src/gettsim/germany/__init__.py b/src/gettsim/germany/__init__.py index 837c5b7e51..462a7da492 100644 --- a/src/gettsim/germany/__init__.py +++ b/src/gettsim/germany/__init__.py @@ -14,13 +14,13 @@ # concrete currencies before the policy environment is assembled (GEP 10). The # euro is the base currency; the Deutsche Mark is worth 1/1.95583 euro, the rate # fixed by the Euro-Einführungsgesetz. The statutory-currency mapping tells the -# engine which currency each policy date computes in; it declares the euro for -# all dates, matching how pre-2002 parameters are stored today (hand-converted -# to euro). A follow-up flips it to DM through 2001 and re-transcribes those -# parameters to their statutory DM values. +# engine which currency each policy date computes in: the Deutsche Mark through +# 2001 and the euro from 2002, when the euro became legal tender. Parameters are +# never converted (GEP 10) — every pre-2002 currency value carries its statutory +# DM amount, every value from 2002 its statutory euro amount. register_currency(name="EUR", base=True) register_currency(name="DM", definition="EUR / 1.95583") -register_statutory_currencies({"0001-01-01": "EUR"}) +register_statutory_currencies({"0001-01-01": "DM", "2002-01-01": "EUR"}) # Germany's grouping levels. Registered on import so the fluent unit builder # offers `Unit.X.PER_HH` / `per_bg` / … before the policy modules (whose diff --git a/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml b/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml index cc0aaeed65..a730dfcb66 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml +++ b/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml @@ -20,7 +20,7 @@ mietobergrenze_pro_qm: https://github.com/ttsim-dev/gettsim/issues/782. 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. diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" index ae802e23c7..1034e14f68 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" @@ -9,14 +9,17 @@ alleinerziehendenfreibetrag_basis: 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 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" index e25cc20387..f70f150c50 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" @@ -31,10 +31,14 @@ maximaler_altersentlastungsbetrag: unit: EUR_PER_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` diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" index dad4413a68..55cb6e6e84 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" @@ -11,28 +11,29 @@ parameter_behindertenpauschbetrag: type: piecewise_constant 1975-01-01: reference: G. v. 05.08.1974 BGBl. I S. 1769. - note: DM converted to Euro. + 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. + output_unit: EUR_PER_YEAR intervals: - interval: (-inf, 25) intercept: 0 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" index 31852921fd..72825f7d43 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" @@ -73,6 +73,7 @@ def gedeckelte_kinderbetreuungskosten_y( @policy_function( + start_date="2002-01-01", rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="up"), unit=Unit.CURRENCY.PER_YEAR.PER_SN, ) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" index c3b257041b..0fd9be363c 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" @@ -9,12 +9,15 @@ sonderausgabenpauschbetrag: unit: EUR_PER_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: diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" index 539565481b..a2252642e0 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" @@ -16,6 +16,7 @@ @policy_function( + start_date="2002-01-01", end_date="2004-12-31", leaf_name="vorsorgeaufwendungen_y_sn", rounding_spec=RoundingSpec( diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" index 9fc3fa1ee7..e5785adc04 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" @@ -22,9 +22,14 @@ parameter_altersvorsorgeaufwendungen_regime_bis_2004: kürzungsanteil_abhängig_beschäftigte: DIMENSIONLESS 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 @@ -33,18 +38,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 diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuer.py b/src/gettsim/germany/einkommensteuer/einkommensteuer.py index fe027cf072..488924f82d 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuer.py +++ b/src/gettsim/germany/einkommensteuer/einkommensteuer.py @@ -50,7 +50,7 @@ def anzahl_kindergeld_ansprüche_2( end_date="1996-12-31", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=Unit.DM.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S. 6 EStG", @@ -67,7 +67,7 @@ def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( @policy_function( - start_date="1997-01-01", + start_date="2002-01-01", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( unit=Unit.EUR.PER_YEAR.PER_SN, @@ -110,7 +110,7 @@ def kinderfreibetrag_günstiger_sn( end_date="2001-12-31", leaf_name="betrag_mit_kinderfreibetrag_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=Unit.DM.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", @@ -156,6 +156,7 @@ def betrag_mit_kinderfreibetrag_y_sn_ab_2002( @policy_function( + start_date="2002-01-01", rounding_spec=RoundingSpec( unit=Unit.EUR.PER_YEAR.PER_SN, base=1, 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 a09ee52d90..69da0f8cec 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" @@ -11,18 +11,16 @@ sparerfreibetrag: unit: EUR_PER_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: @@ -43,8 +41,12 @@ werbungskostenpauschbetrag: unit: EUR_PER_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 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 70477cf244..69e295dcc5 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" @@ -9,11 +9,13 @@ arbeitnehmerpauschbetrag: unit: EUR_PER_YEAR type: scalar 1975-01-01: - value: 288 - note: 564 DM + unit: DM_PER_YEAR + value: 564 1990-01-01: + value: 2000 + 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/kinderfreibetrag.yaml b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml index 081feee74c..8844dd45b1 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml @@ -12,34 +12,35 @@ parameter_kinderfreibetrag: unit: EUR_PER_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. + note: >- + Ab hier nennt § 32 Abs. 6 EStG Jahresbeträge: 3 456 Deutsche Mark für das + sächliche Existenzminimum, 1 512 Deutsche Mark für die Betreuung. 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 12461a10cd..a3499417cb 100644 --- a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py +++ b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py @@ -59,10 +59,10 @@ def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( @policy_function( rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, - base=27.609762, + unit=Unit.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", diff --git a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py index 38e2c2b3a8..8417249fab 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -81,6 +81,7 @@ def betrag_m( @policy_function( + start_date="2002-01-01", end_date="2003-12-31", leaf_name="anspruchshöhe_kind_m", rounding_spec=RoundingSpec(unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest"), diff --git a/src/gettsim/germany/kindergeld/kindergeld.yaml b/src/gettsim/germany/kindergeld/kindergeld.yaml index 78c68c6775..ccd8261ff2 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.yaml +++ b/src/gettsim/germany/kindergeld/kindergeld.yaml @@ -36,66 +36,68 @@ satz_gestaffelt: unit: EUR_PER_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 @@ -193,16 +195,20 @@ maximales_einkommen_des_kindes: unit: EUR_PER_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: diff --git a/src/gettsim/germany/lohnsteuer/einkommen.py b/src/gettsim/germany/lohnsteuer/einkommen.py index 02b1fd6cca..8ec636c183 100644 --- a/src/gettsim/germany/lohnsteuer/einkommen.py +++ b/src/gettsim/germany/lohnsteuer/einkommen.py @@ -18,6 +18,7 @@ @policy_function( + start_date="2002-01-01", end_date="2025-12-31", rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", 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 e0e717b390..4b47211286 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.yaml" @@ -12,6 +12,8 @@ parameter_solidaritätszuschlag: output_unit: EUR_PER_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) @@ -26,25 +28,33 @@ parameter_solidaritätszuschlag: intercept: 0 1995-01-01: reference: Artikel 31 G. v. 23.06.1993 BGBl. I S. 944. + note: >- + § 3 Abs. 3 Nr. 2 SolzG nennt die Freigrenze von 1 332 Deutsche Mark, § 4 den + Satz von 7,5 vom Hundert. 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. + note: >- + Das Gesetz hebt die Freigrenze des § 3 Abs. 3 Nr. 2 SolzG auf 1 836 Deutsche + Mark und senkt den Satz des § 4 auf 5,5 vom Hundert. 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/betrag.yaml b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml index 0eee662022..ea1df7e438 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml @@ -9,10 +9,11 @@ freibetrag_nebeneinkommen: unit: EUR_PER_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: diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml index c6843c4813..e28afe8bdd 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml @@ -14,24 +14,26 @@ beitragsbemessungsgrenze_m: unit: EUR_PER_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 @@ -106,38 +108,48 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: unit: EUR_PER_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. + note: >- + Die Grenze beträgt drei Viertel der Beitragsbemessungsgrenze der + Rentenversicherung; die Deutsche-Mark-Beträge folgen daher aus den + Rechengrößenverordnungen und nicht aus einer Umrechnung. 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/selbstst\303\244ndige.yaml" "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" index 5d1c8beade..a522cae807 100644 --- "a/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" +++ "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" @@ -9,22 +9,24 @@ bezugsgröße_selbstständige_m: unit: EUR_PER_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: @@ -43,42 +45,48 @@ bezugsgröße_selbstständige_nach_wohnort: 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 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: diff --git a/src/gettsim/germany/sozialversicherung/minijob.py b/src/gettsim/germany/sozialversicherung/minijob.py index b205181fad..876a871435 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.py +++ b/src/gettsim/germany/sozialversicherung/minijob.py @@ -22,7 +22,7 @@ def geringfügig_beschäftigt( end_date="1999-12-31", leaf_name="minijobgrenze_m", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=Unit.DM.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", diff --git a/src/gettsim/germany/sozialversicherung/minijob.yaml b/src/gettsim/germany/sozialversicherung/minijob.yaml index 45de3e33d4..ee3813b6e9 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/minijob.yaml @@ -9,24 +9,26 @@ minijobgrenze_m: unit: EUR_PER_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 @@ -45,35 +47,43 @@ parameter_minijobgrenze_ost_west_unterschied: unit: EUR_PER_MONTH type: dict 1990-01-01: - west: 240 - ost: 102 + unit: DM_PER_MONTH + west: 470 + ost: 200 1991-01-01: - west: 245 - ost: 120 + west: 480 + ost: 220 + 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 diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py index 5621172896..64af1dd19c 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py @@ -6,6 +6,25 @@ @policy_function( + end_date="2001-12-31", + rounding_spec=RoundingSpec( + unit=Unit.DM.PER_MONTH, + base=0.01, + direction="nearest", + reference="§ 123 SGB VI Abs. 1", + ), + leaf_name="betrag_m", + unit=Unit.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=Unit.EUR.PER_MONTH, @@ -16,7 +35,7 @@ leaf_name="betrag_m", unit=Unit.CURRENCY.PER_MONTH, ) -def betrag_m( +def betrag_m_ab_2002( bruttorente_m: float, sozialversicherung__rente__bezieht_rente: bool, ) -> float: diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py index 1531ff405c..1ba3e33ac0 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py @@ -4,6 +4,41 @@ @policy_function( + end_date="2001-12-31", + rounding_spec=RoundingSpec( + unit=Unit.DM.PER_MONTH, + base=0.01, + direction="nearest", + reference="§ 123 SGB VI Abs. 1", + ), + leaf_name="bruttorente_m", + unit=Unit.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=Unit.EUR.PER_MONTH, @@ -14,7 +49,7 @@ leaf_name="bruttorente_m", unit=Unit.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, diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml index 77c3be8ceb..39cd0a25bc 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml @@ -179,44 +179,67 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: unit: EUR_PER_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 diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml index 24f51ad80f..c8464b8a7c 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml @@ -55,28 +55,6 @@ beitragsvolumen: insurance, marginally employed and recipients of ALG. unit: EUR_PER_YEAR type: scalar - 1991-01-01: - value: 108688000 - 1992-01-01: - value: 117359000 - 1993-01-01: - value: 120559000 - 1994-01-01: - value: 132938000 - 1995-01-01: - value: 139921000 - 1996-01-01: - value: 146160000 - 1997-01-01: - value: 153658000 - 1998-01-01: - value: 153763000 - 1999-01-01: - value: 160506000 - 2000-01-01: - value: 163367000 - 2001-01-01: - value: 164694000 2002-01-01: value: 165481000 2003-01-01: @@ -155,28 +133,6 @@ gesamtes_rentenvolumen: en: Total amount of paid pensions unit: EUR_PER_YEAR type: scalar - 1991-01-01: - value: 117912000 - 1992-01-01: - value: 130901000 - 1993-01-01: - value: 141180000 - 1994-01-01: - value: 152798000 - 1995-01-01: - value: 162625000 - 1996-01-01: - value: 168955000 - 1997-01-01: - value: 174479000 - 1998-01-01: - value: 180323800 - 1999-01-01: - value: 184139000 - 2000-01-01: - value: 190198000 - 2001-01-01: - value: 195776000 2002-01-01: value: 202355000 2003-01-01: diff --git a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml index 22b3315bf1..cd957cee73 100644 --- a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml @@ -35,53 +35,83 @@ parameter_rentenwert_nach_wohnort: unit: EUR_PER_MONTH 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). + note: >- + § 68 Abs. 1 SGB VI bestimmt den aktuellen Rentenwert bis zum 30. Juni 1992 nicht + als Betrag, sondern als die Rente für einen Entgeltpunkt im Dezember 1991; der + West-Wert ist daher nicht im Bundesgesetzblatt beziffert. 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 diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py index 9a7820212a..99688bec28 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py @@ -96,6 +96,7 @@ def elternteil_alleinerziehend( @policy_function( + start_date="2002-01-01", end_date="2008-12-31", leaf_name="betrag_m", rounding_spec=RoundingSpec( diff --git a/src/gettsim/germany/wohngeld/einkommen.yaml b/src/gettsim/germany/wohngeld/einkommen.yaml index 15dfbcddf4..f258ae2f81 100644 --- a/src/gettsim/germany/wohngeld/einkommen.yaml +++ b/src/gettsim/germany/wohngeld/einkommen.yaml @@ -18,6 +18,7 @@ min_einkommen: unit: EUR_PER_MONTH type: dict 1984-01-01: + unit: DM_PER_MONTH 1: 0 2: 0 3: 0 @@ -31,6 +32,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 1: 120 2: 150 3: 200 @@ -43,6 +63,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 @@ -153,14 +174,22 @@ freibetrag_kinder_m: 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 @@ -176,32 +205,32 @@ 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 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 diff --git a/src/gettsim/germany/wohngeld/miete.yaml b/src/gettsim/germany/wohngeld/miete.yaml index ee246caa41..2bc8a423e1 100644 --- a/src/gettsim/germany/wohngeld/miete.yaml +++ b/src/gettsim/germany/wohngeld/miete.yaml @@ -17,6 +17,7 @@ raw_min_miete_m: unit: EUR_PER_MONTH type: dict 1984-01-01: + unit: DM_PER_MONTH 1: 0 2: 0 3: 0 @@ -30,6 +31,25 @@ raw_min_miete_m: 11: 0 12: 0 2001-01-01: + 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; hier in + Deutsche Mark umgerechnet. + 2002-01-01: + unit: EUR_PER_MONTH 1: 22.5 2: 22.5 3: 27.5 @@ -42,6 +62,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 @@ -112,759 +133,904 @@ raw_max_miete_m_nach_baujahr: unit: EUR_PER_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: + unit: DM_PER_MONTH 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: + unit: DM_PER_MONTH 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: + unit: DM_PER_MONTH 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: + unit: DM_PER_MONTH 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: + unit: DM_PER_MONTH + 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 1: 1965: 1: 200 @@ -911,7 +1077,7 @@ raw_max_miete_m_nach_baujahr: 6: 455 3: 1965: - 1: 322 + 1: 320 2: 340 3: 360 4: 390 @@ -937,7 +1103,7 @@ raw_max_miete_m_nach_baujahr: 2: 395 3: 420 4: 455 - 5: 585 + 5: 485 6: 520 1991: 1: 400 @@ -997,8 +1163,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: diff --git a/src/gettsim/germany/wohngeld/wohngeld.py b/src/gettsim/germany/wohngeld/wohngeld.py index 6aff938051..0f6d775765 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.py +++ b/src/gettsim/germany/wohngeld/wohngeld.py @@ -59,7 +59,7 @@ def anspruchshöhe_m_wthh( leaf_name="basisbetrag_m_wthh", end_date="2000-12-31", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=Unit.DM.PER_MONTH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", @@ -94,6 +94,48 @@ 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=Unit.DM.PER_MONTH, + base=1, + direction="nearest", + reference="§ 19 WoGG Abs.2 Anlage 3", + ), + unit=Unit.CURRENCY.PER_MONTH, + # Quadratic in (Miete, Einkommen); its per-currency coefficients are not + # spellable in the unit grammar (GEP 10 D1). + verify_units=False, +) +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=Unit.EUR.PER_MONTH, base=1, @@ -105,7 +147,7 @@ def basisbetrag_m_wthh_bis_2000( # spellable in the unit grammar (GEP 10 D1). verify_units=False, ) -def basisbetrag_m_wthh_ab_2001( +def basisbetrag_m_wthh_ab_2002( anzahl_personen_wthh: int, einkommen_m_wthh: float, miete_m_wthh: float, diff --git a/src/gettsim/germany/wohngeld/wohngeld.yaml b/src/gettsim/germany/wohngeld/wohngeld.yaml index 496fb54973..dd619a182b 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.yaml +++ b/src/gettsim/germany/wohngeld/wohngeld.yaml @@ -569,8 +569,13 @@ zusatzbetrag_pro_person_in_großen_haushalten: unit: EUR_PER_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/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/test_currency.py b/src/gettsim/tests_germany/test_currency.py index 2ef8410b76..2cb5eb730c 100644 --- a/src/gettsim/tests_germany/test_currency.py +++ b/src/gettsim/tests_germany/test_currency.py @@ -36,13 +36,13 @@ def test_euro_converts_to_deutsche_mark_at_the_statutory_rate(): @pytest.mark.parametrize( - "policy_date", + ("policy_date", "expected"), [ - datetime.date(1984, 1, 1), - datetime.date(2001, 12, 31), - datetime.date(2002, 1, 1), - datetime.date(2025, 1, 1), + (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_is_euro_for_every_policy_date(policy_date): - assert statutory_currency_for_date(policy_date) == "EUR" +def test_statutory_currency_changes_over_to_the_euro_in_2002(policy_date, expected): + assert statutory_currency_for_date(policy_date) == expected From 409e987d333487030572d51206a9d6acbd8fa5c1 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Wed, 15 Jul 2026 08:45:55 +0200 Subject: [PATCH 54/65] Declare units in the policy-environment how-to (#1192) `unit=` is a required argument now, so the guide's `@policy_function()` and `@param_function()` no longer run. Both functions it builds are the yearly Kinderfreibetrag, annotated CURRENCY.PER_YEAR in germany/einkommensteuer, so the guide says the same. This is what CI's "Run ty" was failing on. Co-Authored-By: Claude Opus 4.8 --- .../modifications_of_policy_environments.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/how_to_guides/modifications_of_policy_environments.ipynb b/docs/how_to_guides/modifications_of_policy_environments.ipynb index 003533bdbd..4f534b89dc 100644 --- a/docs/how_to_guides/modifications_of_policy_environments.ipynb +++ b/docs/how_to_guides/modifications_of_policy_environments.ipynb @@ -825,7 +825,7 @@ "dictionary.\n", "\n", "```python\n", - "@param_function()\n", + "@param_function(unit=Unit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_pro_kind_y(parameter_kinderfreibetrag: dict[str, float]) -> float:\n", " return sum(parameter_kinderfreibetrag.values())\n", "```" @@ -857,7 +857,7 @@ "The original function looks like this:\n", "\n", "```python\n", - "@param_function()\n", + "@param_function(unit=Unit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_pro_kind_y(\n", " parameter_kinderfreibetrag: dict[str, float],\n", ") -> float:\n", @@ -874,10 +874,10 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import param_function\n", + "from gettsim.tt import Unit, param_function\n", "\n", "\n", - "@param_function()\n", + "@param_function(unit=Unit.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", @@ -964,7 +964,7 @@ "This is the original function:\n", "\n", "```python\n", - "@policy_function()\n", + "@policy_function(unit=Unit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_y(\n", " anzahl_kinderfreibeträge: int,\n", " kinderfreibetrag_pro_kind_y: float,\n", @@ -1000,10 +1000,10 @@ "\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", + "from gettsim.tt import Unit, policy_function\n", "\n", "\n", - "@policy_function()\n", + "@policy_function(unit=Unit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_y(\n", " anzahl_kinderfreibeträge: int,\n", " kinderfreibetrag_pro_kind_y: float,\n", From cf4924ac469835fec888c874a33b36b5b725e474 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Thu, 16 Jul 2026 17:13:21 +0200 Subject: [PATCH 55/65] GEP 10: address the units review and green the rollout CI (#1192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve the codex review of the unit annotations and Deutsche-Mark restatement, and fix the two red CI checks on this PR. Review response: - Cite the Bundesgesetzblatt for the three results-changing DM corrections that lacked a reference: arbeitnehmerpauschbetrag 1990 (2000 DM, Art. 1 G. v. 25.07.1988), the Krankenversicherung Bezugsgröße Ost 1998 (3640 DM, V. v. 02.12.1997), and the Minijobgrenze Ost 1991 (220 DM, § 8 Abs. 1 Nr. 1 SGB IV; the Beitrittsgebiet Rechengröße rests on the DDR statute, noted). - geschwisterbonus_altersgrenzen carries PERSON_COUNT: its dict values are child counts, so the consumer casts a headcount rather than erasing the count dimension. - Restore the pre-2002 beitragsvolumen / gesamtes_rentenvolumen entries in Deutsche Mark. These are Deutsche-Rentenversicherung statistics, not gazetted amounts, so they are converted at the official rate; only their ratio enters the Rentenanpassungsformel, unchanged to 3e-9. CI fixes: - Fold seven over-long reference: lines to satisfy yamllint (88-char limit), matching the repo's existing folded-reference style. - Declare the mandatory unit on every parameter the policy-environment how-to and the introductory tutorial construct (ScalarParam, DictParam, the lookup table, piecewise, and raw params), so the notebooks execute under GEP 10; drop the removed reference_period from the attribute list. Co-Authored-By: Claude Opus 4.8 --- ...modifications_of_policy_environments.ipynb | 43 +++++++++----- docs/tutorials/simple_example.ipynb | 4 +- .../abz\303\274ge/alleinerziehend.yaml" | 3 +- .../abz\303\274ge/vorsorge.yaml" | 3 +- .../werbungskostenpauschale.yaml" | 1 + src/gettsim/germany/elterngeld/boni.yaml | 2 +- .../germany/elterngeld/geschwisterbonus.py | 4 +- .../beitrag/selbstst\303\244ndige.yaml" | 4 +- .../germany/sozialversicherung/minijob.yaml | 9 ++- .../beitrag/beitragsbemessungsgrenze.yaml | 7 ++- .../rente/beitrag/rentenanpassungsformel.yaml | 56 +++++++++++++++++++ src/gettsim/germany/wohngeld/einkommen.yaml | 3 +- 12 files changed, 111 insertions(+), 28 deletions(-) diff --git a/docs/how_to_guides/modifications_of_policy_environments.ipynb b/docs/how_to_guides/modifications_of_policy_environments.ipynb index 4f534b89dc..4f0d50816a 100644 --- a/docs/how_to_guides/modifications_of_policy_environments.ipynb +++ b/docs/how_to_guides/modifications_of_policy_environments.ipynb @@ -222,15 +222,17 @@ "- `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). Parameters that map an input to an output\n", + " — the lookup tables and piecewise polynomials — leave this unset and declare\n", + " `input_unit` and `output_unit` instead.\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. The unit is\n", + "required, so state the same one the parameter you replace declares.\n", "\n", "### Scalar Parameters\n", "\n", @@ -301,8 +303,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; the unit is the one the original parameter\n", + "declares (GEP 10)." ] }, { @@ -312,9 +315,9 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import ScalarParam\n", + "from gettsim.tt import ScalarParam, Unit\n", "\n", - "higher_arbeitnehmerpauschbetrag = ScalarParam(value=1600)" + "higher_arbeitnehmerpauschbetrag = ScalarParam(value=1600, unit=Unit.EUR.PER_YEAR)" ] }, { @@ -416,7 +419,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import DictParam\n", + "from gettsim.tt import DictParam, Unit\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 +430,7 @@ " \"betreuung_erziehung_ausbildung\": 1464,\n", " \"sächliches_existenzminimum\": 4000,\n", " },\n", + " unit=Unit.EUR.PER_YEAR,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -553,6 +557,7 @@ "source": [ "from gettsim.tt import (\n", " ConsecutiveIntLookupTableParam,\n", + " Unit,\n", " get_consecutive_int_lookup_table_param_value,\n", ")\n", "\n", @@ -576,6 +581,8 @@ " },\n", " xnp=np,\n", " ),\n", + " input_unit=Unit.CALENDAR_YEAR,\n", + " output_unit=Unit.YEARS,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -680,7 +687,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import PiecewisePolynomialParam, get_piecewise_parameters\n", + "from gettsim.tt import PiecewisePolynomialParam, Unit, get_piecewise_parameters\n", "\n", "increased_behindertenpauschbetrag = PiecewisePolynomialParam(\n", " value=get_piecewise_parameters(\n", @@ -697,7 +704,9 @@ " ],\n", " leaf_name=\"parameter_behindertenpauschbetrag\",\n", " xnp=np,\n", - " )\n", + " ),\n", + " input_unit=Unit.DIMENSIONLESS,\n", + " output_unit=Unit.EUR.PER_YEAR,\n", ")\n", "\n", "increased_behindertenpauschbetrag_pe = copy_environment(status_quo_environment)\n", @@ -770,7 +779,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import RawParam\n", + "from gettsim.tt import RawParam, Unit\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 +799,9 @@ " {\"interval\": \"[68480, 277825)\", \"slope\": 0.42, \"quadratic\": 0},\n", " {\"interval\": \"[277825, inf)\", \"slope\": 0.45, \"quadratic\": 0},\n", " ],\n", - " }\n", + " },\n", + " input_unit=Unit.EUR.PER_YEAR,\n", + " output_unit=Unit.EUR.PER_YEAR,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -994,13 +1005,15 @@ ")\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, Unit\n", "\n", - "min_anzahl_kinder_für_kinderfreibetrag = ScalarParam(value=2)\n", + "min_anzahl_kinder_für_kinderfreibetrag = ScalarParam(\n", + " value=2, unit=Unit.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 Unit, policy_function\n", + "from gettsim.tt import policy_function\n", "\n", "\n", "@policy_function(unit=Unit.CURRENCY.PER_YEAR)\n", diff --git a/docs/tutorials/simple_example.ipynb b/docs/tutorials/simple_example.ipynb index 947083b14f..1f48b3eb06 100644 --- a/docs/tutorials/simple_example.ipynb +++ b/docs/tutorials/simple_example.ipynb @@ -394,7 +394,7 @@ "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` object into the same place of `policy_environment`, carrying over the unit of the parameter we replace — every parameter must declare one (GEP 10), and changing a value must not change its unit." ] }, { @@ -405,7 +405,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/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" index 1034e14f68..2a73b8abdc 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" @@ -11,7 +11,8 @@ alleinerziehendenfreibetrag_basis: 1984-01-01: unit: DM_PER_YEAR value: 4212 - reference: § 32 Abs. 3 EStG i. d. F. der Bekanntmachung v. 06.12.1981 BGBl. I S. 1249. + reference: >- + § 32 Abs. 3 EStG i. d. F. der Bekanntmachung v. 06.12.1981 BGBl. I S. 1249. 1986-01-01: value: 4536 reference: Art. 1 G. v. 26.06.1985 BGBl. I S. 1153. diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" index e5785adc04..26d3a8ec50 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" @@ -29,7 +29,8 @@ parameter_altersvorsorgeaufwendungen_regime_bis_2004: 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. + 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 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 69e295dcc5..35406ca466 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" @@ -13,6 +13,7 @@ arbeitnehmerpauschbetrag: 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 diff --git a/src/gettsim/germany/elterngeld/boni.yaml b/src/gettsim/germany/elterngeld/boni.yaml index b1416d677b..cdfab9c282 100644 --- a/src/gettsim/germany/elterngeld/boni.yaml +++ b/src/gettsim/germany/elterngeld/boni.yaml @@ -14,7 +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: DIMENSIONLESS + unit: PERSON_COUNT type: dict 2007-01-01: 3: 2 diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index d3c97e93ae..ef0a3528d6 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -40,11 +40,11 @@ def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( ) -> bool: """Siblings that give rise to Elterngeld siblings bonus.""" geschwister_unter_3 = ( - cast_unit(familie__anzahl_kinder_bis_2_fg, Unit.DIMENSIONLESS) + cast_unit(familie__anzahl_kinder_bis_2_fg, Unit.PERSON_COUNT) >= geschwisterbonus_altersgrenzen[3] ) geschwister_unter_6 = ( - cast_unit(familie__anzahl_kinder_bis_5_fg, Unit.DIMENSIONLESS) + cast_unit(familie__anzahl_kinder_bis_5_fg, Unit.PERSON_COUNT) >= geschwisterbonus_altersgrenzen[6] ) 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 a522cae807..9458bdcd04 100644 --- "a/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" +++ "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" @@ -54,7 +54,8 @@ bezugsgröße_selbstständige_nach_wohnort: 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). + reference: >- + § 1 V. v. 19.06.1991 BGBl. I S. 1300 (Zweite V. zur Anpassung der Renten). 1992-01-01: west: 3500 ost: 2100 @@ -76,6 +77,7 @@ bezugsgröße_selbstständige_nach_wohnort: 1998-01-01: west: 4340 ost: 3640 + reference: V. v. 02.12.1997 BGBl. I S. 2782. 1999-01-01: west: 4410 ost: 3710 diff --git a/src/gettsim/germany/sozialversicherung/minijob.yaml b/src/gettsim/germany/sozialversicherung/minijob.yaml index ee3813b6e9..926be02415 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/minijob.yaml @@ -53,10 +53,17 @@ parameter_minijobgrenze_ost_west_unterschied: 1991-01-01: 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). + 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). diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml index 39cd0a25bc..4bc5a30a69 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml @@ -185,8 +185,8 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: 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. + 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: 6500 ost: 3000 @@ -198,7 +198,8 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: 1992-01-01: 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. + 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: 7200 ost: 5300 diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml index c8464b8a7c..46207db341 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml @@ -55,7 +55,35 @@ beitragsvolumen: insurance, marginally employed and recipients of ALG. unit: EUR_PER_YEAR type: scalar + 1991-01-01: + unit: DM_PER_YEAR + value: 212575251 + note: >- + Statistik der Deutschen Rentenversicherung, kein gesetzlicher Betrag; sie steht + nicht im Bundesgesetzblatt. Die Statistik weist die Reihe durchgängig in Euro aus; + die Werte bis 2001 sind mit dem amtlichen Kurs umgerechnet. + 1992-01-01: + value: 229534253 + 1993-01-01: + value: 235792909 + 1994-01-01: + value: 260004129 + 1995-01-01: + value: 273661689 + 1996-01-01: + value: 285864113 + 1997-01-01: + value: 300528926 + 1998-01-01: + value: 300734288 + 1999-01-01: + value: 313922450 + 2000-01-01: + value: 319518080 + 2001-01-01: + value: 322113466 2002-01-01: + unit: EUR_PER_YEAR value: 165481000 2003-01-01: value: 169425000 @@ -133,7 +161,35 @@ gesamtes_rentenvolumen: en: Total amount of paid pensions unit: EUR_PER_YEAR type: scalar + 1991-01-01: + unit: DM_PER_YEAR + value: 230615827 + note: >- + Statistik der Deutschen Rentenversicherung, kein gesetzlicher Betrag; sie steht + nicht im Bundesgesetzblatt. Die Statistik weist die Reihe durchgängig in Euro aus; + die Werte bis 2001 sind mit dem amtlichen Kurs umgerechnet. + 1992-01-01: + value: 256020103 + 1993-01-01: + value: 276124079 + 1994-01-01: + value: 298846912 + 1995-01-01: + value: 318066854 + 1996-01-01: + value: 330447258 + 1997-01-01: + value: 341251263 + 1998-01-01: + value: 352682698 + 1999-01-01: + value: 360144580 + 2000-01-01: + value: 371994954 + 2001-01-01: + value: 382904574 2002-01-01: + unit: EUR_PER_YEAR value: 202355000 2003-01-01: value: 207749000 diff --git a/src/gettsim/germany/wohngeld/einkommen.yaml b/src/gettsim/germany/wohngeld/einkommen.yaml index f258ae2f81..a9277c4c97 100644 --- a/src/gettsim/germany/wohngeld/einkommen.yaml +++ b/src/gettsim/germany/wohngeld/einkommen.yaml @@ -213,7 +213,8 @@ freibetrag_bei_behinderung_gestaffelt_y: 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. + reference: >- + § 16 Abs. 3 WoGG i. d. F. der Bekanntmachung v. 11.07.1985 BGBl I S. 1421. intervals: - interval: (-inf, 80) intercept: 0 From 90237e83a30040a93ebcce84dacacc9fd1d12802 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger <74215010+MImmesberger@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:49:26 +0200 Subject: [PATCH 56/65] GEP 10: adopt the per-policy-system unit registry (#1213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stacked on #1212 (`gep10-rollout`). Adopts the per-policy-system unit registry from ttsim (ttsim-dev/ttsim#145), so GETTSIM's euro base and mettsim's castar base coexist in one process — the dev repo's full test suite runs in a single command. ## What - `germany/__init__.py`: the four import-time registration calls (`register_currency` × 2, `register_statutory_currencies`, `register_unit_builder_levels`) become one declared value: ```python 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"], ) ``` - `main()` and `plot.dag.tt()` gain a `unit_system` parameter, defaulted from `germany.UNIT_SYSTEM` exactly as `orig_policy_objects` is defaulted from `germany.ROOT_PATH`. Users never name it. - Tests exercising the currency API (`test_currency.py`) or ttsim's test helpers (`test_policy_cases.py`) pass the system through. No `unit=` decorator, policy module, or parameter YAML changes. ## Temporary pin `ttsim-backend` is pinned to the `gep10-per-system-unit-registries` branch (re-locked in the same commit). Revert to `main` once the ttsim GEP-10 stack merges, before this PR merges — same pattern as the existing rollout pin. ## Verification (from the dev repo) - The original reproducer `pixi run -e py314 tests ttsim/tests/tt/test_units.py gettsim/src/gettsim/tests_germany/test_currency.py` now passes (173 tests); it died at collection before, on the EUR/CASTAR base collision. - `pixi run -e py314 tests -n 7` (whole dev repo): every ttsim, gettsim, and mettsim test passes. The only remaining failures are pre-existing soep-preparation import issues (sklearn / wealth-imputation models), unrelated to units. - `pixi run ty`: back to the 9-diagnostic baseline (7 soep, 2 unrelated) — the GEP-10 stack adds none. - `prek run --all-files`: passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 --- pixi.lock | 62 +++++++++---------- pyproject.toml | 9 +-- src/gettsim/__init__.py | 4 ++ src/gettsim/germany/__init__.py | 37 +++++------ src/gettsim/plot/dag/__init__.py | 5 ++ src/gettsim/tests_germany/test_currency.py | 24 ++++--- .../tests_germany/test_policy_cases.py | 8 ++- 7 files changed, 79 insertions(+), 70 deletions(-) diff --git a/pixi.lock b/pixi.lock index 3d8306b436..5efe99a3b6 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,7 +261,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -500,7 +500,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -739,7 +739,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -983,7 +983,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -1278,7 +1278,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -1530,7 +1530,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -1782,7 +1782,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -2039,7 +2039,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -2320,7 +2320,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -2562,7 +2562,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -2804,7 +2804,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -3051,7 +3051,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -3341,7 +3341,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -3586,7 +3586,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -3831,7 +3831,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -4081,7 +4081,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -4370,7 +4370,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -4616,7 +4616,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -4862,7 +4862,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -5113,7 +5113,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -5402,7 +5402,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -5648,7 +5648,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -5894,7 +5894,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -6145,7 +6145,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -6434,7 +6434,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -6744,7 +6744,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -6995,7 +6995,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -7251,7 +7251,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -7509,7 +7509,7 @@ 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=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 - 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 @@ -19821,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#78a137d116f7fdebd4bb95bd8b34c165ae7d0e1f +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 name: ttsim-backend - version: 1.2.2.dev49+g78a137d11 + version: 1.2.2.dev50+geee61585a requires_dist: - beartype>=0.18 - dags>=0.6 diff --git a/pyproject.toml b/pyproject.toml index 5ebb51a14d..56e2f18ae8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,10 +168,11 @@ jaxtyping = ">=0.3.2" kaleido = ">=1.0.0" pdbp = ">=1.7.1" dags = ">=0.6.0" -# TEMPORARY (GEP 10 rollout): pin ttsim-backend to the GEP-10 mettsim branch so -# CI installs the units-and-dimensionality ttsim the rollout requires. Revert to -# `branch = "main"` once the ttsim GEP-10 stack merges, before this PR merges. -ttsim-backend = { git = "https://github.com/ttsim-dev/ttsim.git", branch = "gep10-annotate-mettsim" } +# TEMPORARY (GEP 10 rollout): pin ttsim-backend to the per-system-unit-registries +# branch so CI installs the ttsim whose registry is per policy system, which this +# rollout requires. Revert to `branch = "main"` once the ttsim GEP-10 stack merges, +# before this PR merges. +ttsim-backend = { git = "https://github.com/ttsim-dev/ttsim.git", branch = "gep10-per-system-unit-registries" } [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 cccfaa9588..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 @@ -124,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, @@ -138,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 462a7da492..fa59821092 100644 --- a/src/gettsim/germany/__init__.py +++ b/src/gettsim/germany/__init__.py @@ -2,30 +2,25 @@ from pathlib import Path -from ttsim.tt import ( - register_currency, - register_statutory_currencies, - register_unit_builder_levels, -) +from ttsim.tt import UnitSystem ROOT_PATH = Path(__file__).parent -# Germany's currencies. Registered on import so the [currency] dimension has -# concrete currencies before the policy environment is assembled (GEP 10). The -# euro is the base currency; the Deutsche Mark is worth 1/1.95583 euro, the rate -# fixed by the Euro-Einführungsgesetz. The statutory-currency mapping tells the -# engine which currency each policy date computes in: the Deutsche Mark through -# 2001 and the euro from 2002, when the euro became legal tender. Parameters are -# never converted (GEP 10) — every pre-2002 currency value carries its statutory -# DM amount, every value from 2002 its statutory euro amount. -register_currency(name="EUR", base=True) -register_currency(name="DM", definition="EUR / 1.95583") -register_statutory_currencies({"0001-01-01": "DM", "2002-01-01": "EUR"}) - -# Germany's grouping levels. Registered on import so the fluent unit builder -# offers `Unit.X.PER_HH` / `per_bg` / … before the policy modules (whose -# decorators use them) are loaded (GEP 10 compositional units). -register_unit_builder_levels(["hh", "ehe", "fg", "bg", "eg", "wthh", "sn"]) +# Germany's unit system, built on import so the [currency] dimension has concrete +# currencies and the fluent builder offers `Unit.X.PER_HH` / `per_bg` / … before +# the policy modules (whose decorators use them) are loaded (GEP 10). The euro is +# the base currency; the Deutsche Mark is worth 1/1.95583 euro, the rate fixed by +# the Euro-Einführungsgesetz. The statutory-currency mapping tells the engine +# which currency each policy date computes in: the Deutsche Mark through 2001 and +# the euro from 2002, when the euro became legal tender. Parameters are never +# converted (GEP 10) — every pre-2002 currency value carries its statutory DM +# amount, every value from 2002 its statutory euro amount. +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 = """ 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/test_currency.py b/src/gettsim/tests_germany/test_currency.py index 2cb5eb730c..5e47faf9ab 100644 --- a/src/gettsim/tests_germany/test_currency.py +++ b/src/gettsim/tests_germany/test_currency.py @@ -1,6 +1,6 @@ -"""GETTSIM's currency registration (GEP 10). +"""GETTSIM's unit system (GEP 10). -Importing ``gettsim`` registers the euro as the base currency and the +``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. """ @@ -10,29 +10,27 @@ import datetime import pytest -from ttsim.tt.currencies import ( - base_currency, - currency_conversion_factor, - statutory_currency_for_date, -) -# Importing gettsim runs germany/__init__.py, which registers the currencies. -import gettsim # noqa: F401 +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(): - assert base_currency() == "EUR" + assert UNIT_SYSTEM.base_currency == "EUR" def test_deutsche_mark_converts_to_euro_at_the_statutory_rate(): - assert currency_conversion_factor("DM", "EUR") == pytest.approx(1 / DM_PER_EUR) + 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(): - assert currency_conversion_factor("EUR", "DM") == pytest.approx(DM_PER_EUR) + assert UNIT_SYSTEM.currency_conversion_factor( + source_currency="EUR", target_currency="DM" + ) == pytest.approx(DM_PER_EUR) @pytest.mark.parametrize( @@ -45,4 +43,4 @@ def test_euro_converts_to_deutsche_mark_at_the_statutory_rate(): ], ) def test_statutory_currency_changes_over_to_the_euro_in_2002(policy_date, expected): - assert statutory_currency_for_date(policy_date) == expected + 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, ) From ab0321fcd4feda462689919e1ff7b2003e2bc6b8 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 13:47:24 +0200 Subject: [PATCH 57/65] GEP 10: unit fixes for arbeitslosengeld_2/wohngeld + bump ttsim to 4dc065aa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - restore eg→bg transfer cast in anspruchshöhe_m; berechtigte_wohnfläche cast-free via the schedule param-function output unit + max/min shim - wohngeld basisbetrag/anspruchshöhe/betrag chain to .PER_WTHH; drop redundant casts - wohngeld EUR-only heating/climate lookups: raw output_unit -> _PER_HH, drop casts --- CHANGES.md | 13 +-- docs/geps/params-schema.json | 8 +- ...modifications_of_policy_environments.ipynb | 55 ++++++------ docs/tutorials/simple_example.ipynb | 2 +- pixi.lock | 62 ++++++------- pyproject.toml | 4 - src/gettsim/germany/__init__.py | 2 +- .../arbeitslosengeld_2/arbeitslosengeld_2.py | 26 +++--- .../germany/arbeitslosengeld_2/einkommen.py | 21 +++-- .../freibetr\303\244ge_verm\303\266gen.py" | 12 ++- .../germany/arbeitslosengeld_2/inputs.py | 4 +- .../kindergeld\303\274bertrag.py" | 19 ++-- .../kosten_der_unterkunft.yaml | 4 +- .../germany/arbeitslosengeld_2/regelbedarf.py | 74 ++++++++------- .../b\303\274rgergeld/b\303\274rgergeld.py" | 18 ++-- .../germany/b\303\274rgergeld/einkommen.py" | 12 +-- .../freibetr\303\244ge_verm\303\266gen.py" | 10 +-- .../germany/b\303\274rgergeld/inputs.py" | 6 +- .../kindergeld\303\274bertrag.py" | 19 ++-- .../germany/b\303\274rgergeld/regelbedarf.py" | 43 ++++----- .../abgeltungssteuer/abgeltungssteuer.py | 4 +- .../abz\303\274ge/alleinerziehend.py" | 8 +- .../einkommensteuer/abz\303\274ge/alter.py" | 6 +- .../abz\303\274ge/behinderung.py" | 4 +- .../einkommensteuer/abz\303\274ge/betrag.py" | 6 +- .../einkommensteuer/abz\303\274ge/inputs.py" | 8 +- .../abz\303\274ge/sonderausgaben.py" | 16 ++-- .../abz\303\274ge/vorsorge.py" | 36 ++++---- .../germany/einkommensteuer/einkommen.py | 4 +- .../einkommensteuer/einkommensteuer.py | 34 +++---- .../aus_forst_und_landwirtschaft/inputs.py" | 4 +- .../aus_gewerbebetrieb/inputs.py" | 4 +- .../aus_kapitalverm\303\266gen.py" | 6 +- ...aus_nichtselbstst\303\244ndiger_arbeit.py" | 20 ++--- .../inputs.py" | 4 +- .../inputs.py" | 4 +- .../aus_vermietung_und_verpachtung/inputs.py" | 4 +- .../eink\303\274nfte/eink\303\274nfte.py" | 6 +- .../eink\303\274nfte/inputs.py" | 4 +- .../eink\303\274nfte/sonstige/inputs.py" | 4 +- .../sonstige/rente/inputs.py" | 8 +- .../eink\303\274nfte/sonstige/rente/rente.py" | 16 ++-- .../eink\303\274nfte/sonstige/sonstige.py" | 4 +- src/gettsim/germany/einkommensteuer/inputs.py | 4 +- .../einkommensteuer/kinderfreibetrag.py | 16 ++-- .../zu_versteuerndes_einkommen.py | 16 ++-- src/gettsim/germany/einnahmen/inputs.py | 6 +- .../germany/einnahmen/renten/betrag_gesamt.py | 6 +- .../germany/einnahmen/renten/gesetzliche.py | 4 +- .../germany/einnahmen/renten/inputs.py | 12 +-- src/gettsim/germany/elterngeld/einkommen.py | 22 ++--- src/gettsim/germany/elterngeld/elterngeld.py | 60 +++++++------ .../germany/elterngeld/geschwisterbonus.py | 23 ++--- src/gettsim/germany/elterngeld/inputs.py | 10 +-- .../germany/erziehungsgeld/erziehungsgeld.py | 48 +++++----- src/gettsim/germany/erziehungsgeld/inputs.py | 8 +- src/gettsim/germany/familie/familie.py | 90 ++++++++++--------- src/gettsim/germany/familie/inputs.py | 20 +++-- src/gettsim/germany/grundsicherung/bedarfe.py | 8 +- .../hilfe_zum_lebensunterhalt.py | 6 +- .../grundsicherung/im_alter/einkommen.py | 20 ++--- .../grundsicherung/im_alter/im_alter.py | 56 +++++++----- src/gettsim/germany/hh_characteristics.py | 4 +- src/gettsim/germany/ids.py | 22 ++--- .../germany/individual_characteristics.py | 6 +- src/gettsim/germany/inputs.py | 24 ++--- .../germany/kinderbonus/kinderbonus.py | 4 +- src/gettsim/germany/kindergeld/inputs.py | 6 +- src/gettsim/germany/kindergeld/kindergeld.py | 22 ++--- .../germany/kinderzuschlag/einkommen.py | 51 ++++++----- .../germany/kinderzuschlag/kinderzuschlag.py | 45 +++++----- src/gettsim/germany/lohnsteuer/einkommen.py | 46 +++++----- src/gettsim/germany/lohnsteuer/inputs.py | 4 +- src/gettsim/germany/lohnsteuer/lohnsteuer.py | 22 ++--- src/gettsim/germany/param_types.py | 16 ++-- .../solidarit\303\244tszuschlag.py" | 6 +- .../arbeitslosen/arbeitslosengeld.py | 14 +-- .../arbeitslosen/beitrag/beitrag.py | 24 ++--- .../sozialversicherung/arbeitslosen/inputs.py | 12 +-- .../sozialversicherung/beitr\303\244ge.py" | 8 +- .../kranken/beitrag/beitrag.py | 36 ++++---- .../kranken/beitrag/beitragssatz.py | 40 ++++----- .../kranken/beitrag/einkommen.py | 16 ++-- .../kranken/beitrag/inputs.py | 6 +- .../germany/sozialversicherung/midijob.py | 16 ++-- .../germany/sozialversicherung/minijob.py | 12 +-- .../pflege/beitrag/beitrag.py | 38 ++++---- .../pflege/beitrag/beitragssatz.py | 20 ++--- .../pflege/beitrag/inputs.py | 4 +- .../regul\303\244r_besch\303\244ftigt.py" | 6 +- .../rente/alter_bei_renteneintritt.py | 6 +- .../rente/altersrente/altersgrenzen.py | 26 +++--- .../rente/altersrente/altersrente.py | 20 ++--- .../besonders_langj\303\244hrig.py" | 6 +- .../f\303\274r_frauen/f\303\274r_frauen.py" | 22 ++--- .../altersrente/f\303\274r_frauen/inputs.py" | 4 +- .../altersrente/hinzuverdienstgrenzen.py | 24 ++--- .../rente/altersrente/inputs.py | 4 +- .../langj\303\244hrig/langj\303\244hrig.py" | 14 +-- .../regelaltersrente/regelaltersrente.py | 6 +- .../wegen_arbeitslosigkeit/inputs.py | 14 +-- .../wegen_arbeitslosigkeit.py | 62 ++++++------- .../rente/beitrag/beitrag.py | 30 +++---- .../sozialversicherung/rente/entgeltpunkte.py | 8 +- .../erwerbsminderung/erwerbsminderung.py | 68 +++++++------- .../rente/erwerbsminderung/inputs.py | 6 +- .../rente/grundrente/grundrente.py | 30 +++---- .../rente/grundrente/inputs.py | 18 ++-- .../sozialversicherung/rente/inputs.py | 40 ++++----- .../sozialversicherung/rente/wartezeit.py | 14 +-- src/gettsim/germany/unterhalt/inputs.py | 6 +- src/gettsim/germany/unterhalt/unterhalt.py | 4 +- .../unterhaltsvorschuss.py | 34 +++---- .../vorrangpr\303\274fungen.py" | 14 +-- src/gettsim/germany/wohnen/inputs.py | 12 +-- src/gettsim/germany/wohngeld/einkommen.py | 20 ++--- src/gettsim/germany/wohngeld/inputs.py | 4 +- src/gettsim/germany/wohngeld/miete.py | 40 +++++---- src/gettsim/germany/wohngeld/miete.yaml | 6 +- .../germany/wohngeld/voraussetzungen.py | 32 +++---- src/gettsim/germany/wohngeld/wohngeld.py | 20 ++--- src/gettsim/tt/__init__.py | 4 +- 122 files changed, 1135 insertions(+), 1076 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index fd52ad8043..bcd8e5832f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,14 +15,8 @@ All releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ge ## Unreleased -- {gh}`1192` Annotate the taxes and transfers system with units and dimensions (GEP 10). - Every `@policy_function`, `@policy_input`, `@param_function` and - `@group_creation_function` declares a unit, as does every parameter in the YAML files. - The euro is registered as the base currency and the Deutsche Mark relative to it, so - that policy dates before 2002 compute in the currency of their day. - ({ghuser}`MImmesberger`) -- {gh}`1192` Rename columns whose name did not match the quantity they carry. Most gain - the suffix of the period they are measured over: `basistarif`, `splittingtarif`, +- {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`, @@ -33,8 +27,7 @@ All releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ge `satz` all gain `_m`. Two lose a suffix they should never have had, being shares rather than flows: `anteil_steuerfälliger_einnahmen_y` and `mehrbedarf_alleinerziehend_m`. `gesamteinkommen_y` becomes `gesamteinkommen_y_sn`, - naming the level it is aggregated to. There are no aliases; the old names are gone. - ({ghuser}`MImmesberger`) + 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 5efe4dfc13..3a8be91332 100644 --- a/docs/geps/params-schema.json +++ b/docs/geps/params-schema.json @@ -1,11 +1,11 @@ { - "$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": "A fully-spelled compositional unit (GEP 10): a base optionally divided by an area, a period, and a grouping level, joined by `_PER_` (e.g. DIMENSIONLESS, CURRENCY_PER_MONTH_PER_BG, SILVER_PENNY_PER_FAM, PERSON_COUNT_PER_HH). Bases and grouping levels are open (per-package currencies, per-build levels), so this is a coarse pattern; `parse_compositional_unit` validates the grammar at load time.", + "$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_]*$" + "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": [ @@ -157,7 +157,6 @@ ] }, "else": { - "$comment": "Scalar/dict parameter: `unit:` may sit at the top level (shared by every date) or one level lower, inside each date-specific key, so a parameter re-denominated over time can spell its unit symmetrically per date. The schema therefore does not require `unit:` here; the build-time mandatory-units check (`fail_if_environment_units_are_missing`) is the guarantee that every active leaf resolves to a unit (GEP 10).", "allOf": [ { "not": { "required": ["input_unit"] } }, { "not": { "required": ["output_unit"] } } @@ -166,7 +165,6 @@ } }, { - "$comment": "A scalar parameter takes its period from a time suffix on its name and declares a single fully-spelled `unit:` token, not a per-leaf mapping (which only a dict or require_converter parameter may use).", "if": { "properties": { "type": { "const": "scalar" } }, "required": ["type"] diff --git a/docs/how_to_guides/modifications_of_policy_environments.ipynb b/docs/how_to_guides/modifications_of_policy_environments.ipynb index 4f0d50816a..ad6caa33dc 100644 --- a/docs/how_to_guides/modifications_of_policy_environments.ipynb +++ b/docs/how_to_guides/modifications_of_policy_environments.ipynb @@ -222,17 +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 (GEP 10). Parameters that map an input to an output\n", - " — the lookup tables and piecewise polynomials — leave this unset and declare\n", - " `input_unit` and `output_unit` instead.\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. The unit is\n", - "required, so state the same one the parameter you replace declares.\n", + "When modifying parameters, you will mostly care about the `value` attribute. Every\n", + "parameter must declare a `unit` (GEP 10); keep the one the original declares.\n", + "Parameters state a concrete currency, e.g. `TTSIMUnit.EUR.PER_YEAR`.\n", "\n", "### Scalar Parameters\n", "\n", @@ -315,9 +314,9 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import ScalarParam, Unit\n", + "from gettsim.tt import ScalarParam, TTSIMUnit\n", "\n", - "higher_arbeitnehmerpauschbetrag = ScalarParam(value=1600, unit=Unit.EUR.PER_YEAR)" + "higher_arbeitnehmerpauschbetrag = ScalarParam(value=1600, unit=TTSIMUnit.EUR.PER_YEAR)" ] }, { @@ -419,7 +418,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import DictParam, Unit\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", @@ -430,7 +429,7 @@ " \"betreuung_erziehung_ausbildung\": 1464,\n", " \"sächliches_existenzminimum\": 4000,\n", " },\n", - " unit=Unit.EUR.PER_YEAR,\n", + " unit=TTSIMUnit.EUR.PER_YEAR,\n", ")\n", "\n", "# Step 3: Insert the new parameter into the copied policy environment\n", @@ -557,7 +556,7 @@ "source": [ "from gettsim.tt import (\n", " ConsecutiveIntLookupTableParam,\n", - " Unit,\n", + " TTSIMUnit,\n", " get_consecutive_int_lookup_table_param_value,\n", ")\n", "\n", @@ -581,8 +580,8 @@ " },\n", " xnp=np,\n", " ),\n", - " input_unit=Unit.CALENDAR_YEAR,\n", - " output_unit=Unit.YEARS,\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", @@ -687,7 +686,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import PiecewisePolynomialParam, Unit, get_piecewise_parameters\n", + "from gettsim.tt import PiecewisePolynomialParam, TTSIMUnit, get_piecewise_parameters\n", "\n", "increased_behindertenpauschbetrag = PiecewisePolynomialParam(\n", " value=get_piecewise_parameters(\n", @@ -705,8 +704,8 @@ " leaf_name=\"parameter_behindertenpauschbetrag\",\n", " xnp=np,\n", " ),\n", - " input_unit=Unit.DIMENSIONLESS,\n", - " output_unit=Unit.EUR.PER_YEAR,\n", + " input_unit=TTSIMUnit.DIMENSIONLESS,\n", + " output_unit=TTSIMUnit.EUR.PER_YEAR,\n", ")\n", "\n", "increased_behindertenpauschbetrag_pe = copy_environment(status_quo_environment)\n", @@ -779,7 +778,7 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import RawParam, Unit\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", @@ -800,8 +799,8 @@ " {\"interval\": \"[277825, inf)\", \"slope\": 0.45, \"quadratic\": 0},\n", " ],\n", " },\n", - " input_unit=Unit.EUR.PER_YEAR,\n", - " output_unit=Unit.EUR.PER_YEAR,\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", @@ -836,7 +835,7 @@ "dictionary.\n", "\n", "```python\n", - "@param_function(unit=Unit.CURRENCY.PER_YEAR)\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", "```" @@ -868,7 +867,7 @@ "The original function looks like this:\n", "\n", "```python\n", - "@param_function(unit=Unit.CURRENCY.PER_YEAR)\n", + "@param_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_pro_kind_y(\n", " parameter_kinderfreibetrag: dict[str, float],\n", ") -> float:\n", @@ -885,10 +884,10 @@ "metadata": {}, "outputs": [], "source": [ - "from gettsim.tt import Unit, param_function\n", + "from gettsim.tt import TTSIMUnit, param_function\n", "\n", "\n", - "@param_function(unit=Unit.CURRENCY.PER_YEAR)\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", @@ -966,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", @@ -975,7 +978,7 @@ "This is the original function:\n", "\n", "```python\n", - "@policy_function(unit=Unit.CURRENCY.PER_YEAR)\n", + "@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR)\n", "def kinderfreibetrag_y(\n", " anzahl_kinderfreibeträge: int,\n", " kinderfreibetrag_pro_kind_y: float,\n", @@ -1005,10 +1008,10 @@ ")\n", "\n", "# Step 2: Create a new parameter `min_anzahl_kinder_für_kinderfreibetrag`\n", - "from gettsim.tt import ScalarParam, Unit\n", + "from gettsim.tt import ScalarParam, TTSIMUnit\n", "\n", "min_anzahl_kinder_für_kinderfreibetrag = ScalarParam(\n", - " value=2, unit=Unit.PERSON_COUNT.PER_FG\n", + " value=2, unit=TTSIMUnit.PERSON_COUNT\n", ")\n", "\n", "# Step 3: Create a new `PolicyFunction` that modifies the tax deduction for children\n", @@ -1016,7 +1019,7 @@ "from gettsim.tt import policy_function\n", "\n", "\n", - "@policy_function(unit=Unit.CURRENCY.PER_YEAR)\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/tutorials/simple_example.ipynb b/docs/tutorials/simple_example.ipynb index 1f48b3eb06..88417db9f8 100644 --- a/docs/tutorials/simple_example.ipynb +++ b/docs/tutorials/simple_example.ipynb @@ -394,7 +394,7 @@ "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`, carrying over the unit of the parameter we replace — every parameter must declare one (GEP 10), and changing a value must not change its unit." + "We get the current `value` of the `ScalarParam` out. We then inject a new `ScalarParam` object into the same place of `policy_environment`, carrying over the unit of the parameter we replace — every parameter must declare one (GEP 10)." ] }, { diff --git a/pixi.lock b/pixi.lock index 5efe99a3b6..85035c17d2 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,7 +261,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -500,7 +500,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -739,7 +739,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -983,7 +983,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -1278,7 +1278,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -1530,7 +1530,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -1782,7 +1782,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -2039,7 +2039,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -2320,7 +2320,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -2562,7 +2562,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -2804,7 +2804,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -3051,7 +3051,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -3341,7 +3341,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -3586,7 +3586,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -3831,7 +3831,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -4081,7 +4081,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -4370,7 +4370,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -4616,7 +4616,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -4862,7 +4862,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -5113,7 +5113,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -5402,7 +5402,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -5648,7 +5648,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -5894,7 +5894,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -6145,7 +6145,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -6434,7 +6434,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -6744,7 +6744,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -6995,7 +6995,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -7251,7 +7251,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -7509,7 +7509,7 @@ 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=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 - 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 @@ -19821,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#eee61585a0e083315bd2629b76511ffc44b4c0e6 +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 name: ttsim-backend - version: 1.2.2.dev50+geee61585a + version: 1.2.2.dev52+g4dc065aaa requires_dist: - beartype>=0.18 - dags>=0.6 diff --git a/pyproject.toml b/pyproject.toml index 56e2f18ae8..b7206930e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,10 +168,6 @@ jaxtyping = ">=0.3.2" kaleido = ">=1.0.0" pdbp = ">=1.7.1" dags = ">=0.6.0" -# TEMPORARY (GEP 10 rollout): pin ttsim-backend to the per-system-unit-registries -# branch so CI installs the ttsim whose registry is per policy system, which this -# rollout requires. Revert to `branch = "main"` once the ttsim GEP-10 stack merges, -# before this PR merges. ttsim-backend = { git = "https://github.com/ttsim-dev/ttsim.git", branch = "gep10-per-system-unit-registries" } [tool.pixi.workspace] channels = [ "conda-forge" ] diff --git a/src/gettsim/germany/__init__.py b/src/gettsim/germany/__init__.py index fa59821092..e528253665 100644 --- a/src/gettsim/germany/__init__.py +++ b/src/gettsim/germany/__init__.py @@ -7,7 +7,7 @@ ROOT_PATH = Path(__file__).parent # Germany's unit system, built on import so the [currency] dimension has concrete -# currencies and the fluent builder offers `Unit.X.PER_HH` / `per_bg` / … before +# currencies and the fluent builder offers `TTSIMUnit.X.PER_HH` / `per_bg` / … before # the policy modules (whose decorators use them) are loaded (GEP 10). The euro is # the base currency; the Deutsche Mark is worth 1/1.95583 euro, the rate fixed by # the Euro-Einführungsgesetz. The statutory-currency mapping tells the engine diff --git a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py index 06c64bc61b..7a35f7306a 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py +++ b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py @@ -9,11 +9,11 @@ from __future__ import annotations -from gettsim.tt import Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def betrag_m( anspruchshöhe_m: float, @@ -30,7 +30,7 @@ def betrag_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def anspruchshöhe_m( ungedeckter_bedarf_m: float, @@ -47,24 +47,22 @@ def anspruchshöhe_m( Reference: §9 Abs. 2 Satz 3 SGB II """ + # 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, - Unit.CURRENCY.PER_MONTH.PER_BG, + TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) anspruch_m_bg = max(0.0, ungedeckter_bedarf_m_bg - total_income_m_bg) if ungedeckter_bedarf_m_bg == 0.0 or vermögen_bg > vermögensfreibetrag_bg: return 0.0 else: - # Distribute the BG surplus by each member's share of the BG Bedarf. - return cast_unit( - (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg, - Unit.CURRENCY.PER_MONTH, - ) + return (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def ungedeckter_bedarf_m( regelbedarf_m: float, @@ -90,7 +88,7 @@ def ungedeckter_bedarf_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def einkommen_zur_verteilung_m( regelbedarf_m: float, @@ -117,7 +115,7 @@ def einkommen_zur_verteilung_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def überschusseinkommen_m( einkommen_zur_verteilung_m_bg: float, @@ -131,9 +129,7 @@ def überschusseinkommen_m( Reference: BSG B 14 AS 89/20 R """ - # The BG-level surplus is attributed to each member; downstream code aggregates - # `_m_eg` for the mixed-BG partner's Grundsicherung. return cast_unit( max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg), - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) diff --git a/src/gettsim/germany/arbeitslosengeld_2/einkommen.py b/src/gettsim/germany/arbeitslosengeld_2/einkommen.py index 5e664e4c72..bea12fda9f 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/einkommen.py +++ b/src/gettsim/germany/arbeitslosengeld_2/einkommen.py @@ -6,8 +6,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, - Unit, - cast_unit, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -17,7 +16,7 @@ @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + 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, @@ -45,7 +44,7 @@ def anzurechnendes_einkommen_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + 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, @@ -56,7 +55,7 @@ def nettoeinkommen_nach_abzug_freibetrag_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def nettoeinkommen_vor_abzug_freibetrag_m( bruttoeinkommen_m: float, @@ -75,7 +74,7 @@ def nettoeinkommen_vor_abzug_freibetrag_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def bruttoeinkommen_m( einnahmen__bruttolohn_m: float, @@ -101,7 +100,7 @@ def bruttoeinkommen_m( @policy_function( - start_date="2005-01-01", end_date="2005-09-30", unit=Unit.DIMENSIONLESS + start_date="2005-01-01", end_date="2005-09-30", unit=TTSIMUnit.DIMENSIONLESS ) def nettoquote( einnahmen__bruttolohn_m: float, @@ -125,17 +124,17 @@ def nettoquote( - abzugsfähige_pauschalen["werbung"] - abzugsfähige_pauschalen["versicherung"] ), - 0, + 0.0, ) - return cast_unit(alg2_2005_bne / einnahmen__bruttolohn_m, Unit.DIMENSIONLESS) + return alg2_2005_bne / einnahmen__bruttolohn_m @policy_function( start_date="2005-01-01", end_date="2005-09-30", leaf_name="anrechnungsfreies_einkommen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anrechnungsfreies_einkommen_m_basierend_auf_nettoquote( einnahmen__bruttolohn_m: float, @@ -152,7 +151,7 @@ def anrechnungsfreies_einkommen_m_basierend_auf_nettoquote( @policy_function( - start_date="2005-10-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-10-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def anrechnungsfreies_einkommen_m( einnahmen__bruttolohn_m: float, 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 d846a46f7e..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 Unit, 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", unit=Unit.CURRENCY) +@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", unit=Unit.CURRENCY) +@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,7 +50,7 @@ def maximaler_grundfreibetrag_vermögen( @policy_function( start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_BG, + 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 7ea2e84273..abdcc575fa 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/inputs.py +++ b/src/gettsim/germany/arbeitslosengeld_2/inputs.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import FKType, Unit, 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=Unit.DIMENSIONLESS, + 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 af7f5e40f5..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,7 @@ from gettsim.tt import ( AggType, - Unit, + TTSIMUnit, agg_by_p_id_function, cast_unit, join, @@ -23,7 +23,7 @@ start_date="2005-01-01", end_date="2022-12-31", agg_type=AggType.SUM, - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeldübertrag_m( differenz_kindergeld_kindbedarf_m: float, @@ -37,7 +37,7 @@ def kindergeldübertrag_m( start_date="2005-01-01", end_date="2022-12-31", leaf_name="kindergeld_pro_kind_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def _mean_kindergeld_per_child_gestaffelt_m( kindergeld__betrag_m: float, @@ -60,7 +60,7 @@ def _mean_kindergeld_per_child_gestaffelt_m( start_date="2005-01-01", end_date="2022-12-31", vectorization_strategy="not_required", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeld_zur_bedarfsdeckung_m( kindergeld_pro_kind_m: FloatColumn, @@ -88,7 +88,7 @@ def kindergeld_zur_bedarfsdeckung_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def differenz_kindergeld_kindbedarf_m( regelbedarf_m_bg: float, @@ -110,11 +110,8 @@ def differenz_kindergeld_kindbedarf_m( to the parental level. """ fehlbetrag = max( - cast_unit(regelbedarf_m_bg, Unit.CURRENCY.PER_MONTH) - - cast_unit( - wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh, - Unit.CURRENCY.PER_MONTH, - ) + 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 - unterhaltsvorschuss__betrag_m, @@ -136,7 +133,7 @@ def differenz_kindergeld_kindbedarf_m( start_date="2005-01-01", end_date="2022-12-31", vectorization_strategy="not_required", - unit=Unit.DIMENSIONLESS, + 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 a730dfcb66..9cc8383d7d 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml +++ b/src/gettsim/germany/arbeitslosengeld_2/kosten_der_unterkunft.yaml @@ -39,7 +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_METER + unit: + single: SQUARE_METER_PER_HH + je_weitere_person: SQUARE_METER type: dict 2005-01-01: single: 45 diff --git a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py index 2506f41b72..63cca58f75 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py +++ b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py @@ -8,7 +8,7 @@ from gettsim.tt import ( UNSET_UNIT, ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, cast_unit, get_consecutive_int_lookup_table_param_value, param_function, @@ -23,7 +23,7 @@ @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def regelbedarf_m( regelsatz_m: float, @@ -37,7 +37,7 @@ def regelbedarf_m( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.DIMENSIONLESS + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS ) def mehrbedarf_alleinerziehend( familie__alleinerziehend: bool, @@ -54,9 +54,11 @@ def mehrbedarf_alleinerziehend( Reference: §21 SGB II """ + # 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_mehrbedarf_alleinerziehend[ "basis_je_kind_bis_17" - ] * cast_unit(familie__anzahl_kinder_bis_17_fg, Unit.DIMENSIONLESS) + ] * cast_unit(familie__anzahl_kinder_bis_17_fg, TTSIMUnit.DIMENSIONLESS) if ( familie__anzahl_kinder_bis_6_fg == 1 @@ -80,7 +82,7 @@ def mehrbedarf_alleinerziehend( start_date="2005-01-01", end_date="2010-12-31", leaf_name="kindersatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_anteilsbasiert( alter: int, @@ -123,7 +125,7 @@ def kindersatz_m_anteilsbasiert( start_date="2011-01-01", end_date="2022-06-30", leaf_name="kindersatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_ohne_sofortzuschlag( alter: int, @@ -164,7 +166,7 @@ def kindersatz_m_nach_regelbedarfsstufen_ohne_sofortzuschlag( start_date="2022-07-01", end_date="2022-12-31", leaf_name="kindersatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( alter: int, @@ -203,7 +205,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( start_date="2005-01-01", end_date="2010-12-31", leaf_name="erwachsenensatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_bis_2010( mehrbedarf_alleinerziehend: float, @@ -230,7 +232,7 @@ def erwachsenensatz_m_bis_2010( start_date="2011-01-01", end_date="2022-12-31", leaf_name="erwachsenensatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( mehrbedarf_alleinerziehend: float, @@ -252,7 +254,7 @@ def erwachsenensatz_m_ab_2011( @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def regelsatz_m( erwachsenensatz_m: float, @@ -266,7 +268,7 @@ def regelsatz_m( start_date="2005-01-01", end_date="2022-12-31", leaf_name="kosten_der_unterkunft_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_bis_2022( berechtigte_wohnfläche: float, @@ -279,7 +281,7 @@ def kosten_der_unterkunft_m_bis_2022( @policy_function( start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_SQUARE_METER.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_SQUARE_METER.PER_MONTH, ) def anerkannte_warmmiete_je_qm_m( bruttokaltmiete_m: float, @@ -295,10 +297,7 @@ def anerkannte_warmmiete_je_qm_m( @policy_function( start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.SQUARE_METER, - # The Eigentum branch looks up a dynamically built table whose axes the dry-run - # cannot model; the per-person division is covered by `wohnfläche` above. - verify_units=False, + unit=TTSIMUnit.SQUARE_METER, ) def berechtigte_wohnfläche( wohnfläche: float, @@ -313,14 +312,14 @@ 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", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def bruttokaltmiete_m( wohnen__bruttokaltmiete_m_hh: float, @@ -332,14 +331,11 @@ def bruttokaltmiete_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return cast_unit( - wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh, - Unit.CURRENCY.PER_MONTH, - ) + return wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh @policy_function( - start_date="2005-01-01", end_date="2022-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def heizkosten_m( wohnen__heizkosten_m_hh: float, @@ -351,35 +347,31 @@ def heizkosten_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return cast_unit( - wohnen__heizkosten_m_hh / anzahl_personen_hh, - Unit.CURRENCY.PER_MONTH, - ) + return wohnen__heizkosten_m_hh / anzahl_personen_hh -@policy_function(start_date="2005-01-01", end_date="2022-12-31", unit=Unit.SQUARE_METER) +@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, ) -> float: """Share of household's dwelling size attributed to a single person.""" - return cast_unit( - wohnen__wohnfläche_hh / anzahl_personen_hh, - Unit.SQUARE_METER, - ) + return wohnen__wohnfläche_hh / anzahl_personen_hh @dataclass(frozen=True) class RegelsatzAnteilErwachsen: - je_erwachsener_bei_zwei_erwachsenen: Annotated[float, Unit.DIMENSIONLESS] - je_erwachsener_ab_drei_erwachsene: Annotated[float, Unit.DIMENSIONLESS] + je_erwachsener_bei_zwei_erwachsenen: Annotated[float, TTSIMUnit.DIMENSIONLESS] + je_erwachsener_ab_drei_erwachsene: Annotated[float, TTSIMUnit.DIMENSIONLESS] @dataclass(frozen=True) class RegelsatzAnteilKind: - anteil: Annotated[float, Unit.DIMENSIONLESS] - min_alter: Annotated[int, Unit.YEARS] - max_alter: Annotated[int, Unit.YEARS] + anteil: Annotated[float, TTSIMUnit.DIMENSIONLESS] + min_alter: Annotated[int, TTSIMUnit.YEARS] + max_alter: Annotated[int, TTSIMUnit.YEARS] @dataclass(frozen=True) @@ -391,7 +383,7 @@ class RegelsatzAnteilKindNachAlter: @dataclass(frozen=True) class RegelsatzAnteilsbasiert: - basissatz: Annotated[float, Unit.CURRENCY.PER_MONTH] + basissatz: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] erwachsen: RegelsatzAnteilErwachsen kind: RegelsatzAnteilKindNachAlter @@ -438,7 +430,11 @@ def regelsatz_anteilsbasiert( ) -@param_function(start_date="2005-01-01", end_date="2022-12-31", unit=UNSET_UNIT) +@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/b\303\274rgergeld.py" "b/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" index 9f8261e2aa..d43b884fb0 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 Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -45,7 +45,7 @@ def anspruchshöhe_m( """ total_income_m_bg = einkommen_zur_verteilung_m_bg + cast_unit( grundsicherung__im_alter__überschusseinkommen_m_eg, - Unit.CURRENCY.PER_MONTH.PER_BG, + TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) anspruch_m_bg = max(0.0, ungedeckter_bedarf_m_bg - total_income_m_bg) @@ -55,11 +55,11 @@ def anspruchshöhe_m( # Distribute the BG surplus by each member's share of the BG Bedarf. return cast_unit( (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg, - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def ungedeckter_bedarf_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -83,7 +83,7 @@ def ungedeckter_bedarf_m( return regelbedarf_m -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_zur_verteilung_m( regelbedarf_m: float, anzurechnendes_einkommen_m: float, @@ -108,7 +108,7 @@ def einkommen_zur_verteilung_m( return anzurechnendes_einkommen_m -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def überschusseinkommen_m( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, @@ -125,5 +125,5 @@ def überschusseinkommen_m( # `_m_eg` for the mixed-BG partner's Grundsicherung. return cast_unit( max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg), - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) diff --git "a/src/gettsim/germany/b\303\274rgergeld/einkommen.py" "b/src/gettsim/germany/b\303\274rgergeld/einkommen.py" index 8c269193dd..ba91cea672 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/einkommen.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/einkommen.py" @@ -6,7 +6,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, - Unit, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -15,7 +15,7 @@ from types import ModuleType -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -41,7 +41,7 @@ def anzurechnendes_einkommen_m( ) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -50,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", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -67,7 +67,7 @@ def nettoeinkommen_vor_abzug_freibetrag_m( ) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -91,7 +91,7 @@ def bruttoeinkommen_m( ) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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_verm\303\266gen.py" "b/src/gettsim/germany/b\303\274rgergeld/freibetr\303\244ge_verm\303\266gen.py" index a7113fe596..a346913330 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 Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_BG) +@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], @@ -17,16 +17,16 @@ def vermögensfreibetrag_in_karenzzeit_bg( # Per-person exemptions sum to the BG-level total wealth exemption. return cast_unit( vermögensfreibetrag_je_person_nach_karenzzeit["während_karenzzeit"] - + (cast_unit(familie__anzahl_personen_bg, Unit.DIMENSIONLESS) - 1) + + (cast_unit(familie__anzahl_personen_bg, TTSIMUnit.DIMENSIONLESS) - 1) * vermögensfreibetrag_je_person_nach_karenzzeit["normaler_satz"], - Unit.CURRENCY.PER_BG, + TTSIMUnit.CURRENCY.PER_BG, ) @policy_function( start_date="2023-01-01", leaf_name="vermögensfreibetrag_bg", - unit=Unit.CURRENCY.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg_ab_2023( familie__anzahl_personen_bg: int, diff --git "a/src/gettsim/germany/b\303\274rgergeld/inputs.py" "b/src/gettsim/germany/b\303\274rgergeld/inputs.py" index 951ffe4a1f..a6ddb46496 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/inputs.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/inputs.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import FKType, Unit, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input -@policy_input(start_date="2023-01-01", unit=Unit.DIMENSIONLESS) +@policy_input(start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS) def bezug_im_vorjahr() -> bool: """Person received Bürgergeld in the last 12 months.""" @@ -13,7 +13,7 @@ def bezug_im_vorjahr() -> bool: @policy_input( start_date="2023-01-01", foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, - unit=Unit.DIMENSIONLESS, + 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 f3d3b89a9c..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,7 @@ from gettsim.tt import ( AggType, - Unit, + TTSIMUnit, agg_by_p_id_function, cast_unit, join, @@ -20,7 +20,7 @@ @agg_by_p_id_function( - start_date="2023-01-01", agg_type=AggType.SUM, unit=Unit.CURRENCY.PER_MONTH + start_date="2023-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.CURRENCY.PER_MONTH ) def kindergeldübertrag_m( differenz_kindergeld_kindbedarf_m: float, @@ -33,7 +33,7 @@ def kindergeldübertrag_m( @policy_function( start_date="2023-01-01", leaf_name="kindergeld_pro_kind_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def _mean_kindergeld_per_child_ohne_staffelung_m( kindergeld__anzahl_ansprüche: int, @@ -51,7 +51,7 @@ def _mean_kindergeld_per_child_ohne_staffelung_m( @policy_function( start_date="2023-01-01", vectorization_strategy="not_required", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeld_zur_bedarfsdeckung_m( kindergeld_pro_kind_m: FloatColumn, @@ -78,7 +78,7 @@ def kindergeld_zur_bedarfsdeckung_m( ) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -99,11 +99,8 @@ def differenz_kindergeld_kindbedarf_m( to the parental level. """ fehlbetrag = max( - cast_unit(regelbedarf_m_bg, Unit.CURRENCY.PER_MONTH) - - cast_unit( - wohngeld__anspruchshöhe_m_wthh / wohngeld__anzahl_personen_wthh, - Unit.CURRENCY.PER_MONTH, - ) + 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 - unterhaltsvorschuss__betrag_m, @@ -124,7 +121,7 @@ def differenz_kindergeld_kindbedarf_m( @policy_function( start_date="2023-01-01", vectorization_strategy="not_required", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def in_anderer_bg_als_kindergeldempfänger( p_id: IntColumn, diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index b1bb4e39dc..6d55a0b0bd 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -8,7 +8,7 @@ from gettsim.tt import ( UNSET_UNIT, ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, cast_unit, get_consecutive_int_lookup_table_param_value, param_function, @@ -22,7 +22,7 @@ from gettsim.typing import RawParamValue -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def regelbedarf_m( regelsatz_m: float, kosten_der_unterkunft_m: float, @@ -34,7 +34,7 @@ def regelbedarf_m( return regelsatz_m + kosten_der_unterkunft_m -@policy_function(start_date="2023-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS) def mehrbedarf_alleinerziehend( familie__alleinerziehend: bool, familie__anzahl_kinder_bis_17_fg: int, @@ -52,7 +52,7 @@ def mehrbedarf_alleinerziehend( """ basis_mehrbedarf = parameter_mehrbedarf_alleinerziehend[ "basis_je_kind_bis_17" - ] * cast_unit(familie__anzahl_kinder_bis_17_fg, Unit.DIMENSIONLESS) + ] * cast_unit(familie__anzahl_kinder_bis_17_fg, TTSIMUnit.DIMENSIONLESS) if ( familie__anzahl_kinder_bis_6_fg == 1 @@ -75,7 +75,7 @@ def mehrbedarf_alleinerziehend( @policy_function( start_date="2023-01-01", leaf_name="kindersatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( alter: int, @@ -113,7 +113,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( @policy_function( start_date="2023-01-01", leaf_name="erwachsenensatz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( mehrbedarf_alleinerziehend: float, @@ -134,7 +134,7 @@ def erwachsenensatz_m_ab_2011( return out * (1 + mehrbedarf_alleinerziehend) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def regelsatz_m( erwachsenensatz_m: float, kindersatz_m: float, @@ -146,7 +146,7 @@ def regelsatz_m( @policy_function( start_date="2023-01-01", leaf_name="kosten_der_unterkunft_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kosten_der_unterkunft_m_ab_2023( bruttokaltmiete_m: float, @@ -169,7 +169,9 @@ def kosten_der_unterkunft_m_ab_2023( return out -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_SQUARE_METER.PER_MONTH) +@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, @@ -183,7 +185,7 @@ def anerkannte_warmmiete_je_qm_m( @policy_function( start_date="2023-01-01", - unit=Unit.SQUARE_METER, + unit=TTSIMUnit.SQUARE_METER, # The Eigentum branch looks up a dynamically built table whose axes the dry-run # cannot model; the per-person division is covered by `wohnfläche` above. verify_units=False, @@ -207,7 +209,7 @@ def berechtigte_wohnfläche( return min(wohnfläche, maximum / anzahl_personen_hh) -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttokaltmiete_m( wohnen__bruttokaltmiete_m_hh: float, anzahl_personen_hh: int, @@ -218,13 +220,10 @@ def bruttokaltmiete_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return cast_unit( - wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh, - Unit.CURRENCY.PER_MONTH, - ) + return wohnen__bruttokaltmiete_m_hh / anzahl_personen_hh -@policy_function(start_date="2023-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def heizkosten_m( wohnen__heizkosten_m_hh: float, anzahl_personen_hh: int, @@ -235,22 +234,16 @@ def heizkosten_m( BSG Urteil v. 09.03.2016 - B 14 KG 1/15 R. BSG Urteil vom 15.04.2008 - B 14/7b AS 58/06 R. """ - return cast_unit( - wohnen__heizkosten_m_hh / anzahl_personen_hh, - Unit.CURRENCY.PER_MONTH, - ) + return wohnen__heizkosten_m_hh / anzahl_personen_hh -@policy_function(start_date="2023-01-01", unit=Unit.SQUARE_METER) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.SQUARE_METER) def wohnfläche( wohnen__wohnfläche_hh: float, anzahl_personen_hh: int, ) -> float: """Share of household's dwelling size attributed to a single person.""" - return cast_unit( - wohnen__wohnfläche_hh / anzahl_personen_hh, - Unit.SQUARE_METER, - ) + return wohnen__wohnfläche_hh / anzahl_personen_hh @dataclass(frozen=True) diff --git a/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py b/src/gettsim/germany/einkommensteuer/abgeltungssteuer/abgeltungssteuer.py index b7f29e3700..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 Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(start_date="2009-01-01", unit=Unit.CURRENCY.PER_YEAR.PER_SN) +@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/abz\303\274ge/alleinerziehend.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" index 5e53be7808..c829194e98 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" @@ -2,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function @policy_function( end_date="2014-12-31", leaf_name="alleinerziehend_betrag_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def alleinerziehend_betrag_y_pauschal( familie__alleinerziehend_sn: bool, @@ -21,7 +21,7 @@ def alleinerziehend_betrag_y_pauschal( @policy_function( start_date="2015-01-01", leaf_name="alleinerziehend_betrag_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def alleinerziehend_betrag_y_nach_kinderzahl( familie__alleinerziehend_sn: bool, @@ -33,7 +33,7 @@ def alleinerziehend_betrag_y_nach_kinderzahl( if familie__alleinerziehend_sn: out = ( alleinerziehendenfreibetrag_basis - + (cast_unit(kindergeld__anzahl_ansprüche_sn, Unit.DIMENSIONLESS) - 1) + + (cast_unit(kindergeld__anzahl_ansprüche_sn, TTSIMUnit.DIMENSIONLESS) - 1) * alleinerziehendenfreibetrag_zusatz_pro_kind ) else: diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" index 71f5580dea..1ff1fc45b4 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" @@ -6,7 +6,7 @@ from gettsim.tt import ( UNSET_UNIT, - Unit, + TTSIMUnit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -21,7 +21,7 @@ @policy_function( end_date="2004-12-31", leaf_name="altersfreibetrag_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, # Reads `maximaler_altersentlastungsbetrag` / `altersentlastungsquote`, declared # `type: require_converter` though consumed as scalars, which the dry-run cannot # follow; declared unit and edges stay checked. @@ -59,7 +59,7 @@ def altersfreibetrag_y_bis_2004( @policy_function( start_date="2005-01-01", leaf_name="altersfreibetrag_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, # Reads two geburtsjahr-keyed lookup tables the dry-run cannot evaluate # symbolically; its declared unit and edges stay checked. verify_units=False, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" index d41540db83..19ec9e83ab 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.py" @@ -6,7 +6,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, - Unit, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -15,7 +15,7 @@ from types import ModuleType -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@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/betrag.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/betrag.py" index a7896fc6a5..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 Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_YEAR.PER_SN) +@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(unit=Unit.CURRENCY.PER_YEAR) +@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 ea53bb3d2c..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitrag_private_rentenversicherung_m() -> float: pass -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.DIMENSIONLESS) +@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 72825f7d43..a125894111 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.py" @@ -5,13 +5,13 @@ from gettsim.tt import ( AggType, RoundingSpec, - Unit, + TTSIMUnit, agg_by_p_id_function, policy_function, ) -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -23,7 +23,7 @@ def kinderbetreuungskosten_elternteil_m( @policy_function( end_date="2011-12-31", leaf_name="sonderausgaben_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def sonderausgaben_y_sn_nur_pauschale( familie__anzahl_personen_sn: int, @@ -41,7 +41,7 @@ def sonderausgaben_y_sn_nur_pauschale( @policy_function( start_date="2012-01-01", leaf_name="sonderausgaben_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def sonderausgaben_y_sn_mit_kinderbetreuung( absetzbare_kinderbetreuungskosten_y_sn: float, @@ -60,7 +60,7 @@ def sonderausgaben_y_sn_mit_kinderbetreuung( ) -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def gedeckelte_kinderbetreuungskosten_y( kinderbetreuungskosten_elternteil_y: float, parameter_absetzbare_kinderbetreuungskosten: dict[str, float], @@ -74,8 +74,10 @@ def gedeckelte_kinderbetreuungskosten_y( @policy_function( start_date="2002-01-01", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR.PER_SN, base=1, direction="up"), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + 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, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" index a2252642e0..e3d4a55083 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" @@ -5,7 +5,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, RoundingSpec, - Unit, + TTSIMUnit, param_function, piecewise_polynomial, policy_function, @@ -20,12 +20,12 @@ end_date="2004-12-31", leaf_name="vorsorgeaufwendungen_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="up", reference="§ 10 Abs. 3 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_bis_2004( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -39,12 +39,12 @@ def vorsorgeaufwendungen_y_sn_bis_2004( end_date="2009-12-31", leaf_name="vorsorgeaufwendungen_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="up", reference="§ 10 Abs. 3 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2005_bis_2009( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -66,12 +66,12 @@ def vorsorgeaufwendungen_y_sn_ab_2005_bis_2009( end_date="2019-12-31", leaf_name="vorsorgeaufwendungen_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="up", reference="§ 10 Abs. 3 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2010_bis_2019( vorsorgeaufwendungen_regime_bis_2004_y_sn: float, @@ -92,12 +92,12 @@ def vorsorgeaufwendungen_y_sn_ab_2010_bis_2019( start_date="2020-01-01", leaf_name="vorsorgeaufwendungen_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="up", reference="§ 10 Abs. 3 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_y_sn_ab_2020( vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn: float, @@ -112,7 +112,7 @@ def vorsorgeaufwendungen_y_sn_ab_2020( @policy_function( end_date="2019-12-31", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, # A per-capita Splitting formula (divide then multiply by anzahl_personen_sn) the # level model cannot follow; declared unit and edges stay checked. verify_units=False, @@ -159,7 +159,7 @@ def vorsorgeaufwendungen_regime_bis_2004_y_sn( @policy_function( start_date="2005-01-01", end_date="2009-12-31", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_globale_kappung_y_sn( altersvorsorge_y_sn: float, @@ -189,7 +189,7 @@ def vorsorgeaufwendungen_globale_kappung_y_sn( @policy_function( start_date="2010-01-01", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def vorsorgeaufwendungen_keine_kappung_krankenversicherung_y_sn( altersvorsorge_y_sn: float, @@ -229,7 +229,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", unit=Unit.DIMENSIONLESS) +@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, @@ -256,7 +258,7 @@ def rate_abzugsfähige_altersvorsorgeaufwendungen( start_date="2005-01-01", end_date="2022-12-31", leaf_name="altersvorsorge_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def altersvorsorge_y_sn_phase_in( sozialversicherung__rente__beitrag__betrag_versicherter_y_sn: float, @@ -286,7 +288,7 @@ def altersvorsorge_y_sn_phase_in( @policy_function( start_date="2023-01-01", leaf_name="altersvorsorge_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def altersvorsorge_y_sn_volle_anrechnung( sozialversicherung__rente__beitrag__betrag_versicherter_y_sn: float, @@ -306,7 +308,7 @@ def altersvorsorge_y_sn_volle_anrechnung( @policy_function( end_date="2019-12-31", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, # A per-capita Splitting formula (divide then multiply by anzahl_personen_sn) the # level model cannot follow; declared unit and edges stay checked. verify_units=False, @@ -329,7 +331,7 @@ def vorwegabzug_lohnsteuer_y_sn( return max(out, 0.0) -@param_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@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/einkommen.py b/src/gettsim/germany/einkommensteuer/einkommen.py index fe33cbce84..64b71b2feb 100644 --- a/src/gettsim/germany/einkommensteuer/einkommen.py +++ b/src/gettsim/germany/einkommensteuer/einkommen.py @@ -6,10 +6,10 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_YEAR.PER_SN) +@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, diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuer.py b/src/gettsim/germany/einkommensteuer/einkommensteuer.py index 488924f82d..8db2937aa2 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuer.py +++ b/src/gettsim/germany/einkommensteuer/einkommensteuer.py @@ -12,7 +12,7 @@ ConsecutiveIntLookupTableParamValue, PiecewisePolynomialParamValue, RoundingSpec, - Unit, + TTSIMUnit, agg_by_p_id_function, cast_unit, get_piecewise_parameters, @@ -28,7 +28,7 @@ from gettsim.typing import RawParamValue -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) def anzahl_kindergeld_ansprüche_1( kindergeld__ist_leistungsbegründendes_kind: bool, familie__p_id_elternteil_1: int, @@ -37,7 +37,7 @@ def anzahl_kindergeld_ansprüche_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) def anzahl_kindergeld_ansprüche_2( kindergeld__ist_leistungsbegründendes_kind: bool, familie__p_id_elternteil_2: int, @@ -50,12 +50,12 @@ def anzahl_kindergeld_ansprüche_2( end_date="1996-12-31", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_YEAR.PER_SN, + unit=TTSIMUnit.DM.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S. 6 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( betrag_mit_kinderfreibetrag_y_sn: float, @@ -70,12 +70,12 @@ def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( start_date="2002-01-01", leaf_name="betrag_y_sn", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_kindergeld_oder_kinderfreibetrag( betrag_ohne_kinderfreibetrag_y_sn: float, @@ -92,7 +92,7 @@ def betrag_y_sn_kindergeld_oder_kinderfreibetrag( return out -@policy_function(unit=Unit.DIMENSIONLESS.PER_SN) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS.PER_SN) def kinderfreibetrag_günstiger_sn( betrag_ohne_kinderfreibetrag_y_sn: float, betrag_mit_kinderfreibetrag_y_sn: float, @@ -110,13 +110,13 @@ def kinderfreibetrag_günstiger_sn( end_date="2001-12-31", leaf_name="betrag_mit_kinderfreibetrag_y_sn", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_YEAR.PER_SN, + 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=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_mit_kinderfreibetrag_y_sn_bis_2001() -> float: pass @@ -126,12 +126,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=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_mit_kinderfreibetrag_y_sn_ab_2002( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -158,12 +158,12 @@ def betrag_mit_kinderfreibetrag_y_sn_ab_2002( @policy_function( start_date="2002-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=1, direction="down", reference="§ 32a Abs. 1 S.6 EStG", ), - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_ohne_kinderfreibetrag_y_sn( gesamteinkommen_y_sn: float, @@ -186,7 +186,7 @@ def betrag_ohne_kinderfreibetrag_y_sn( @policy_function( end_date="2022-12-31", leaf_name="relevantes_kindergeld_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def relevantes_kindergeld_mit_staffelung_m( anzahl_kindergeld_ansprüche_1: int, @@ -208,7 +208,7 @@ def relevantes_kindergeld_mit_staffelung_m( return ( cast_unit( kindergeld__satz_nach_anzahl_kinder.look_up(kindergeld_ansprüche), - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) / 2 ) @@ -217,7 +217,7 @@ def relevantes_kindergeld_mit_staffelung_m( @policy_function( start_date="2023-01-01", leaf_name="relevantes_kindergeld_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def relevantes_kindergeld_ohne_staffelung_m( anzahl_kindergeld_ansprüche_1: int, 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 d47827eae4..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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 6fa9120577..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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 8bb4161b27..34f75575fc 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,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="2008-12-31", leaf_name="betrag_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_mit_sparerfreibetrag_und_werbungskostenpauschbetrag( einnahmen__kapitalerträge_y_sn: float, @@ -27,7 +27,7 @@ def betrag_y_sn_mit_sparerfreibetrag_und_werbungskostenpauschbetrag( @policy_function( start_date="2009-01-01", leaf_name="betrag_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_mit_sparerpauschbetrag( einnahmen__kapitalerträge_y_sn: float, 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 4755d7d303..2a0ae03286 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,11 +2,11 @@ from __future__ import annotations -from gettsim.tt import Unit, cast_unit, param_function, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, param_function, policy_function @policy_function( - end_date="1999-03-31", leaf_name="betrag_y", unit=Unit.CURRENCY.PER_YEAR + 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, @@ -16,7 +16,7 @@ def betrag_y_bis_03_1999( @policy_function( - start_date="1999-04-01", leaf_name="betrag_y", unit=Unit.CURRENCY.PER_YEAR + 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, @@ -37,7 +37,7 @@ def betrag_y_ab_04_1999( ) -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def einnahmen_nach_abzug_werbungskosten_y( einnahmen__bruttolohn_y: float, werbungskosten_y: float, @@ -46,7 +46,7 @@ def einnahmen_nach_abzug_werbungskosten_y( return max(einnahmen__bruttolohn_y - werbungskosten_y, 0.0) -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def werbungskosten_y( tatsächliche_werbungskosten_y: float, arbeitnehmerpauschbetrag: float, @@ -69,7 +69,7 @@ def werbungskosten_y( return max(anrechenbare_werbungskosten, arbeitnehmerpauschbetrag) -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def anteil_steuerfälliger_einnahmen( einnahmen__bruttolohn_y: float, steuerbefreite_einnahmen_y: float, @@ -82,7 +82,7 @@ def anteil_steuerfälliger_einnahmen( 0.0, ) / einnahmen__bruttolohn_y, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) else: return 0.0 @@ -91,7 +91,7 @@ def anteil_steuerfälliger_einnahmen( @param_function( end_date="2025-12-31", leaf_name="steuerbefreite_einnahmen_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def steuerbefreite_einnahmen_y_bis_2025() -> float: """Steuerbefreite Einnahmen aus abhängiger Beschäftigung. @@ -105,7 +105,7 @@ def steuerbefreite_einnahmen_y_bis_2025() -> float: @policy_function( start_date="2026-01-01", leaf_name="steuerbefreite_einnahmen_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def steuerbefreite_einnahmen_y_ab_2026( anspruchshöhe_steuerfreibetrag_aktivrente_y: float, @@ -117,7 +117,7 @@ def steuerbefreite_einnahmen_y_ab_2026( return anspruchshöhe_steuerfreibetrag_aktivrente_y -@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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 f7165b11a2..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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_selbstst\303\244ndiger_arbeit/inputs.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/aus_selbstst\303\244ndiger_arbeit/inputs.py" index d5240e3674..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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 3d4c001d7f..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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 e0521d5e76..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,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="2008-12-31", leaf_name="gesamtbetrag_der_einkünfte_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def gesamtbetrag_der_einkünfte_y_mit_kapiteleinkünften( aus_forst_und_landwirtschaft__betrag_y: float, @@ -40,7 +40,7 @@ def gesamtbetrag_der_einkünfte_y_mit_kapiteleinkünften( @policy_function( start_date="2009-01-01", leaf_name="gesamtbetrag_der_einkünfte_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def gesamtbetrag_der_einkünfte_y_ohne_kapitaleinkünfte( aus_forst_und_landwirtschaft__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 033d0250c9..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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 e313a37a01..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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 9179b0bed6..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.YEARS) +@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", unit=Unit.YEARS) +@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", unit=Unit.YEARS) +@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 927fc3bbe2..2d511cf0d7 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,13 +9,13 @@ from gettsim.tt import ConsecutiveIntLookupTableParamValue -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="2004-12-31", leaf_name="steuerpflichtige_einnahmen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def steuerpflichtige_einnahmen_m_nach_ertragsanteil( ertragsanteil_gesetzliche_rente: float, @@ -44,7 +44,7 @@ def steuerpflichtige_einnahmen_m_nach_ertragsanteil( @policy_function( start_date="2005-01-01", leaf_name="steuerpflichtige_einnahmen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def steuerpflichtige_einnahmen_m_nach_besteuerungsanteil( besteuerungsanteil: float, @@ -74,7 +74,7 @@ def steuerpflichtige_einnahmen_m_nach_besteuerungsanteil( ) -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def ertragsanteil_sonstige_private_vorsorge( alter_beginn_leistungsbezug_sonstige_private_vorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -85,7 +85,7 @@ def ertragsanteil_sonstige_private_vorsorge( ) -@policy_function(end_date="2004-12-31", unit=Unit.DIMENSIONLESS) +@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, @@ -98,7 +98,7 @@ def ertragsanteil_berufsständische_altersvorsorge( @policy_function( end_date="2004-12-31", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, # The look-up index is built with raw `xnp.floor(...).astype(int)`, which the # dry-run cannot evaluate symbolically. verify_units=False, @@ -114,7 +114,7 @@ def ertragsanteil_gesetzliche_rente( ) -@policy_function(end_date="2004-12-31", unit=Unit.DIMENSIONLESS) +@policy_function(end_date="2004-12-31", unit=TTSIMUnit.DIMENSIONLESS) def ertragsanteil_betriebliche_altersvorsorge( alter_beginn_leistungsbezug_betriebliche_altersvorsorge: int, parameter_ertragsanteil: ConsecutiveIntLookupTableParamValue, @@ -125,7 +125,7 @@ def ertragsanteil_betriebliche_altersvorsorge( ) -@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) +@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/sonstige.py" "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" index 52492ac098..bb4711977c 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y( rente__steuerpflichtige_einnahmen_y: float, alle_weiteren_y: float, diff --git a/src/gettsim/germany/einkommensteuer/inputs.py b/src/gettsim/germany/einkommensteuer/inputs.py index 10b1dca81e..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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 af1b98df9c..f30dba80f3 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py @@ -4,14 +4,14 @@ from gettsim.tt import ( AggType, - Unit, + TTSIMUnit, agg_by_p_id_function, param_function, policy_function, ) -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR) def kinderfreibetrag_y( anzahl_kinderfreibeträge: int, kinderfreibetrag_pro_kind_y: float, @@ -20,12 +20,12 @@ def kinderfreibetrag_y( return kinderfreibetrag_pro_kind_y * anzahl_kinderfreibeträge -@param_function(unit=Unit.CURRENCY.PER_YEAR) +@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(unit=Unit.PERSON_COUNT) +@policy_function(unit=TTSIMUnit.PERSON_COUNT) def anzahl_kinderfreibeträge( anzahl_kinderfreibeträge_1: int, anzahl_kinderfreibeträge_2: int, @@ -41,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, unit=Unit.PERSON_COUNT) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) def anzahl_kinderfreibeträge_1( kindergeld__ist_leistungsbegründendes_kind: bool, p_id_kinderfreibetragsempfänger_1: int, @@ -50,7 +50,7 @@ def anzahl_kinderfreibeträge_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT) +@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) def anzahl_kinderfreibeträge_2( kindergeld__ist_leistungsbegründendes_kind: bool, p_id_kinderfreibetragsempfänger_2: int, @@ -59,7 +59,7 @@ def anzahl_kinderfreibeträge_2( pass -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def p_id_kinderfreibetragsempfänger_1( familie__p_id_elternteil_1: int, ) -> int: @@ -67,7 +67,7 @@ def p_id_kinderfreibetragsempfänger_1( return familie__p_id_elternteil_1 -@policy_function(unit=Unit.DIMENSIONLESS) +@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/zu_versteuerndes_einkommen.py b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py index a3499417cb..136888a7f0 100644 --- a/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py +++ b/src/gettsim/germany/einkommensteuer/zu_versteuerndes_einkommen.py @@ -2,19 +2,19 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, Unit, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function @policy_function( rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + 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=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn: float, @@ -32,7 +32,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_abrundungsregel( @policy_function( rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_YEAR.PER_SN, + unit=TTSIMUnit.EUR.PER_YEAR.PER_SN, base=36, direction="down", to_add_after_rounding=18, @@ -41,7 +41,7 @@ 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=Unit.CURRENCY.PER_YEAR.PER_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, @@ -59,7 +59,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( @policy_function( rounding_spec=RoundingSpec( - unit=Unit.DM.PER_YEAR.PER_SN, + unit=TTSIMUnit.DM.PER_YEAR.PER_SN, base=54, direction="down", to_add_after_rounding=27, @@ -67,7 +67,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_grober_54er_rundungsregel( ), end_date="2001-12-31", leaf_name="zu_versteuerndes_einkommen_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_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, @@ -83,7 +83,7 @@ def zu_versteuerndes_einkommen_y_sn_mit_dmark_rundungsregel( return out -@policy_function(unit=Unit.CURRENCY.PER_YEAR.PER_SN) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN) def zu_versteuerndes_einkommen_mit_kinderfreibetrag_y_sn( gesamteinkommen_y_sn: float, kinderfreibetrag_y_sn: float, diff --git a/src/gettsim/germany/einnahmen/inputs.py b/src/gettsim/germany/einnahmen/inputs.py index e694b05367..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@policy_input(unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttolohn_m() -> float: """Income (Einnahmen) from non-self-employment.""" -@policy_input(unit=Unit.CURRENCY.PER_YEAR) +@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 bef86938f7..fcd0e621a5 100644 --- a/src/gettsim/germany/einnahmen/renten/betrag_gesamt.py +++ b/src/gettsim/germany/einnahmen/renten/betrag_gesamt.py @@ -1,12 +1,12 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="2004-12-31", leaf_name="betrag_gesamt_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_gesamt_m_ohne_basisrente( gesetzliche_m: float, @@ -28,7 +28,7 @@ def betrag_gesamt_m_ohne_basisrente( @policy_function( start_date="2005-01-01", leaf_name="betrag_gesamt_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_gesamt_m_mit_basisrente( gesetzliche_m: float, diff --git a/src/gettsim/germany/einnahmen/renten/gesetzliche.py b/src/gettsim/germany/einnahmen/renten/gesetzliche.py index 3880d19e76..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 Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@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 409175ba17..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_MONTH) +@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", unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_MONTH) +@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/einkommen.py b/src/gettsim/germany/elterngeld/einkommen.py index 1d2fc93b9f..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, Unit, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function -@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anzurechnendes_nettoeinkommen_m( einnahmen__bruttolohn_m: float, lohnsteuer__betrag_m: float, @@ -21,9 +21,9 @@ def anzurechnendes_nettoeinkommen_m( @policy_function( start_date="2007-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" + unit=TTSIMUnit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def lohnersatzanteil_einkommen_untere_grenze_m( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, @@ -39,9 +39,9 @@ def lohnersatzanteil_einkommen_untere_grenze_m( @policy_function( start_date="2007-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" + unit=TTSIMUnit.EUR.PER_MONTH, base=2, direction="down", reference="§ 2 (2) BEEG" ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def lohnersatzanteil_einkommen_obere_grenze_m( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, @@ -58,7 +58,7 @@ def lohnersatzanteil_einkommen_obere_grenze_m( start_date="2011-01-01", end_date="2024-03-31", leaf_name="einkommen_vorjahr_unter_bezugsgrenze", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def einkommen_vorjahr_unter_bezugsgrenze_mit_unterscheidung_single_paar( familie__alleinerziehend: bool, @@ -89,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def einkommen_vorjahr_unter_bezugsgrenze_ohne_unterscheidung_single_paar( zu_versteuerndes_einkommen_vorjahr_y_sn: float, @@ -104,8 +104,10 @@ def einkommen_vorjahr_unter_bezugsgrenze_ohne_unterscheidung_single_paar( @policy_function( start_date="2012-09-18", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_MONTH, base=0.01, direction="down"), - unit=Unit.CURRENCY.PER_MONTH, + 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 cbe6768928..f6c63bc090 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -5,7 +5,7 @@ from gettsim.tt import ( AggType, RoundingSpec, - Unit, + TTSIMUnit, agg_by_group_function, agg_by_p_id_function, cast_unit, @@ -13,7 +13,7 @@ ) -@policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_leistungsbegründendes_kind( alter_monate: int, max_bezugsmonate: dict[str, int], @@ -39,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, @@ -47,7 +47,7 @@ def leistungsbegründende_kinder_in_fg( pass -@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) +@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, @@ -55,7 +55,7 @@ def anzahl_mehrlinge_jüngstes_kind_fg( pass -@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) +@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 @@ -64,7 +64,7 @@ def anzahl_anträge_fg(claimed: bool, fg_id: int) -> int: leaf_name="bezugsmonate_partner", end_date="2022-12-31", agg_type=AggType.SUM, - unit=Unit.MONTHS, + unit=TTSIMUnit.MONTHS, ) def bezugsmonate_partner_bis_2022( bisherige_bezugsmonate: int, @@ -78,7 +78,7 @@ def bezugsmonate_partner_bis_2022( leaf_name="bezugsmonate_partner", start_date="2023-01-01", agg_type=AggType.SUM, - unit=Unit.MONTHS, + unit=TTSIMUnit.MONTHS, ) def bezugsmonate_partner_ab_2023( bisherige_bezugsmonate: int, @@ -90,8 +90,10 @@ def bezugsmonate_partner_ab_2023( @policy_function( start_date="2011-01-01", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_MONTH, base=0.01, direction="down"), - unit=Unit.CURRENCY.PER_MONTH, + 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, @@ -101,7 +103,7 @@ def betrag_m( return anspruchshöhe_m if grundsätzlich_anspruchsberechtigt else 0.0 -@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -126,15 +128,17 @@ def basisbetrag_m( start_date="2007-01-01", end_date="2010-12-31", leaf_name="betrag_m", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_MONTH, 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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def elterngeld_not_implemented() -> float: pass -@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anspruchshöhe_m( basisbetrag_m: float, geschwisterbonus_m: float, @@ -161,7 +165,7 @@ def anspruchshöhe_m( start_date="2007-01-01", end_date="2010-12-31", leaf_name="grundsätzlich_anspruchsberechtigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_ohne_maximales_vorjahreseinkommen( claimed: bool, @@ -182,7 +186,7 @@ def grundsätzlich_anspruchsberechtigt_ohne_maximales_vorjahreseinkommen( @policy_function( start_date="2011-01-01", leaf_name="grundsätzlich_anspruchsberechtigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_mit_maximales_vorjahreseinkommen( claimed: bool, @@ -205,7 +209,7 @@ def grundsätzlich_anspruchsberechtigt_mit_maximales_vorjahreseinkommen( ) -@policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.DIMENSIONLESS) def bezugsmonate_unter_grenze_fg( bisherige_bezugsmonate_fg: int, bezugsmonate_partner: int, @@ -217,7 +221,7 @@ def bezugsmonate_unter_grenze_fg( parent. """ - bisherige_monate = cast_unit(bisherige_bezugsmonate_fg, Unit.MONTHS) + bisherige_monate = cast_unit(bisherige_bezugsmonate_fg, TTSIMUnit.MONTHS) grenze_mit_partnermonaten = ( max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] ) @@ -226,14 +230,17 @@ def bezugsmonate_unter_grenze_fg( or bezugsmonate_partner >= max_bezugsmonate["partnermonate"] ): out = bisherige_monate < grenze_mit_partnermonaten - elif cast_unit(anzahl_anträge_fg, Unit.DIMENSIONLESS) > 1: - out = bisherige_monate + cast_unit(1, Unit.MONTHS) < grenze_mit_partnermonaten + elif cast_unit(anzahl_anträge_fg, TTSIMUnit.DIMENSIONLESS) > 1: + out = ( + bisherige_monate + cast_unit(1, TTSIMUnit.MONTHS) + < grenze_mit_partnermonaten + ) else: out = bisherige_monate < max_bezugsmonate["basismonate"] return out -@policy_function(start_date="2011-01-01", unit=Unit.DIMENSIONLESS) +@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_m: float, @@ -285,7 +292,7 @@ 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", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def anrechenbarer_betrag_m( betrag_m: float, anzahl_mehrlinge_fg: int, @@ -304,12 +311,15 @@ def anrechenbarer_betrag_m( """ return max( betrag_m - - ((1 + cast_unit(anzahl_mehrlinge_fg, Unit.DIMENSIONLESS)) * mindestbetrag), + - ( + (1 + cast_unit(anzahl_mehrlinge_fg, TTSIMUnit.DIMENSIONLESS)) + * mindestbetrag + ), 0, ) -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def jüngstes_kind_oder_mehrling( alter_monate: int, familie__alter_monate_jüngstes_mitglied_fg: int, @@ -325,7 +335,7 @@ def jüngstes_kind_oder_mehrling( return ( ( alter_monate - - cast_unit(familie__alter_monate_jüngstes_mitglied_fg, Unit.MONTHS) + - cast_unit(familie__alter_monate_jüngstes_mitglied_fg, TTSIMUnit.MONTHS) ) - < cast_unit(0.1, Unit.MONTHS) + < cast_unit(0.1, TTSIMUnit.MONTHS) ) and ist_leistungsbegründendes_kind diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index ef0a3528d6..643b525ba3 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def geschwisterbonus_m( basisbetrag_m: float, geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg: bool, @@ -26,13 +26,16 @@ def geschwisterbonus_m( return out -@policy_function(start_date="2007-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def mehrlingsbonus_m(anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind: float) -> float: """Elterngeld bonus for multiples.""" - return cast_unit(anzahl_mehrlinge_fg, Unit.DIMENSIONLESS) * mehrlingsbonus_pro_kind + return ( + cast_unit(anzahl_mehrlinge_fg, TTSIMUnit.DIMENSIONLESS) + * mehrlingsbonus_pro_kind + ) -@policy_function(start_date="2007-01-01", unit=Unit.DIMENSIONLESS) +@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, @@ -40,21 +43,21 @@ def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( ) -> bool: """Siblings that give rise to Elterngeld siblings bonus.""" geschwister_unter_3 = ( - cast_unit(familie__anzahl_kinder_bis_2_fg, Unit.PERSON_COUNT) + cast_unit(familie__anzahl_kinder_bis_2_fg, TTSIMUnit.PERSON_COUNT) >= geschwisterbonus_altersgrenzen[3] ) geschwister_unter_6 = ( - cast_unit(familie__anzahl_kinder_bis_5_fg, Unit.PERSON_COUNT) + cast_unit(familie__anzahl_kinder_bis_5_fg, TTSIMUnit.PERSON_COUNT) >= geschwisterbonus_altersgrenzen[6] ) return geschwister_unter_3 or geschwister_unter_6 -@policy_function(start_date="2007-01-01", unit=Unit.PERSON_COUNT.PER_FG) +@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: """Number of multiples of the youngest child.""" - out = cast_unit(anzahl_mehrlinge_jüngstes_kind_fg, Unit.DIMENSIONLESS) - 1 - return cast_unit(max(out, 0), Unit.PERSON_COUNT.PER_FG) + out = cast_unit(anzahl_mehrlinge_jüngstes_kind_fg, TTSIMUnit.DIMENSIONLESS) - 1 + return cast_unit(max(out, 0), TTSIMUnit.PERSON_COUNT.PER_FG) diff --git a/src/gettsim/germany/elterngeld/inputs.py b/src/gettsim/germany/elterngeld/inputs.py index d21bef15dc..dd1c07d4cd 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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def bisherige_bezugsmonate() -> int: """Number of months the individual received Elterngeld for the current youngest child.""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def claimed() -> bool: """Individual claims Elterngeld.""" -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_YEAR) +@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) 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/erziehungsgeld.py b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py index 8417249fab..0bb86fb3ee 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -9,7 +9,7 @@ UNSET_UNIT, AggType, RoundingSpec, - Unit, + TTSIMUnit, agg_by_group_function, agg_by_p_id_function, cast_unit, @@ -47,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, @@ -56,7 +58,7 @@ def leistungsbegründende_kinder_fg( @agg_by_p_id_function( - end_date="2008-12-31", agg_type=AggType.SUM, unit=Unit.CURRENCY.PER_MONTH + end_date="2008-12-31", agg_type=AggType.SUM, unit=TTSIMUnit.CURRENCY.PER_MONTH ) def anspruchshöhe_m( anspruchshöhe_kind_m: float, @@ -67,7 +69,7 @@ def anspruchshöhe_m( @policy_function( - start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def betrag_m( anspruchshöhe_m: float, @@ -84,10 +86,12 @@ def betrag_m( start_date="2002-01-01", end_date="2003-12-31", leaf_name="anspruchshöhe_kind_m", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_MONTH, 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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anspruchshöhe_kind_ohne_budgetsatz_m() -> float: pass @@ -97,8 +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(unit=Unit.EUR.PER_MONTH, base=0.01, direction="nearest"), - unit=Unit.CURRENCY.PER_MONTH, + 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, @@ -115,7 +121,7 @@ def anspruchshöhe_kind_mit_budgetsatz_m( if ist_leistungsbegründendes_kind: return max( basisbetrag_m - - cast_unit(abzug_durch_einkommen_m_fg, Unit.CURRENCY.PER_MONTH), + - cast_unit(abzug_durch_einkommen_m_fg, TTSIMUnit.CURRENCY.PER_MONTH), 0.0, ) else: @@ -123,7 +129,7 @@ def anspruchshöhe_kind_mit_budgetsatz_m( @policy_function( - start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_MONTH + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def basisbetrag_m( budgetsatz: bool, @@ -150,7 +156,7 @@ def basisbetrag_m( @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=Unit.CURRENCY.PER_MONTH.PER_FG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_FG, ) def abzug_durch_einkommen_m_fg( anzurechnendes_einkommen_m_fg: float, @@ -177,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def _leistungsbegründendes_kind_vor_abschaffung( p_id_empfänger: int, @@ -203,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def _leistungsbegründendes_kind_nach_abschaffung( p_id_empfänger: int, @@ -240,7 +246,7 @@ def _leistungsbegründendes_kind_nach_abschaffung( @policy_function( - start_date="2004-01-01", end_date="2008-12-31", unit=Unit.DIMENSIONLESS + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.DIMENSIONLESS ) def grundsätzlich_anspruchsberechtigt( arbeitsstunden_w: float, @@ -259,7 +265,7 @@ def grundsätzlich_anspruchsberechtigt( @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=Unit.CURRENCY.PER_YEAR.PER_FG, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) def anzurechnendes_einkommen_y_fg( bruttolohn_vorjahr_nach_abzug_werbungskosten_y_fg: float, @@ -286,7 +292,7 @@ def anzurechnendes_einkommen_y_fg( @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=Unit.CURRENCY.PER_YEAR.PER_FG, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) def einkommensgrenze_y_fg( einkommensgrenze_ohne_geschwisterbonus_y: float, @@ -301,16 +307,16 @@ def einkommensgrenze_y_fg( if ist_leistungsbegründendes_kind: return cast_unit( einkommensgrenze_ohne_geschwisterbonus_y - + (cast_unit(familie__anzahl_kinder_fg, Unit.DIMENSIONLESS) - 1) + + (cast_unit(familie__anzahl_kinder_fg, TTSIMUnit.DIMENSIONLESS) - 1) * aufschlag_einkommen, - Unit.CURRENCY.PER_YEAR.PER_FG, + TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) else: return 0.0 @policy_function( - start_date="2004-01-01", end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR + start_date="2004-01-01", end_date="2008-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR ) def einkommensgrenze_ohne_geschwisterbonus_y( alter_monate: int, @@ -336,7 +342,7 @@ def einkommensgrenze_ohne_geschwisterbonus_y( @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, # Plucks thresholds off dict-typed dataclass fields, which the dry-run cannot # follow through the subscript. verify_units=False, @@ -363,7 +369,7 @@ def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, # Plucks thresholds off dict-typed dataclass fields, which the dry-run cannot # follow through the subscript. verify_units=False, diff --git a/src/gettsim/germany/erziehungsgeld/inputs.py b/src/gettsim/germany/erziehungsgeld/inputs.py index 103b9c5c75..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, Unit, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input -@policy_input(end_date="2008-12-31", unit=Unit.CURRENCY.PER_YEAR) +@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,7 +16,7 @@ def bruttolohn_vorjahr_nach_abzug_werbungskosten_y() -> float: """ -@policy_input(end_date="2008-12-31", unit=Unit.DIMENSIONLESS) +@policy_input(end_date="2008-12-31", unit=TTSIMUnit.DIMENSIONLESS) def budgetsatz() -> bool: """Applied for "Budgetsatz" of parental leave benefit.""" @@ -24,7 +24,7 @@ def budgetsatz() -> bool: @policy_input( end_date="2008-12-31", foreign_key_type=FKType.MUST_NOT_POINT_TO_SELF, - unit=Unit.DIMENSIONLESS, + 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 b291b4e9ed..f541ba5630 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -10,7 +10,7 @@ from gettsim.tt import ( AggType, - Unit, + TTSIMUnit, agg_by_group_function, cast_unit, join, @@ -23,7 +23,7 @@ from gettsim.typing import BoolColumn, IntColumn -@policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) +@policy_function(vectorization_strategy="not_required", unit=TTSIMUnit.DIMENSIONLESS) def ist_kind_in_familiengemeinschaft( p_id_elternteil_1: IntColumn, p_id_elternteil_2: IntColumn, @@ -54,58 +54,58 @@ def ist_kind_in_familiengemeinschaft( @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG + 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(unit=Unit.DIMENSIONLESS) +@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 ( - cast_unit(alter, Unit.DIMENSIONLESS) <= 2 + cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 2 ) -@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) +@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(unit=Unit.DIMENSIONLESS) +@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 ( - cast_unit(alter, Unit.DIMENSIONLESS) <= 5 + cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 5 ) -@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) +@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(unit=Unit.DIMENSIONLESS) +@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 ( - cast_unit(alter, Unit.DIMENSIONLESS) <= 6 + cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 6 ) @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG + 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 @@ -113,18 +113,18 @@ def anzahl_kinder_bis_6_fg( pass -@policy_function(unit=Unit.DIMENSIONLESS) +@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 ( - cast_unit(alter, Unit.DIMENSIONLESS) <= 15 + cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 15 ) @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG + 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 @@ -132,18 +132,18 @@ def anzahl_kinder_bis_15_fg( pass -@policy_function(unit=Unit.DIMENSIONLESS) +@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 ( - cast_unit(alter, Unit.DIMENSIONLESS) <= 17 + cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 17 ) @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG + 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 @@ -151,14 +151,14 @@ def anzahl_kinder_bis_17_fg( pass -@agg_by_group_function(agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_FG) +@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, unit=Unit.MONTHS.PER_FG) +@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 @@ -166,7 +166,7 @@ def alter_monate_jüngstes_mitglied_fg(alter_monate: int, fg_id: int) -> int: @policy_function( start_date="2005-01-01", vectorization_strategy="not_required", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def ist_kind_in_bedarfsgemeinschaft( p_id_elternteil_1: IntColumn, @@ -195,7 +195,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", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_erwachsener_in_bedarfsgemeinschaft( ist_kind_in_bedarfsgemeinschaft: bool, ) -> bool: @@ -203,13 +203,15 @@ 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, unit=Unit.PERSON_COUNT.PER_BG + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_BG ) def anzahl_erwachsene_bg( ist_erwachsener_in_bedarfsgemeinschaft: bool, @@ -219,24 +221,24 @@ def anzahl_erwachsene_bg( @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_BG + 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", unit=Unit.DIMENSIONLESS) +@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 ( - cast_unit(alter, Unit.DIMENSIONLESS) <= 17 + cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 17 ) @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_BG + 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 @@ -244,29 +246,31 @@ def anzahl_kinder_bis_17_bg( 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", unit=Unit.DIMENSIONLESS) +@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, ) -> bool: """Has a child in the same Bedarfsgemeinschaft.""" return ( - cast_unit(anzahl_kinder_bg, Unit.DIMENSIONLESS) >= 1 + cast_unit(anzahl_kinder_bg, TTSIMUnit.DIMENSIONLESS) >= 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 @@ -274,7 +278,7 @@ def alleinerziehend_sn(familie__alleinerziehend: bool, sn_id: int) -> bool: @policy_function( start_date="2005-01-01", vectorization_strategy="not_required", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def ist_kind_in_einsatzgemeinschaft( p_id_elternteil_1: IntColumn, @@ -303,7 +307,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", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def ist_erwachsener_in_einsatzgemeinschaft( ist_kind_in_einsatzgemeinschaft: bool, ) -> bool: @@ -312,14 +316,14 @@ def ist_erwachsener_in_einsatzgemeinschaft( @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.PERSON_COUNT.PER_EG + 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, unit=Unit.PERSON_COUNT.PER_EG + 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 @@ -327,23 +331,25 @@ def anzahl_erwachsene_eg( 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(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def volljährig(alter: int) -> bool: """Person over the age of 18.""" - return cast_unit(alter, Unit.DIMENSIONLESS) >= 18 + return cast_unit(alter, TTSIMUnit.DIMENSIONLESS) >= 18 -@policy_function(unit=Unit.DIMENSIONLESS) +@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 8775a741f9..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, Unit, agg_by_group_function, policy_input +from gettsim.tt import AggType, FKType, TTSIMUnit, agg_by_group_function, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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, unit=Unit.DIMENSIONLESS) +@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, unit=Unit.DIMENSIONLESS) +@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, unit=Unit.DIMENSIONLESS) +@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 caf5c83d60..6ef410bd19 100644 --- a/src/gettsim/germany/grundsicherung/bedarfe.py +++ b/src/gettsim/germany/grundsicherung/bedarfe.py @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Annotated from gettsim.germany.param_types import Altersgrenzen, SatzMitAltersgrenzen -from gettsim.tt import UNSET_UNIT, Unit, param_function +from gettsim.tt import UNSET_UNIT, TTSIMUnit, param_function if TYPE_CHECKING: from gettsim.typing import RawParamValue @@ -12,9 +12,9 @@ @dataclass(frozen=True) class Regelbedarfsstufen: - rbs_1: Annotated[float, Unit.CURRENCY.PER_MONTH] - rbs_2: Annotated[float, Unit.CURRENCY.PER_MONTH] - rbs_3: Annotated[float, Unit.CURRENCY.PER_MONTH] + 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 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 b1a476881c..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,12 +1,12 @@ """Hilfe zum Lebensunterhalt (SGB XII Kap. 3).""" -from gettsim.tt import Unit, 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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m() -> float: """Hilfe zum Lebensunterhalt per person (§27 ff. SGB XII). @@ -21,7 +21,7 @@ def betrag_m() -> float: return 0.0 # pragma: no cover -@param_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_EG) +@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 25b21a4ff6..71fbd38f42 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/einkommen.py +++ b/src/gettsim/germany/grundsicherung/im_alter/einkommen.py @@ -8,7 +8,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, - Unit, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -22,7 +22,7 @@ @policy_function( end_date="2006-12-31", leaf_name="einkommen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_m_bis_2006( erwerbseinkommen_m: float, @@ -76,7 +76,7 @@ def einkommen_m_bis_2006( start_date="2007-01-01", end_date="2017-12-31", leaf_name="einkommen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_m_ab_2007_bis_2017( erwerbseinkommen_m: float, @@ -128,7 +128,7 @@ def einkommen_m_ab_2007_bis_2017( @policy_function( - start_date="2018-01-01", leaf_name="einkommen_m", unit=Unit.CURRENCY.PER_MONTH + start_date="2018-01-01", leaf_name="einkommen_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def einkommen_m_ab_2018( erwerbseinkommen_m: float, @@ -173,7 +173,7 @@ def einkommen_m_ab_2018( return max(out, 0.0) -@policy_function(start_date="2011-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -200,7 +200,7 @@ def erwerbseinkommen_m( @policy_function( end_date="2015-12-31", leaf_name="kapitaleinkommen_brutto_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kapitaleinkommen_brutto_m_ohne_freibetrag( einnahmen__kapitalerträge_m: float, @@ -212,7 +212,7 @@ def kapitaleinkommen_brutto_m_ohne_freibetrag( @policy_function( start_date="2016-01-01", leaf_name="kapitaleinkommen_brutto_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kapitaleinkommen_brutto_m_mit_freibetrag( einnahmen__kapitalerträge_y: float, @@ -227,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", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -273,7 +273,7 @@ def einkommen_aus_zusätzlicher_altersvorsorge_m( @policy_function( end_date="2020-12-31", leaf_name="gesetzliche_rente_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def gesetzliche_rente_m_bis_2020( einnahmen__renten__gesetzliche_m: float, @@ -285,7 +285,7 @@ def gesetzliche_rente_m_bis_2020( @policy_function( start_date="2021-01-01", leaf_name="gesetzliche_rente_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def gesetzliche_rente_m_ab_2021( einnahmen__renten__gesetzliche_m: float, diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index 6441829517..4984629aba 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -17,14 +17,20 @@ RegelsatzAnteilsbasiert, ) -from gettsim.tt import AggType, Unit, agg_by_p_id_function, cast_unit, policy_function +from gettsim.tt import ( + AggType, + TTSIMUnit, + agg_by_p_id_function, + cast_unit, + policy_function, +) @policy_function( start_date="2005-01-01", end_date="2019-12-31", leaf_name="betrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_mit_kindeseinkommensgrenze( anspruchshöhe_m: float, @@ -48,7 +54,7 @@ def betrag_m_mit_kindeseinkommensgrenze( @policy_function( - start_date="2020-01-01", leaf_name="betrag_m", unit=Unit.CURRENCY.PER_MONTH + start_date="2020-01-01", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def betrag_m_ohne_kindeseinkommensgrenze( anspruchshöhe_m: float, @@ -84,7 +90,9 @@ def betrag_m_ohne_kindeseinkommensgrenze( @policy_function( - end_date="2022-12-31", leaf_name="anspruchshöhe_m", unit=Unit.CURRENCY.PER_MONTH + 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, @@ -121,12 +129,14 @@ def anspruchshöhe_m_bis_2022( return cast_unit( (individueller_restbedarf_m / individueller_restbedarf_m_eg) * anspruch_m_eg, - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) @policy_function( - start_date="2023-01-01", leaf_name="anspruchshöhe_m", unit=Unit.CURRENCY.PER_MONTH + 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, @@ -163,11 +173,11 @@ def anspruchshöhe_m_ab_2023( return cast_unit( (individueller_restbedarf_m / individueller_restbedarf_m_eg) * anspruch_m_eg, - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def individueller_restbedarf_m( bedarf_m: float, einkommen_zur_verteilung_m: float, @@ -181,7 +191,7 @@ def individueller_restbedarf_m( @policy_function( - end_date="2022-12-31", leaf_name="bedarf_m", unit=Unit.CURRENCY.PER_MONTH + end_date="2022-12-31", leaf_name="bedarf_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def bedarf_m_bis_2022( arbeitslosengeld_2__regelbedarf_m: float, @@ -202,7 +212,7 @@ def bedarf_m_bis_2022( @policy_function( - start_date="2023-01-01", leaf_name="bedarf_m", unit=Unit.CURRENCY.PER_MONTH + start_date="2023-01-01", leaf_name="bedarf_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def bedarf_m_ab_2023( bürgergeld__regelbedarf_m: float, @@ -222,7 +232,7 @@ def bedarf_m_ab_2023( return bürgergeld__regelbedarf_m + mehrbedarf_schwerbehinderung_g_m -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -237,7 +247,7 @@ def einkommen_zur_verteilung_m( return einkommen_m -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_EG) +@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, @@ -255,7 +265,7 @@ def überschusseinkommen_m_eg( @policy_function( end_date="2010-12-31", leaf_name="mehrbedarf_schwerbehinderung_g_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def mehrbedarf_schwerbehinderung_g_m_vor_2011( schwerbehindert_grad_g: bool, @@ -270,7 +280,7 @@ def mehrbedarf_schwerbehinderung_g_m_vor_2011( * mehrbedarf_bei_schwerbehinderungsgrad_g ) elif (schwerbehindert_grad_g) and ( - cast_unit(familie__anzahl_erwachsene_eg, Unit.DIMENSIONLESS) > 1 + cast_unit(familie__anzahl_erwachsene_eg, TTSIMUnit.DIMENSIONLESS) > 1 ): out = ( arbeitslosengeld_2__regelsatz_anteilsbasiert.basissatz @@ -286,7 +296,7 @@ def mehrbedarf_schwerbehinderung_g_m_vor_2011( @policy_function( start_date="2011-01-01", leaf_name="mehrbedarf_schwerbehinderung_g_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def mehrbedarf_schwerbehinderung_g_m_ab_2011( schwerbehindert_grad_g: bool, @@ -309,7 +319,7 @@ def mehrbedarf_schwerbehinderung_g_m_ab_2011( if (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg == 1): out = mehrbedarf_single elif (schwerbehindert_grad_g) and ( - cast_unit(familie__anzahl_erwachsene_eg, Unit.DIMENSIONLESS) > 1 + cast_unit(familie__anzahl_erwachsene_eg, TTSIMUnit.DIMENSIONLESS) > 1 ): out = mehrbedarf_in_couple else: @@ -318,7 +328,7 @@ def mehrbedarf_schwerbehinderung_g_m_ab_2011( return out -@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS.PER_EG) +@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, @@ -327,7 +337,7 @@ def vermögensgrenze_unterschritten_eg( return vermögen_eg < vermögensfreibetrag_eg -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_EG) +@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, @@ -340,7 +350,7 @@ def vermögensfreibetrag_eg( ) -@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def hat_gesamteinkommen_über_kindeseinkommensgrenze( einkommensteuer__gesamteinkommen_y_sn: float, einkommensgrenze_kinder: float, @@ -351,12 +361,12 @@ def hat_gesamteinkommen_über_kindeseinkommensgrenze( """ # The child's Steuernummer-level Gesamteinkommen is read as their individual income. return ( - cast_unit(einkommensteuer__gesamteinkommen_y_sn, Unit.CURRENCY.PER_YEAR) + cast_unit(einkommensteuer__gesamteinkommen_y_sn, TTSIMUnit.CURRENCY.PER_YEAR) >= einkommensgrenze_kinder ) -@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, @@ -365,7 +375,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, @@ -374,7 +384,7 @@ def hat_kind_mit_einkommen_über_einkommensgrenze_als_elternteil_2( pass -@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) +@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 d3c27f33c7..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 Unit, 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(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def p_id() -> int: """Unique identifier for each person. Always required, must be unique.""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def hh_id() -> int: """Individuals living together in a household in the Wohngeld sense (§5 WoGG).""" -@group_creation_function(unit=Unit.DIMENSIONLESS) +@group_creation_function(unit=TTSIMUnit.DIMENSIONLESS) def ehe_id( p_id: IntColumn, familie__p_id_ehepartner: IntColumn, @@ -44,7 +44,7 @@ def ehe_id( @group_creation_function( - leaf_name="fg_id", end_date="2022-12-31", unit=Unit.DIMENSIONLESS + leaf_name="fg_id", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS ) def fg_id_arbeitslosengeld_2( arbeitslosengeld_2__p_id_einstandspartner: IntColumn, @@ -74,7 +74,7 @@ def fg_id_arbeitslosengeld_2( @group_creation_function( - leaf_name="fg_id", start_date="2023-01-01", unit=Unit.DIMENSIONLESS + leaf_name="fg_id", start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS ) def fg_id_bürgergeld( bürgergeld__p_id_einstandspartner: IntColumn, @@ -184,7 +184,7 @@ def _assign_parents_fg_id( @group_creation_function( warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC, - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def bg_id( fg_id: IntColumn, @@ -209,7 +209,7 @@ def bg_id( @group_creation_function( - leaf_name="eg_id", end_date="2022-12-31", unit=Unit.DIMENSIONLESS + leaf_name="eg_id", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS ) def eg_id_arbeitslosengeld_2( arbeitslosengeld_2__p_id_einstandspartner: IntColumn, @@ -239,7 +239,7 @@ def eg_id_arbeitslosengeld_2( @group_creation_function( - leaf_name="eg_id", start_date="2023-01-01", unit=Unit.DIMENSIONLESS + leaf_name="eg_id", start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS ) def eg_id_bürgergeld( bürgergeld__p_id_einstandspartner: IntColumn, @@ -345,7 +345,7 @@ def _assign_parents_eg_id( @group_creation_function( warn_msg_if_included=WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC, - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def wthh_id( fg_id: IntColumn, @@ -369,7 +369,7 @@ def wthh_id( return fg_id -@group_creation_function(unit=Unit.DIMENSIONLESS) +@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 721b25e062..f4cbc7c6f2 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 Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(unit=Unit.DIMENSIONLESS) +@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 cast_unit(alter, Unit.DIMENSIONLESS) <= 24 # noqa: PLR2004 + return cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 24 # noqa: PLR2004 diff --git a/src/gettsim/germany/inputs.py b/src/gettsim/germany/inputs.py index 3ea9dc0115..8faaf185b0 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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.YEARS) +@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(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def alter_monate() -> int: """Age in months.""" -@policy_input(unit=Unit.HOURS.PER_WEEK) +@policy_input(unit=TTSIMUnit.HOURS.PER_WEEK) def arbeitsstunden_w() -> float: """Working hours.""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def behinderungsgrad() -> int: pass -@policy_input(unit=Unit.CALENDAR_YEAR) +@policy_input(unit=TTSIMUnit.CALENDAR_YEAR) def geburtsjahr() -> int: """Birth year.""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def geburtsmonat() -> int: """Month of birth (within year).""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def geburtstag() -> int: """Day of birth (within month).""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def schwerbehindert_grad_g() -> bool: pass -@policy_input(unit=Unit.CURRENCY) +@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", unit=Unit.DIMENSIONLESS) +@policy_input(end_date="2017-12-31", unit=TTSIMUnit.DIMENSIONLESS) def weiblich() -> bool: """Female.""" -@policy_input(end_date="2024-12-31", unit=Unit.DIMENSIONLESS) +@policy_input(end_date="2024-12-31", unit=TTSIMUnit.DIMENSIONLESS) 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 1078d2c206..9aca5d745e 100644 --- a/src/gettsim/germany/kinderbonus/kinderbonus.py +++ b/src/gettsim/germany/kinderbonus/kinderbonus.py @@ -2,11 +2,11 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( - start_date="2020-01-01", end_date="2021-12-31", unit=Unit.CURRENCY.PER_YEAR + start_date="2020-01-01", end_date="2021-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR ) def betrag_y(kindergeld__betrag_y: float, satz: float) -> float: """Calculate Kinderbonus for an individual child. diff --git a/src/gettsim/germany/kindergeld/inputs.py b/src/gettsim/germany/kindergeld/inputs.py index 88f0a37b20..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, Unit, policy_input +from gettsim.tt import FKType, TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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, unit=Unit.DIMENSIONLESS) +@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 3525410f5c..ce32e2b9b0 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -8,7 +8,7 @@ UNSET_UNIT, AggType, ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, agg_by_p_id_function, cast_unit, get_consecutive_int_lookup_table_param_value, @@ -23,7 +23,7 @@ from gettsim.typing import BoolColumn, IntColumn -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.DIMENSIONLESS) +@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, @@ -33,7 +33,7 @@ def anzahl_ansprüche( @policy_function( - start_date="2023-01-01", leaf_name="betrag_m", unit=Unit.CURRENCY.PER_MONTH + start_date="2023-01-01", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def betrag_ohne_staffelung_m( anzahl_ansprüche: int, @@ -49,7 +49,7 @@ def betrag_ohne_staffelung_m( @policy_function( - end_date="2022-12-31", leaf_name="betrag_m", unit=Unit.CURRENCY.PER_MONTH + end_date="2022-12-31", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def betrag_gestaffelt_m( anzahl_ansprüche: int, @@ -62,7 +62,7 @@ def betrag_gestaffelt_m( """ return cast_unit( - satz_nach_anzahl_kinder.look_up(anzahl_ansprüche), Unit.CURRENCY.PER_MONTH + satz_nach_anzahl_kinder.look_up(anzahl_ansprüche), TTSIMUnit.CURRENCY.PER_MONTH ) @@ -70,7 +70,7 @@ def betrag_gestaffelt_m( end_date="1995-12-31", leaf_name="ist_leistungsbegründendes_kind", fail_msg_if_included="Kindergeld eligibility is not implemented prior to 1996.", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_lohn_bis_1995() -> bool: pass @@ -80,7 +80,7 @@ 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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_lohn( alter: int, @@ -106,7 +106,7 @@ def leistungsbegründendes_kind_nach_lohn( @policy_function( start_date="2012-01-01", leaf_name="ist_leistungsbegründendes_kind", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def leistungsbegründendes_kind_nach_stunden( alter: int, @@ -128,16 +128,16 @@ def leistungsbegründendes_kind_nach_stunden( ) -@policy_function(end_date="2015-12-31", unit=Unit.DIMENSIONLESS) +@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 <= cast_unit(10, Unit.YEARS)) + return ist_leistungsbegründendes_kind and (alter <= cast_unit(10, TTSIMUnit.YEARS)) -@policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) +@policy_function(vectorization_strategy="not_required", unit=TTSIMUnit.DIMENSIONLESS) def gleiche_fg_wie_empfänger( p_id: IntColumn, p_id_empfänger: IntColumn, diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index 124b5dc334..fec65fcea8 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -14,7 +14,7 @@ UNSET_UNIT, AggType, RoundingSpec, - Unit, + TTSIMUnit, agg_by_group_function, cast_unit, param_function, @@ -26,7 +26,7 @@ @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=Unit.DIMENSIONLESS.PER_BG + start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS.PER_BG ) def anzahl_kinder_bg(kindergeld__anzahl_ansprüche: int, bg_id: int) -> int: pass @@ -36,7 +36,7 @@ def anzahl_kinder_bg(kindergeld__anzahl_ansprüche: int, bg_id: int) -> int: leaf_name="bruttoeinkommen_eltern_m", start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttoeinkommen_eltern_m_bis_2022( arbeitslosengeld_2__bruttoeinkommen_m: float, @@ -60,7 +60,7 @@ def bruttoeinkommen_eltern_m_bis_2022( @policy_function( leaf_name="bruttoeinkommen_eltern_m", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttoeinkommen_eltern_m_ab_2023( bürgergeld__bruttoeinkommen_m: float, @@ -86,9 +86,12 @@ def bruttoeinkommen_eltern_m_ab_2023( start_date="2005-01-01", end_date="2019-06-30", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, base=10, direction="down", reference="§ 6a Abs. 4 BKGG" + unit=TTSIMUnit.EUR.PER_MONTH, + base=10, + direction="down", + reference="§ 6a Abs. 4 BKGG", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_grober_rundung( arbeitslosengeld_2__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -111,9 +114,12 @@ def nettoeinkommen_eltern_m_mit_grober_rundung( start_date="2019-07-01", end_date="2022-12-31", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, base=1, direction="down", reference="§ 11 Abs. 2 BKGG" + unit=TTSIMUnit.EUR.PER_MONTH, + base=1, + direction="down", + reference="§ 11 Abs. 2 BKGG", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_genauer_rundung_bis_2022( arbeitslosengeld_2__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -135,9 +141,12 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_bis_2022( leaf_name="nettoeinkommen_eltern_m", start_date="2023-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, base=1, direction="down", reference="§ 11 Abs. 2 BKGG" + unit=TTSIMUnit.EUR.PER_MONTH, + base=1, + direction="down", + reference="§ 11 Abs. 2 BKGG", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( bürgergeld__nettoeinkommen_nach_abzug_freibetrag_m: float, @@ -158,7 +167,7 @@ def nettoeinkommen_eltern_m_mit_genauer_rundung_ab_2023( @policy_function( start_date="2005-01-01", end_date="2019-06-30", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def maximales_nettoeinkommen_m_bg( erwachsenenbedarf_m_bg: float, @@ -173,11 +182,11 @@ def maximales_nettoeinkommen_m_bg( """ # Per-child Satz times the number of children is the BG-level child total. return erwachsenenbedarf_m_bg + cast_unit( - satz_m * anzahl_kinder_bg, Unit.CURRENCY.PER_MONTH.PER_BG + satz_m * anzahl_kinder_bg, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG ) -@policy_function(start_date="2008-10-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) +@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, @@ -196,10 +205,10 @@ def mindestbruttoeinkommen_m_bg( out = mindesteinkommen["paar"] # The statutory thresholds apply to the Bedarfsgemeinschaft as a whole. - return cast_unit(out, Unit.CURRENCY.PER_MONTH.PER_BG) + return cast_unit(out, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) +@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, @@ -220,7 +229,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=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def kosten_der_unterkunft_m_bg_bis_2022( wohnbedarf_anteil_eltern_bg: float, @@ -241,7 +250,7 @@ def kosten_der_unterkunft_m_bg_bis_2022( @policy_function( leaf_name="kosten_der_unterkunft_m_bg", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def kosten_der_unterkunft_m_bg_ab_2023( wohnbedarf_anteil_eltern_bg: float, @@ -319,7 +328,7 @@ def existenzminimum_mit_bildung_und_teilhabe( ) -@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def wohnbedarf_anteil_eltern_bg( anzahl_kinder_bg: int, familie__alleinerziehend_bg: bool, @@ -344,7 +353,7 @@ def wohnbedarf_anteil_eltern_bg( ) kinderbetrag = min( - cast_unit(anzahl_kinder_bg, Unit.DIMENSIONLESS), + cast_unit(anzahl_kinder_bg, TTSIMUnit.DIMENSIONLESS), wohnbedarf_anteil_berücksichtigte_kinder, ) * (existenzminimum.kosten_der_unterkunft.kind + existenzminimum.heizkosten.kind) @@ -355,7 +364,7 @@ def wohnbedarf_anteil_eltern_bg( leaf_name="erwachsenenbedarf_m_bg", start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def erwachsenenbedarf_m_bg_bis_2022( arbeitslosengeld_2__erwachsenensatz_m_bg: float, @@ -368,7 +377,7 @@ def erwachsenenbedarf_m_bg_bis_2022( @policy_function( leaf_name="erwachsenenbedarf_m_bg", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def erwachsenenbedarf_m_bg_ab_2023( bürgergeld__erwachsenensatz_m_bg: float, diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index f4ff1d5bb2..853c98c1b9 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 Unit, cast_unit, param_function, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, param_function, policy_function if TYPE_CHECKING: from gettsim.germany.param_types import ( @@ -19,7 +19,7 @@ start_date="2021-01-01", end_date="2022-12-31", leaf_name="satz_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def satz_mit_gestaffeltem_kindergeld( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, @@ -41,14 +41,14 @@ def satz_mit_gestaffeltem_kindergeld( + existenzminimum.heizkosten.kind ) - cast_unit( - kindergeld__satz_nach_anzahl_kinder.look_up(1), Unit.CURRENCY.PER_MONTH + kindergeld__satz_nach_anzahl_kinder.look_up(1), TTSIMUnit.CURRENCY.PER_MONTH ), satz_vorjahr_ohne_kindersofortzuschlag, ) @param_function( - leaf_name="satz_m", start_date="2024-01-01", unit=Unit.CURRENCY.PER_MONTH + leaf_name="satz_m", start_date="2024-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( existenzminimum: ExistenzminimumNachAufwendungenMitBildungUndTeilhabe, @@ -76,7 +76,7 @@ def satz_mit_einheitlichem_kindergeld_und_kindersofortzuschlag( return satz_ohne_kindersofortzuschlag + bürgergeld__kindersofortzuschlag -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) +@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, @@ -88,7 +88,7 @@ def betrag_m_bg( return 0.0 -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -97,7 +97,7 @@ def anspruchshöhe_m( return anspruchshöhe_m_bg / familie__anzahl_personen_bg -@policy_function(start_date="2005-01-01", unit=Unit.CURRENCY.PER_MONTH.PER_BG) +@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, @@ -109,7 +109,8 @@ def anspruchshöhe_m_bg( out = max( basisbetrag_m_bg - cast_unit( - vermögen_bg - vermögensfreibetrag_bg, Unit.CURRENCY.PER_MONTH.PER_BG + vermögen_bg - vermögensfreibetrag_bg, + TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ), 0.0, ) @@ -122,7 +123,7 @@ def anspruchshöhe_m_bg( start_date="2005-01-01", end_date="2022-12-31", leaf_name="vermögensfreibetrag_bg", - unit=Unit.CURRENCY.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg_bis_2022( arbeitslosengeld_2__vermögensfreibetrag_bg: float, @@ -134,7 +135,7 @@ def vermögensfreibetrag_bg_bis_2022( @policy_function( start_date="2023-01-01", leaf_name="vermögensfreibetrag_bg", - unit=Unit.CURRENCY.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_BG, ) def vermögensfreibetrag_bg_ab_2023( bürgergeld__vermögensfreibetrag_in_karenzzeit_bg: float, @@ -147,7 +148,7 @@ def vermögensfreibetrag_bg_ab_2023( start_date="2005-01-01", end_date="2008-09-30", leaf_name="basisbetrag_m_bg", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_maximales_netteinkommen( nettoeinkommen_eltern_m_bg: float, @@ -167,7 +168,7 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( """ if (nettoeinkommen_eltern_m_bg <= maximales_nettoeinkommen_m_bg) and cast_unit( - familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS + familie__anzahl_erwachsene_bg, TTSIMUnit.DIMENSIONLESS ) >= 1: out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: @@ -180,7 +181,7 @@ def basisbetrag_m_bg_check_maximales_netteinkommen( start_date="2008-10-01", end_date="2019-06-30", leaf_name="basisbetrag_m_bg", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( bruttoeinkommen_eltern_m_bg: float, @@ -205,7 +206,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 cast_unit(familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS) >= 1 + and cast_unit(familie__anzahl_erwachsene_bg, TTSIMUnit.DIMENSIONLESS) >= 1 ): out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: @@ -217,7 +218,7 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen_und_maximales_nettoeinkommen( @policy_function( start_date="2019-07-01", leaf_name="basisbetrag_m_bg", - unit=Unit.CURRENCY.PER_MONTH.PER_BG, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG, ) def basisbetrag_m_bg_check_mindestbruttoeinkommen( bruttoeinkommen_eltern_m_bg: float, @@ -237,7 +238,7 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( """ if (bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg) and cast_unit( - familie__anzahl_erwachsene_bg, Unit.DIMENSIONLESS + familie__anzahl_erwachsene_bg, TTSIMUnit.DIMENSIONLESS ) >= 1: out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: @@ -250,7 +251,7 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( leaf_name="basisbetrag_kind_m", start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def basisbetrag_kind_m_bis_2022( kindergeld__ist_leistungsbegründendes_kind: bool, @@ -262,7 +263,9 @@ def basisbetrag_kind_m_bis_2022( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = cast_unit(kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS) * ( + out = cast_unit( + kindergeld__ist_leistungsbegründendes_kind, TTSIMUnit.DIMENSIONLESS + ) * ( satz_m - entzugsrate_kindeseinkommen * ( @@ -279,7 +282,7 @@ def basisbetrag_kind_m_bis_2022( @policy_function( leaf_name="basisbetrag_kind_m", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def basisbetrag_kind_m_ab_2023( kindergeld__ist_leistungsbegründendes_kind: bool, @@ -291,7 +294,9 @@ def basisbetrag_kind_m_ab_2023( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = cast_unit(kindergeld__ist_leistungsbegründendes_kind, Unit.DIMENSIONLESS) * ( + out = cast_unit( + kindergeld__ist_leistungsbegründendes_kind, TTSIMUnit.DIMENSIONLESS + ) * ( satz_m - entzugsrate_kindeseinkommen * ( diff --git a/src/gettsim/germany/lohnsteuer/einkommen.py b/src/gettsim/germany/lohnsteuer/einkommen.py index 8ec636c183..43ff53a837 100644 --- a/src/gettsim/germany/lohnsteuer/einkommen.py +++ b/src/gettsim/germany/lohnsteuer/einkommen.py @@ -10,7 +10,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, RoundingSpec, - Unit, + TTSIMUnit, param_function, piecewise_polynomial, policy_function, @@ -20,9 +20,9 @@ @policy_function( start_date="2002-01-01", end_date="2025-12-31", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="down"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def einkommen_y_bis_2025( einnahmen__bruttolohn_y: float, @@ -62,9 +62,9 @@ def einkommen_y_bis_2025( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="down"), + rounding_spec=RoundingSpec(unit=TTSIMUnit.EUR.PER_YEAR, base=1, direction="down"), leaf_name="einkommen_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def einkommen_y_ab_2026( einnahmen__bruttolohn_y: float, @@ -111,7 +111,7 @@ def einkommen_y_ab_2026( @policy_function( - start_date="2010-01-01", end_date="2025-12-31", unit=Unit.CURRENCY.PER_YEAR + 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, @@ -149,7 +149,7 @@ def vorsorge_krankenversicherungsbeiträge_option_a_y( start_date="2015-01-01", end_date="2018-12-31", leaf_name="vorsorge_krankenversicherungsbeiträge_option_b_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -177,7 +177,7 @@ def vorsorge_krankenversicherungsbeiträge_option_b_ab_2015_bis_2018( start_date="2019-01-01", end_date="2025-12-31", leaf_name="vorsorge_krankenversicherungsbeiträge_option_b_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( sozialversicherung__kranken__beitrag__einkommen_bis_beitragsbemessungsgrenze_y: float, @@ -201,7 +201,7 @@ def vorsorge_krankenversicherungsbeiträge_option_b_ab_2019( ) -@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY.PER_YEAR) +@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, @@ -224,7 +224,7 @@ def vorsorge_gesetzliche_krankenversicherungsbeiträge_y( ) -@policy_function(start_date="2026-01-01", unit=Unit.CURRENCY.PER_YEAR) +@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, @@ -240,7 +240,7 @@ def vorsorge_arbeitslosenversicherungsbeiträge_y( @policy_function( end_date="2022-12-31", leaf_name="vorsorge_rentenversicherungsbeiträge_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_rentenversicherungsbeiträge_teilweise_anrechnung_y( sozialversicherung__rente__beitrag__einkommen_y: float, @@ -263,7 +263,7 @@ def vorsorge_rentenversicherungsbeiträge_teilweise_anrechnung_y( @policy_function( start_date="2023-01-01", leaf_name="vorsorge_rentenversicherungsbeiträge_y", - unit=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorge_rentenversicherungsbeiträge_volle_anrechnung_y( sozialversicherung__rente__beitrag__einkommen_y: float, @@ -283,7 +283,9 @@ def vorsorge_rentenversicherungsbeiträge_volle_anrechnung_y( ) -@param_function(start_date="2005-01-01", end_date="2022-12-31", unit=Unit.DIMENSIONLESS) +@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, @@ -308,8 +310,8 @@ def einführungsfaktor_rentenversicherungsaufwendungen( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="up"), - unit=Unit.CURRENCY.PER_YEAR, + 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, @@ -337,8 +339,8 @@ def vorsorgepauschale_ohne_arbeitslosenversicherungsbeiträge_y( @policy_function( start_date="2026-01-01", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="up"), - unit=Unit.CURRENCY.PER_YEAR, + 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, @@ -366,7 +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=Unit.CURRENCY.PER_YEAR, + unit=TTSIMUnit.CURRENCY.PER_YEAR, ) def vorsorgepauschale_y_ab_2005_bis_2009() -> float: pass @@ -376,8 +378,8 @@ 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(unit=Unit.EUR.PER_YEAR, base=1, direction="up"), - unit=Unit.CURRENCY.PER_YEAR, + 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, @@ -399,8 +401,8 @@ def vorsorgepauschale_y_ab_2010_bis_2025( @policy_function( start_date="2026-01-01", leaf_name="vorsorgepauschale_y", - rounding_spec=RoundingSpec(unit=Unit.EUR.PER_YEAR, base=1, direction="up"), - unit=Unit.CURRENCY.PER_YEAR, + 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/inputs.py b/src/gettsim/germany/lohnsteuer/inputs.py index e72ff5aa42..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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 2f59ef2bfb..ea587e2834 100644 --- a/src/gettsim/germany/lohnsteuer/lohnsteuer.py +++ b/src/gettsim/germany/lohnsteuer/lohnsteuer.py @@ -9,7 +9,7 @@ from gettsim.tt import ( UNSET_UNIT, PiecewisePolynomialParamValue, - Unit, + TTSIMUnit, param_function, piecewise_polynomial, policy_function, @@ -94,7 +94,7 @@ def parameter_max_lohnsteuer_klasse_5_6( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def basistarif_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -108,7 +108,7 @@ def basistarif_y( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def splittingtarif_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -123,7 +123,7 @@ def splittingtarif_y( @policy_function( - verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR + verify_units=False, start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR ) def tarif_klassen_5_und_6_y( einkommen_y: float, @@ -148,7 +148,7 @@ def tarif_klassen_5_und_6_y( return xnp.minimum(xnp.maximum(min_lohnsteuer, basis), max_lohnsteuer) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_y( steuerklasse: int, basistarif_y: float, @@ -165,7 +165,7 @@ def betrag_y( return max(out, 0.0) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def basistarif_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -184,7 +184,7 @@ def basistarif_mit_kinderfreibetrag_y( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def splittingtarif_mit_kinderfreibetrag_y( einkommen_y: float, einkommensteuer__parameter_einkommensteuertarif: PiecewisePolynomialParamValue, @@ -204,7 +204,7 @@ def splittingtarif_mit_kinderfreibetrag_y( @policy_function( - verify_units=False, start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR + verify_units=False, start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR ) def tarif_klassen_5_und_6_mit_kinderfreibetrag_y( einkommen_y: float, @@ -236,7 +236,7 @@ def tarif_klassen_5_und_6_mit_kinderfreibetrag_y( return xnp.minimum(xnp.maximum(min_lohnsteuer, basis), max_lohnsteuer) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@policy_function(start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR) def betrag_mit_kinderfreibetrag_y( steuerklasse: int, basistarif_mit_kinderfreibetrag_y: float, @@ -258,7 +258,7 @@ def betrag_mit_kinderfreibetrag_y( return max(out, 0.0) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@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, @@ -272,7 +272,7 @@ def betrag_soli_y( ) -@policy_function(start_date="2015-01-01", unit=Unit.CURRENCY.PER_YEAR) +@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/param_types.py b/src/gettsim/germany/param_types.py index 2d9cd75346..0ceed5693d 100644 --- a/src/gettsim/germany/param_types.py +++ b/src/gettsim/germany/param_types.py @@ -1,31 +1,31 @@ from dataclasses import dataclass from typing import Annotated -from gettsim.tt import Unit +from gettsim.tt import TTSIMUnit @dataclass(frozen=True) class Altersgrenzen: - min_alter: Annotated[int, Unit.YEARS] - max_alter: Annotated[int, Unit.YEARS] + min_alter: Annotated[int, TTSIMUnit.YEARS] + max_alter: Annotated[int, TTSIMUnit.YEARS] @dataclass(frozen=True) class SatzMitAltersgrenzen: - satz: Annotated[float, Unit.CURRENCY.PER_MONTH] + satz: Annotated[float, TTSIMUnit.CURRENCY.PER_MONTH] altersgrenzen: Altersgrenzen @dataclass(frozen=True) class ElementExistenzminimum: - single: Annotated[float, Unit.CURRENCY.PER_YEAR] - paar: Annotated[float, Unit.CURRENCY.PER_YEAR] - kind: Annotated[float, Unit.CURRENCY.PER_YEAR] + 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: Annotated[float, Unit.CURRENCY.PER_YEAR] + 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 2bdfce69ff..ff03391f66 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" @@ -9,7 +9,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, - Unit, + TTSIMUnit, piecewise_polynomial, policy_function, ) @@ -33,7 +33,7 @@ def solidaritätszuschlagstarif( verify_units=False, end_date="2008-12-31", leaf_name="betrag_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_ohne_abgelt_st( einkommensteuer__betrag_mit_kinderfreibetrag_y_sn: float, @@ -67,7 +67,7 @@ def betrag_y_sn_ohne_abgelt_st( verify_units=False, start_date="2009-01-01", leaf_name="betrag_y_sn", - unit=Unit.CURRENCY.PER_YEAR.PER_SN, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, ) def betrag_y_sn_mit_abgelt_st( einkommensteuer__betrag_mit_kinderfreibetrag_y_sn: float, diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py b/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py index 6c7e6fbc6e..4f7c604286 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/arbeitslosengeld.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING from gettsim.tt import ( - Unit, + TTSIMUnit, policy_function, ) @@ -17,13 +17,13 @@ end_date="1998-07-31", leaf_name="betrag_m", fail_msg_if_included="Arbeitslosengeld before August 1998 is not implemented.", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_bis_1998_07() -> float: """Calculate individual unemployment benefit.""" -@policy_function(start_date="1998-08-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="1998-08-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_m( einkommensteuer__anzahl_kinderfreibeträge: int, grundsätzlich_anspruchsberechtigt: bool, @@ -47,7 +47,7 @@ def betrag_m( return out -@policy_function(unit=Unit.MONTHS) +@policy_function(unit=TTSIMUnit.MONTHS) def monate_verbleibender_anspruchsdauer( alter: int, monate_sozialversicherungspflichtiger_beschäftigung_in_letzten_5_jahren: int, @@ -76,7 +76,7 @@ def monate_verbleibender_anspruchsdauer( return out -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def mindestversicherungszeit_erreicht( monate_beitragspflichtig_versichert_in_letzten_30_monaten: int, mindestversicherungsmonate: int, @@ -90,7 +90,7 @@ def mindestversicherungszeit_erreicht( ) -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( arbeitssuchend: bool, monate_verbleibender_anspruchsdauer: int, @@ -107,7 +107,7 @@ def grundsätzlich_anspruchsberechtigt( ) -@policy_function(unit=Unit.CURRENCY.PER_YEAR) +@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 a1a283c4a7..c01a489ef6 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/beitrag/beitrag.py @@ -2,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( sozialversicherung__rente__beitrag__einkommen_m: float, @@ -22,7 +22,7 @@ def betrag_versicherter_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -45,7 +45,7 @@ def betrag_versicherter_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -68,7 +68,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_bis_03_1999( sozialversicherung__rente__beitrag__einkommen_m: float, @@ -82,7 +82,7 @@ def betrag_arbeitgeber_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -105,7 +105,7 @@ def betrag_arbeitgeber_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -125,7 +125,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function(start_date="2003-04-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -140,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_anteil_bruttolohn( einnahmen__bruttolohn_m: float, @@ -155,7 +155,7 @@ def betrag_arbeitgeber_in_gleitzone_m_anteil_bruttolohn( @policy_function( start_date="2022-10-01", leaf_name="betrag_arbeitgeber_in_gleitzone_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_als_differenz_von_gesamt_und_versichertenbeitrag( betrag_gesamt_in_gleitzone_m: float, @@ -169,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_gesamt_in_gleitzone_m: float, @@ -184,7 +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=Unit.CURRENCY.PER_MONTH, + 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/inputs.py b/src/gettsim/germany/sozialversicherung/arbeitslosen/inputs.py index 86aceb15f1..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.MONTHS) +@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(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def arbeitssuchend() -> bool: """Looking for employment.""" -@policy_input(unit=Unit.MONTHS) +@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(unit=Unit.MONTHS) +@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 30731202ab..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 Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_MONTH) +@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 80e8932b66..6835e06dec 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitrag.py @@ -2,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( betrag_versicherter_regulärer_beitragssatz_m: float, @@ -21,7 +21,7 @@ def betrag_versicherter_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -48,7 +48,7 @@ def betrag_versicherter_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -79,7 +79,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_bis_03_1999( einkommen_m: float, @@ -99,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -127,7 +127,7 @@ def betrag_arbeitgeber_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -155,7 +155,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_versicherter_regulärer_beitragssatz_m( einkommen_m: float, beitragssatz_arbeitnehmer: float, @@ -167,7 +167,7 @@ def betrag_versicherter_regulärer_beitragssatz_m( @policy_function( end_date="2005-06-30", leaf_name="betrag_selbstständig_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_mit_einheitlichen_beitragssatz( bemessungsgrundlage_selbstständig_m: float, @@ -183,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_ohne_ermäßigtem_beitragssatz( bemessungsgrundlage_selbstständig_m: float, @@ -201,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_ohne_zusatzbeitrag( bemessungsgrundlage_selbstständig_m: float, @@ -216,7 +216,7 @@ def betrag_selbstständig_m_ohne_zusatzbeitrag( @policy_function( start_date="2015-01-01", leaf_name="betrag_selbstständig_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_selbstständig_m_mit_zusatzbeitrag( bemessungsgrundlage_selbstständig_m: float, @@ -233,7 +233,7 @@ def betrag_selbstständig_m_mit_zusatzbeitrag( return beitrag * bemessungsgrundlage_selbstständig_m -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_rentner_m( bemessungsgrundlage_rente_m: float, beitragssatz_arbeitnehmer: float, @@ -242,7 +242,7 @@ def betrag_rentner_m( return beitragssatz_arbeitnehmer * bemessungsgrundlage_rente_m -@policy_function(start_date="2003-04-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -261,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_mit_festem_beitragssatz( einnahmen__bruttolohn_m: float, @@ -283,7 +283,7 @@ def betrag_arbeitgeber_in_gleitzone_m_mit_festem_beitragssatz( @policy_function( start_date="2022-10-01", leaf_name="betrag_arbeitgeber_in_gleitzone_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_als_differenz_von_gesamt_und_versichertenbeitrag( betrag_gesamt_in_gleitzone_m: float, @@ -305,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_gesamt_in_gleitzone_m: float, @@ -318,7 +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=Unit.CURRENCY.PER_MONTH, + 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/beitragssatz.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragssatz.py index 296c159931..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 Unit, param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function -@param_function(end_date="2005-06-30", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_voller_zusatzbeitrag_ab_07_2005_bis_2008( zusatzbeitragssatz: float, @@ -47,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitrag_ab_2006_bis_2008( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -66,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_voller_zusatzbeitrag_ab_2009_bis_2018( zusatzbeitragssatz: float, @@ -85,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_voller_sonderbeitragssatz( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -106,7 +106,7 @@ def beitragssatz_arbeitnehmer_midijob_voller_sonderbeitragssatz( start_date="2015-01-01", end_date="2018-12-31", leaf_name="beitragssatz_arbeitnehmer_midijob", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitragssatz( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -126,7 +126,7 @@ def beitragssatz_arbeitnehmer_midijob_voller_zusatzbeitragssatz( @policy_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitnehmer", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_paritätischer_zusatzbeitrag( zusatzbeitragssatz: float, @@ -142,7 +142,7 @@ def beitragssatz_arbeitnehmer_paritätischer_zusatzbeitrag( @param_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitnehmer_midijob", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_midijob_paritätischer_zusatzbeitrag( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -160,7 +160,7 @@ def beitragssatz_arbeitnehmer_midijob_paritätischer_zusatzbeitrag( @param_function( end_date="2005-06-30", leaf_name="beitragssatz_arbeitgeber", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_bis_06_2005(beitragssatz: float) -> float: """Employer's health insurance contribution rate.""" @@ -170,7 +170,7 @@ def beitragssatz_arbeitgeber_bis_06_2005(beitragssatz: float) -> float: @param_function( end_date="2005-12-31", leaf_name="beitragssatz_arbeitgeber_midijob", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_bis_06_2005( beitragssatz_jahresanfang: float, @@ -183,7 +183,7 @@ def beitragssatz_arbeitgeber_midijob_bis_06_2005( start_date="2005-07-01", end_date="2008-12-31", leaf_name="beitragssatz_arbeitgeber", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_ohne_zusatzbeitrag_ab_07_2005_bis_2008( parameter_beitragssatz: dict[str, float], @@ -196,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_ohne_zusatzbeitrag_ab_06_2006_bis_2008( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -209,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_ohne_zusatzbeitrag_ab_09_2009_bis_2018( parameter_beitragssatz: dict[str, float], @@ -222,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_ohne_zusatzbeitrag_ab_09_2009_bis_2018( parameter_beitragssatz_jahresanfang: dict[str, float], @@ -234,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_paritätischer_zusatzbeitrag( beitragssatz_arbeitnehmer: float, @@ -250,7 +250,7 @@ def beitragssatz_arbeitgeber_paritätischer_zusatzbeitrag( @param_function( start_date="2019-01-01", leaf_name="beitragssatz_arbeitgeber_midijob", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_midijob_paritätischer_zusatzbeitrag( beitragssatz_arbeitnehmer_midijob: float, @@ -267,7 +267,7 @@ def beitragssatz_arbeitgeber_midijob_paritätischer_zusatzbeitrag( start_date="2005-07-01", end_date="2014-12-31", leaf_name="zusatzbeitragssatz", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def zusatzbeitragssatz_genannt_sonderbeitrag( parameter_beitragssatz: dict[str, float], @@ -279,7 +279,7 @@ def zusatzbeitragssatz_genannt_sonderbeitrag( return parameter_beitragssatz["sonderbeitrag"] -@param_function(start_date="2015-01-01", unit=Unit.DIMENSIONLESS) +@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/einkommen.py b/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py index f23c513618..e0fd02ee0a 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/einkommen.py @@ -2,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="einkommen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_m_bis_03_1999( einkommen_bis_beitragsbemessungsgrenze_m: float, @@ -20,7 +20,7 @@ def einkommen_m_bis_03_1999( @policy_function( start_date="1999-04-01", leaf_name="einkommen_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_m_ab_04_1999( einkommen_bis_beitragsbemessungsgrenze_m: float, @@ -38,7 +38,7 @@ def einkommen_m_ab_04_1999( return out -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_bis_beitragsbemessungsgrenze_m( einnahmen__bruttolohn_m: float, beitragsbemessungsgrenze_m: float, @@ -54,7 +54,7 @@ def einkommen_bis_beitragsbemessungsgrenze_m( ) -@policy_function(start_date="1990-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -92,7 +92,7 @@ def bemessungsgrundlage_selbstständig_m( start_date="1990-01-01", end_date="2000-12-31", leaf_name="beitragsbemessungsgrenze_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def beitragsbemessungsgrenze_m_nach_wohnort( wohnort_ost_hh: bool, @@ -109,7 +109,7 @@ def beitragsbemessungsgrenze_m_nach_wohnort( @policy_function( start_date="1990-01-01", end_date="2024-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bezugsgröße_selbstständige_m( wohnort_ost_hh: bool, @@ -127,7 +127,7 @@ def bezugsgröße_selbstständige_m( ) -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@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 1f59d8b52a..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def privat_versichert() -> bool: """Has (only) a private health insurance contract.""" -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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/midijob.py b/src/gettsim/germany/sozialversicherung/midijob.py index 22065a2c4e..a359729ff1 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.py +++ b/src/gettsim/germany/sozialversicherung/midijob.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import Unit, param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function -@policy_function(start_date="2003-04-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2003-04-01", unit=TTSIMUnit.DIMENSIONLESS) def in_gleitzone( einnahmen__bruttolohn_m: float, geringfügig_beschäftigt: bool, @@ -22,7 +22,7 @@ def in_gleitzone( return (einnahmen__bruttolohn_m <= midijobgrenze) and (not geringfügig_beschäftigt) -@policy_function(verify_units=False, unit=Unit.CURRENCY.PER_MONTH) +@policy_function(verify_units=False, unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( einnahmen__bruttolohn_m: float, minijobgrenze_m: float, @@ -44,7 +44,7 @@ def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( start_date="2003-04-01", end_date="2004-12-31", leaf_name="midijob_faktor_f", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def midijob_faktor_f_mit_minijob_steuerpauschale_bis_2004( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -88,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -131,7 +131,7 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( verify_units=False, start_date="2022-10-01", leaf_name="midijob_faktor_f", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def midijob_faktor_f_ohne_minijob_steuerpauschale( kranken__beitrag__beitragssatz_arbeitnehmer_midijob: float, @@ -178,7 +178,7 @@ def midijob_faktor_f_ohne_minijob_steuerpauschale( start_date="2003-04-01", end_date="2022-09-30", leaf_name="midijob_bemessungsentgelt_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def midijob_bemessungsentgelt_m_bis_09_2022( einnahmen__bruttolohn_m: float, @@ -209,7 +209,7 @@ def midijob_bemessungsentgelt_m_bis_09_2022( verify_units=False, start_date="2022-10-01", leaf_name="midijob_bemessungsentgelt_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def midijob_bemessungsentgelt_m_ab_10_2022( einnahmen__bruttolohn_m: float, diff --git a/src/gettsim/germany/sozialversicherung/minijob.py b/src/gettsim/germany/sozialversicherung/minijob.py index 876a871435..e7e25f9455 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.py +++ b/src/gettsim/germany/sozialversicherung/minijob.py @@ -2,10 +2,10 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, Unit, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def geringfügig_beschäftigt( einnahmen__bruttolohn_m: float, minijobgrenze_m: float, @@ -22,12 +22,12 @@ def geringfügig_beschäftigt( end_date="1999-12-31", leaf_name="minijobgrenze_m", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_MONTH, + unit=TTSIMUnit.DM.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def minijobgrenze_unterscheidung_ost_west( wohnort_ost_hh: bool, @@ -48,12 +48,12 @@ def minijobgrenze_unterscheidung_ost_west( start_date="2022-10-01", leaf_name="minijobgrenze_m", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=1, direction="up", reference="§ 8 Abs. 1a Satz 2 SGB IV", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def minijobgrenze_abgeleitet_von_mindestlohn( mindestlohn: float, diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py index 04992dad12..ced452d87a 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitrag.py @@ -2,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( betrag_versicherter_regulärer_beitragssatz_m: float, @@ -21,7 +21,7 @@ def betrag_versicherter_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -49,7 +49,7 @@ def betrag_versicherter_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_mit_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -77,7 +77,7 @@ def betrag_versicherter_m_mit_midijob( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_bis_03_1999( betrag_arbeitgeber_regulärer_beitragssatz_m: float, @@ -90,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -115,7 +115,7 @@ def betrag_arbeitgeber_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_midijob( einkommensteuer__einkünfte__ist_hauptberuflich_selbstständig: bool, @@ -141,7 +141,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function(start_date="1995-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -157,7 +157,7 @@ def betrag_selbstständig_m( ) -@policy_function(start_date="1995-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -168,7 +168,7 @@ def betrag_versicherter_regulärer_beitragssatz_m( return sozialversicherung__kranken__beitrag__einkommen_m * beitragssatz_arbeitnehmer -@policy_function(start_date="1995-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -182,7 +182,7 @@ def betrag_arbeitgeber_regulärer_beitragssatz_m( @policy_function( start_date="2003-04-01", end_date="2022-09-30", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_gesamt_in_gleitzone_m( sozialversicherung__midijob_bemessungsentgelt_m: float, @@ -199,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_arbeitgeber_in_gleitzone_m: float, @@ -213,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_in_gleitzone_m_direkt( sozialversicherung__beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m: float, @@ -229,7 +229,7 @@ def betrag_versicherter_in_gleitzone_m_direkt( @policy_function( start_date="2023-07-01", leaf_name="betrag_versicherter_in_gleitzone_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_midijob_m_mit_verringertem_beitrag_für_eltern_mit_mehreren_kindern( anzahl_kinder_bis_24: int, @@ -266,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_als_anteil_des_bruttolohns( einnahmen__bruttolohn_m: float, @@ -279,7 +279,7 @@ def betrag_arbeitgeber_in_gleitzone_m_als_anteil_des_bruttolohns( @policy_function( start_date="2022-10-01", leaf_name="betrag_arbeitgeber_in_gleitzone_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_in_gleitzone_m_als_anteil_der_beitragspflichtigen_einnahmen( sozialversicherung__midijob_bemessungsentgelt_m: float, @@ -300,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_rentner_m_reduzierter_beitrag( sozialversicherung__kranken__beitrag__bemessungsgrundlage_rente_m: float, @@ -320,7 +320,7 @@ def betrag_rentner_m_reduzierter_beitrag( start_date="2004-04-01", end_date="2004-12-31", leaf_name="betrag_rentner_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_rentner_m_ohne_zusatz_für_kinderlose( sozialversicherung__kranken__beitrag__bemessungsgrundlage_rente_m: float, @@ -338,7 +338,7 @@ def betrag_rentner_m_ohne_zusatz_für_kinderlose( @policy_function( start_date="2005-01-01", leaf_name="betrag_rentner_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_rentner_m_mit_zusatz_für_kinderlose( sozialversicherung__kranken__beitrag__bemessungsgrundlage_rente_m: float, diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py index 47827d7b8c..eb5bf0c9bc 100644 --- a/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py +++ b/src/gettsim/germany/sozialversicherung/pflege/beitrag/beitragssatz.py @@ -4,7 +4,7 @@ from gettsim.tt import ( AggType, - Unit, + TTSIMUnit, agg_by_p_id_function, param_function, policy_function, @@ -14,7 +14,7 @@ @param_function( start_date="1995-01-01", end_date="2004-12-31", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer(beitragssatz: float) -> float: """Employee's long-term care insurance contribution rate.""" @@ -25,7 +25,7 @@ def beitragssatz_arbeitnehmer(beitragssatz: float) -> float: start_date="2005-01-01", end_date="2023-06-30", leaf_name="beitragssatz_arbeitnehmer", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_zusatz_kinderlos_dummy( zahlt_zusatzbetrag_kinderlos: bool, @@ -50,7 +50,7 @@ def beitragssatz_arbeitnehmer_zusatz_kinderlos_dummy( @policy_function( start_date="2023-07-01", leaf_name="beitragssatz_arbeitnehmer", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitnehmer_mit_abschlag_nach_kinderzahl( anzahl_kinder_bis_24: int, @@ -76,7 +76,7 @@ def beitragssatz_arbeitnehmer_mit_abschlag_nach_kinderzahl( return base + add -@policy_function(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def zahlt_zusatzbetrag_kinderlos( hat_kinder: bool, alter: int, @@ -91,7 +91,7 @@ def zahlt_zusatzbetrag_kinderlos( @agg_by_p_id_function( - agg_type=AggType.SUM, start_date="2005-01-01", unit=Unit.PERSON_COUNT + agg_type=AggType.SUM, start_date="2005-01-01", unit=TTSIMUnit.PERSON_COUNT ) def anzahl_kinder_bis_24_elternteil_1( alter_bis_24: bool, @@ -102,7 +102,7 @@ def anzahl_kinder_bis_24_elternteil_1( @agg_by_p_id_function( - agg_type=AggType.SUM, start_date="2005-01-01", unit=Unit.PERSON_COUNT + agg_type=AggType.SUM, start_date="2005-01-01", unit=TTSIMUnit.PERSON_COUNT ) def anzahl_kinder_bis_24_elternteil_2( alter_bis_24: bool, @@ -112,7 +112,7 @@ def anzahl_kinder_bis_24_elternteil_2( pass -@policy_function(start_date="2005-01-01", unit=Unit.PERSON_COUNT) +@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, @@ -125,7 +125,7 @@ def anzahl_kinder_bis_24( start_date="1995-01-01", end_date="2004-12-31", leaf_name="beitragssatz_arbeitgeber", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_einheitliche_basis(beitragssatz: float) -> float: """Employer's long-term care insurance contribution rate.""" @@ -135,7 +135,7 @@ def beitragssatz_arbeitgeber_einheitliche_basis(beitragssatz: float) -> float: @param_function( start_date="2005-01-01", leaf_name="beitragssatz_arbeitgeber", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def beitragssatz_arbeitgeber_basis_nach_kinderzahl( beitragssatz_nach_kinderzahl: dict[str, float], diff --git a/src/gettsim/germany/sozialversicherung/pflege/beitrag/inputs.py b/src/gettsim/germany/sozialversicherung/pflege/beitrag/inputs.py index 5044a474f5..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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 6d0ac3aef7..dd8b25e2c8 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,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="2003-03-31", leaf_name="regulär_beschäftigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def regulär_beschäftigt_vor_midijob( einnahmen__bruttolohn_m: float, @@ -23,7 +23,7 @@ def regulär_beschäftigt_vor_midijob( @policy_function( start_date="2003-04-01", leaf_name="regulär_beschäftigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def regulär_beschäftigt_mit_midijob( einnahmen__bruttolohn_m: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py index 59133e910d..89270eaa58 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 Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function -@policy_function(unit=Unit.YEARS) +@policy_function(unit=TTSIMUnit.YEARS) def alter_bei_renteneintritt( jahr_renteneintritt: int, monat_renteneintritt: int, @@ -24,5 +24,5 @@ def alter_bei_renteneintritt( """ return (jahr_renteneintritt - geburtsjahr) + cast_unit( m_to_y(monat_renteneintritt - geburtsmonat - 1), - Unit.YEARS, + TTSIMUnit.YEARS, ) diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersgrenzen.py index d4b1e1b83d..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 Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function if TYPE_CHECKING: from types import ModuleType @@ -15,7 +15,7 @@ @policy_function( end_date="2011-12-31", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_arbeitslosigkeit_frauen_ohne_besonders_langjährig( wegen_arbeitslosigkeit__grundsätzlich_anspruchsberechtigt: bool, @@ -52,7 +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=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_arbeitslosigkeit_frauen_besonders_langjährig( für_frauen__grundsätzlich_anspruchsberechtigt: bool, @@ -100,7 +100,7 @@ def altersgrenze_mit_arbeitslosigkeit_frauen_besonders_langjährig( @policy_function( start_date="2018-01-01", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_besonders_langjährig_ohne_arbeitslosigkeit_frauen( besonders_langjährig__grundsätzlich_anspruchsberechtigt: bool, @@ -132,7 +132,7 @@ def altersgrenze_mit_besonders_langjährig_ohne_arbeitslosigkeit_frauen( @policy_function( end_date="2017-12-31", leaf_name="altersgrenze_vorzeitig", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_arbeitslosigkeit_frauen( wegen_arbeitslosigkeit__grundsätzlich_anspruchsberechtigt: bool, @@ -170,7 +170,7 @@ def altersgrenze_vorzeitig_mit_arbeitslosigkeit_frauen( @policy_function( - start_date="2018-01-01", leaf_name="altersgrenze_vorzeitig", unit=Unit.YEARS + start_date="2018-01-01", leaf_name="altersgrenze_vorzeitig", unit=TTSIMUnit.YEARS ) def altersgrenze_vorzeitig_ohne_arbeitslosigkeit_frauen( langjährig__grundsätzlich_anspruchsberechtigt: bool, @@ -195,7 +195,7 @@ def altersgrenze_vorzeitig_ohne_arbeitslosigkeit_frauen( @policy_function( end_date="2017-12-31", leaf_name="vorzeitig_grundsätzlich_anspruchsberechtigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def vorzeitig_grundsätzlich_anspruchsberechtigt_mit_arbeitslosigkeit_frauen( für_frauen__grundsätzlich_anspruchsberechtigt: bool, @@ -219,7 +219,7 @@ def vorzeitig_grundsätzlich_anspruchsberechtigt_mit_arbeitslosigkeit_frauen( @policy_function( start_date="2018-01-01", leaf_name="vorzeitig_grundsätzlich_anspruchsberechtigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def vorzeitig_grundsätzlich_anspruchsberechtigt_vorzeitig_ohne_arbeitslosigkeit_frauen( langjährig__grundsätzlich_anspruchsberechtigt: bool, @@ -232,7 +232,7 @@ def vorzeitig_grundsätzlich_anspruchsberechtigt_vorzeitig_ohne_arbeitslosigkeit @policy_function( - end_date="2017-12-31", leaf_name="referenzalter_abschlag", unit=Unit.YEARS + end_date="2017-12-31", leaf_name="referenzalter_abschlag", unit=TTSIMUnit.YEARS ) def referenzalter_abschlag_mit_arbeitslosigkeit_frauen( wegen_arbeitslosigkeit__grundsätzlich_anspruchsberechtigt: bool, @@ -302,7 +302,7 @@ def referenzalter_abschlag_mit_arbeitslosigkeit_frauen( @policy_function( - start_date="2018-01-01", leaf_name="referenzalter_abschlag", unit=Unit.YEARS + start_date="2018-01-01", leaf_name="referenzalter_abschlag", unit=TTSIMUnit.YEARS ) def referenzalter_abschlag_ohne_arbeitslosigkeit_frauen( langjährig__grundsätzlich_anspruchsberechtigt: bool, @@ -322,7 +322,7 @@ def referenzalter_abschlag_ohne_arbeitslosigkeit_frauen( return out -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def hat_regelaltersgrenze_erreicht( alter_monate: int, sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze: float, @@ -337,7 +337,7 @@ def hat_regelaltersgrenze_erreicht( ) -@policy_function(unit=Unit.DIMENSIONLESS) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def älter_als_regelaltersgrenze( alter_monate: int, sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze: float, @@ -350,5 +350,5 @@ def älter_als_regelaltersgrenze( # Hence, we add a number << 1 / 12 to the RHS. return m_to_y(alter_monate) > ( sozialversicherung__rente__altersrente__regelaltersrente__altersgrenze - + cast_unit(0.00001, Unit.YEARS) + + 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 64af1dd19c..91ebfa4fd6 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/altersrente.py @@ -2,19 +2,19 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, Unit, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function @policy_function( end_date="2001-12-31", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_MONTH, + unit=TTSIMUnit.DM.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_bis_2001( bruttorente_m: float, @@ -27,13 +27,13 @@ def betrag_m_bis_2001( start_date="2002-01-01", end_date="2020-12-31", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_ab_2002( bruttorente_m: float, @@ -45,13 +45,13 @@ def betrag_m_ab_2002( @policy_function( start_date="2021-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="betrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_mit_grundrente( bruttorente_m: float, @@ -70,7 +70,7 @@ def betrag_m_mit_grundrente( start_date="1992-01-01", end_date="2023-06-30", leaf_name="bruttorente_basisbetrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_basisbetrag_m_nach_wohnort( zugangsfaktor: float, @@ -102,7 +102,7 @@ def bruttorente_basisbetrag_m_nach_wohnort( return out -@policy_function(start_date="2023-07-01", unit=Unit.CURRENCY.PER_MONTH) +@policy_function(start_date="2023-07-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) def bruttorente_basisbetrag_m( zugangsfaktor: float, sozialversicherung__rente__entgeltpunkte: float, @@ -131,7 +131,7 @@ def bruttorente_basisbetrag_m( return out -@policy_function(unit=Unit.DIMENSIONLESS) +@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/besonders_langj\303\244hrig.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/besonders_langj\303\244hrig/besonders_langj\303\244hrig.py" index e861b426ca..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,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import ConsecutiveIntLookupTableParamValue, Unit, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, TTSIMUnit, policy_function @policy_function( start_date="2014-06-23", end_date="2028-12-31", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze( geburtsjahr: int, @@ -27,7 +27,7 @@ def altersgrenze( return altersgrenze_gestaffelt.look_up(geburtsjahr) -@policy_function(start_date="2012-01-01", unit=Unit.DIMENSIONLESS) +@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/f\303\274r_frauen.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/f\303\274r_frauen/f\303\274r_frauen.py" index 0e619e97b0..e3b4761bbf 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" @@ -9,7 +9,7 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, cast_unit, policy_function, ) @@ -19,7 +19,7 @@ start_date="1989-12-18", end_date="2017-12-31", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_staffelung( geburtsjahr: int, @@ -33,9 +33,9 @@ def altersgrenze_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -44,7 +44,7 @@ def altersgrenze_mit_staffelung( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_staffelung( geburtsjahr: int, @@ -58,9 +58,9 @@ def altersgrenze_vorzeitig_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -68,7 +68,7 @@ def altersgrenze_vorzeitig_mit_staffelung( @policy_function( end_date="1997-12-15", leaf_name="grundsätzlich_anspruchsberechtigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( weiblich: bool, @@ -94,7 +94,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=Unit.DIMENSIONLESS, + 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 96bf74e668..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2017-12-31", unit=Unit.YEARS) +@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 1ba3e33ac0..85b924da8e 100644 --- a/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py +++ b/src/gettsim/germany/sozialversicherung/rente/altersrente/hinzuverdienstgrenzen.py @@ -1,18 +1,18 @@ from __future__ import annotations -from gettsim.tt import RoundingSpec, Unit, policy_function +from gettsim.tt import RoundingSpec, TTSIMUnit, policy_function @policy_function( end_date="2001-12-31", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_MONTH, + unit=TTSIMUnit.DM.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="bruttorente_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_m_mit_harter_hinzuverdienstgrenze_bis_2001( alter: int, @@ -41,13 +41,13 @@ def bruttorente_m_mit_harter_hinzuverdienstgrenze_bis_2001( start_date="2002-01-01", end_date="2017-06-30", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), leaf_name="bruttorente_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_m_mit_harter_hinzuverdienstgrenze_ab_2002( alter: int, @@ -77,12 +77,12 @@ def bruttorente_m_mit_harter_hinzuverdienstgrenze_ab_2002( end_date="2022-12-31", leaf_name="bruttorente_m", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_m_mit_hinzuverdienstdeckel( alter: int, @@ -116,7 +116,7 @@ def bruttorente_m_mit_hinzuverdienstdeckel( @policy_function( start_date="2017-07-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def zahlbetrag_ohne_deckel_m( einnahmen__bruttolohn_m: float, @@ -150,7 +150,7 @@ def zahlbetrag_ohne_deckel_m( @policy_function( start_date="2017-07-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def differenz_bruttolohn_hinzuverdienstgrenze_m( einnahmen__bruttolohn_m: float, @@ -166,7 +166,7 @@ def differenz_bruttolohn_hinzuverdienstgrenze_m( @policy_function( start_date="2017-07-01", end_date="2022-12-31", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def differenz_bruttolohn_hinzuverdienstdeckel_m( einnahmen__bruttolohn_m: float, @@ -186,12 +186,12 @@ def differenz_bruttolohn_hinzuverdienstdeckel_m( start_date="2023-01-01", leaf_name="bruttorente_m", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def bruttorente_m_ohne_einkommensanrechnung( bruttorente_basisbetrag_m: float, diff --git a/src/gettsim/germany/sozialversicherung/rente/altersrente/inputs.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/inputs.py index f8f428a9ea..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2022-12-31", unit=Unit.CURRENCY.PER_YEAR) +@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/langj\303\244hrig.py" "b/src/gettsim/germany/sozialversicherung/rente/altersrente/langj\303\244hrig/langj\303\244hrig.py" index 809a0e0f86..4ab4c46f1a 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" @@ -6,7 +6,7 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, cast_unit, policy_function, ) @@ -15,7 +15,7 @@ @policy_function( start_date="1989-12-18", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_gestaffelt_ab_1989( geburtsjahr: int, @@ -33,9 +33,9 @@ def altersgrenze_gestaffelt_ab_1989( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -44,7 +44,7 @@ def altersgrenze_gestaffelt_ab_1989( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_gestaffelt_ab_1989_bis_1996( geburtsjahr: int, @@ -57,7 +57,7 @@ def altersgrenze_vorzeitig_gestaffelt_ab_1989_bis_1996( return altersgrenze_vorzeitig_gestaffelt.look_up(geburtsjahr) -@policy_function(unit=Unit.DIMENSIONLESS) +@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/regelaltersrente.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/regelaltersrente/regelaltersrente.py index b00fb03826..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, Unit, policy_function +from gettsim.tt import ConsecutiveIntLookupTableParamValue, TTSIMUnit, policy_function -@policy_function(start_date="2007-04-20", end_date="2030-12-31", unit=Unit.YEARS) +@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(unit=Unit.DIMENSIONLESS) +@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/inputs.py b/src/gettsim/germany/sozialversicherung/rente/altersrente/wegen_arbeitslosigkeit/inputs.py index acf4c9fdc8..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2017-12-31", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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 6d9416c13d..c1c9a46e65 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 @@ -13,7 +13,7 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, cast_unit, policy_function, ) @@ -23,7 +23,7 @@ start_date="1989-12-18", end_date="1996-07-28", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_bis_1996( geburtsjahr: int, @@ -35,9 +35,9 @@ def altersgrenze_bis_1996( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -47,7 +47,7 @@ def altersgrenze_bis_1996( start_date="1996-07-29", end_date="2009-12-31", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_mit_vertrauensschutzprüfung( vertrauensschutz_1997: bool, @@ -71,7 +71,7 @@ def altersgrenze_mit_vertrauensschutzprüfung( start_date="2010-01-01", end_date="2017-12-31", leaf_name="altersgrenze", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_ab_2010( altersgrenze_ohne_vertrauensschutz: float, @@ -90,7 +90,7 @@ def altersgrenze_ab_2010( start_date="1989-12-18", end_date="1996-07-28", leaf_name="altersgrenze_vorzeitig", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( geburtsjahr: int, @@ -102,9 +102,9 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -114,7 +114,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( start_date="1996-07-29", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_1996_bis_09_1996( vertrauensschutz_1997: bool, @@ -137,7 +137,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=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_mit_vertrauensschutzprüfung_ab_07_2004( vertrauensschutz_2004: bool, @@ -158,7 +158,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", unit=Unit.YEARS) +@policy_function(start_date="1989-12-18", end_date="2017-12-31", unit=TTSIMUnit.YEARS) def altersgrenze_ohne_vertrauensschutz( geburtsjahr: int, geburtsmonat: int, @@ -171,15 +171,15 @@ def altersgrenze_ohne_vertrauensschutz( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) -@policy_function(start_date="1996-07-29", end_date="2009-12-31", unit=Unit.YEARS) +@policy_function(start_date="1996-07-29", end_date="2009-12-31", unit=TTSIMUnit.YEARS) def altersgrenze_mit_vertrauensschutz( geburtsjahr: int, geburtsmonat: int, @@ -187,9 +187,9 @@ def altersgrenze_mit_vertrauensschutz( ) -> float: """Full retirement age for unemployed for individuals under Vertrauensschutz.""" birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_gestaffelt_vertrauensschutz.look_up(birth_month_since_ad) @@ -199,7 +199,7 @@ def altersgrenze_mit_vertrauensschutz( start_date="1989-12-18", end_date="1996-09-26", leaf_name="altersgrenze_vorzeitig_ohne_vertrauensschutz", - unit=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( geburtsjahr: int, @@ -213,9 +213,9 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -225,7 +225,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=Unit.YEARS, + unit=TTSIMUnit.YEARS, ) def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( geburtsjahr: int, @@ -239,9 +239,9 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( Does not check for eligibility for this pathway into retirement. """ birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, Unit.YEARS)) - + cast_unit(geburtsmonat - 1, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) + + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -250,7 +250,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( @policy_function( end_date="2007-04-29", leaf_name="grundsätzlich_anspruchsberechtigt", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_ohne_prüfung_geburtsjahr( arbeitslos_für_1_jahr_nach_alter_58_ein_halb: bool, @@ -276,7 +276,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=Unit.DIMENSIONLESS, + 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 7becbb95f7..936129bf9b 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitrag.py @@ -2,13 +2,13 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="1999-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_bis_03_1999( betrag_versicherter_regulärer_beitragssatz_m: float, @@ -21,7 +21,7 @@ def betrag_versicherter_m_bis_03_1999( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_ohne_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -43,7 +43,7 @@ def betrag_versicherter_m_ohne_midijob( @policy_function( start_date="2003-04-01", leaf_name="betrag_versicherter_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_versicherter_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -68,7 +68,7 @@ def betrag_versicherter_m_mit_midijob( return out -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def betrag_versicherter_regulärer_beitragssatz_m( einkommen_m: float, beitragssatz: float, @@ -80,7 +80,7 @@ def betrag_versicherter_regulärer_beitragssatz_m( @policy_function( end_date="1999-03-31", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_ohne_arbeitgeberpauschale( betrag_versicherter_regulärer_beitragssatz_m: float, @@ -96,7 +96,7 @@ def betrag_arbeitgeber_m_ohne_arbeitgeberpauschale( start_date="1999-04-01", end_date="2003-03-31", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( sozialversicherung__geringfügig_beschäftigt: bool, @@ -120,7 +120,7 @@ def betrag_arbeitgeber_m_mit_arbeitgeberpauschale( @policy_function( start_date="2003-04-01", leaf_name="betrag_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_arbeitgeber_m_mit_midijob( sozialversicherung__geringfügig_beschäftigt: bool, @@ -144,7 +144,7 @@ def betrag_arbeitgeber_m_mit_midijob( return out -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def einkommen_m( einnahmen__bruttolohn_m: float, beitragsbemessungsgrenze_m: float, @@ -160,7 +160,7 @@ def einkommen_m( start_date="1990-01-01", end_date="2024-12-31", leaf_name="beitragsbemessungsgrenze_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def beitragsbemessungsgrenze_m_nach_wohnort( wohnort_ost_hh: bool, @@ -174,7 +174,7 @@ def beitragsbemessungsgrenze_m_nach_wohnort( ) -@policy_function(start_date="2003-04-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -189,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_in_gleitzone_arbeitgeber_m_mit_festem_beitragssatz( einnahmen__bruttolohn_m: float, @@ -202,7 +202,7 @@ def betrag_in_gleitzone_arbeitgeber_m_mit_festem_beitragssatz( @policy_function( start_date="2022-10-01", leaf_name="betrag_in_gleitzone_arbeitgeber_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_in_gleitzone_arbeitgeber_m_als_differenz_von_gesamt_und_arbeitnehmerbeitrag( betrag_in_gleitzone_gesamt_m: float, @@ -216,7 +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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_in_gleitzone_arbeitnehmer_m_als_differenz_von_gesamt_und_arbeitgeberbeitrag( betrag_in_gleitzone_arbeitgeber_m: float, @@ -229,7 +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=Unit.CURRENCY.PER_MONTH, + 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/entgeltpunkte.py b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py index 9cc61aa28d..9e47e1bc02 100644 --- a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py +++ b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.py @@ -1,12 +1,12 @@ from __future__ import annotations -from gettsim.tt import Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( end_date="2024-12-31", leaf_name="neue_entgeltpunkte_y", - unit=Unit.DIMENSIONLESS.PER_YEAR, + unit=TTSIMUnit.DIMENSIONLESS.PER_YEAR, ) def neue_entgeltpunkte_nach_wohnort( einnahmen__bruttolohn_y: float, @@ -39,7 +39,7 @@ def neue_entgeltpunkte_nach_wohnort( @policy_function( start_date="2025-01-01", leaf_name="neue_entgeltpunkte_y", - unit=Unit.DIMENSIONLESS.PER_YEAR, + unit=TTSIMUnit.DIMENSIONLESS.PER_YEAR, ) def neue_entgeltpunkte_einheitlich( einnahmen__bruttolohn_y: float, @@ -62,7 +62,7 @@ def neue_entgeltpunkte_einheitlich( start_date="1992-01-01", end_date="2023-06-30", leaf_name="rentenwert_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def rentenwert_nach_wohnort( wohnort_ost_hh: bool, diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py index 4fb289722e..84c3d5b767 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py @@ -6,7 +6,7 @@ from ttsim.unit_converters import m_to_y, y_to_m -from gettsim.tt import Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function if TYPE_CHECKING: from gettsim.tt import ConsecutiveIntLookupTableParamValue @@ -16,7 +16,7 @@ start_date="2001-01-01", end_date="2023-06-30", leaf_name="betrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_nach_wohnort( zugangsfaktor: float, @@ -50,7 +50,7 @@ def betrag_m_nach_wohnort( @policy_function( - start_date="2023-07-01", leaf_name="betrag_m", unit=Unit.CURRENCY.PER_MONTH + start_date="2023-07-01", leaf_name="betrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def betrag_m_einheitlich( zugangsfaktor: float, @@ -75,7 +75,7 @@ def betrag_m_einheitlich( return out -@policy_function(start_date="2001-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2001-01-01", unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( voll_erwerbsgemindert: bool, teilweise_erwerbsgemindert: bool, @@ -97,7 +97,7 @@ def grundsätzlich_anspruchsberechtigt( @policy_function( - start_date="2001-01-01", end_date="2023-06-30", unit=Unit.DIMENSIONLESS + start_date="2001-01-01", end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS ) def entgeltpunkte_west( sozialversicherung__rente__entgeltpunkte_west: float, @@ -116,7 +116,7 @@ def entgeltpunkte_west( @policy_function( - start_date="2001-01-01", end_date="2023-06-30", unit=Unit.DIMENSIONLESS + start_date="2001-01-01", end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS ) def entgeltpunkte_ost( sozialversicherung__rente__entgeltpunkte_ost: float, @@ -136,7 +136,7 @@ def entgeltpunkte_ost( ) -@policy_function(start_date="2023-07-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2023-07-01", unit=TTSIMUnit.DIMENSIONLESS) def entgeltpunkte( sozialversicherung__rente__entgeltpunkte: float, zusätzliche_entgeltpunkte_durch_zurechnungszeit: float, @@ -159,7 +159,7 @@ def entgeltpunkte( start_date="2000-12-23", end_date="2014-06-30", leaf_name="zusätzliche_entgeltpunkte_durch_zurechnungszeit", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_bis_06_2014( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -177,9 +177,11 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren year between their age of retirement and the "Zurechnungszeitgrenze". """ claiming_month_since_ad = cast_unit( - y_to_m(cast_unit(sozialversicherung__rente__jahr_renteneintritt, Unit.YEARS)) - + cast_unit(sozialversicherung__rente__monat_renteneintritt, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m( + cast_unit(sozialversicherung__rente__jahr_renteneintritt, TTSIMUnit.YEARS) + ) + + cast_unit(sozialversicherung__rente__monat_renteneintritt, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) altersgrenze_zurechnungszeit = zurechnungszeitgrenze_gestaffelt.look_up( claiming_month_since_ad @@ -188,7 +190,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren cast_unit( altersgrenze_zurechnungszeit - sozialversicherung__rente__alter_bei_renteneintritt, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) * mean_entgeltpunkte_pro_bewertungsmonat ) @@ -198,7 +200,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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgrenze( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -216,7 +218,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre return ( cast_unit( zurechnungszeitgrenze - sozialversicherung__rente__alter_bei_renteneintritt, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) * mean_entgeltpunkte_pro_bewertungsmonat ) @@ -225,7 +227,7 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre @policy_function( start_date="2017-07-17", leaf_name="zusätzliche_entgeltpunkte_durch_zurechnungszeit", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgrenze_ab_07_2017( mean_entgeltpunkte_pro_bewertungsmonat: float, @@ -243,9 +245,11 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren year between their age of retirement and the "Zurechnungszeitgrenze". """ claiming_month_since_ad = cast_unit( - y_to_m(cast_unit(sozialversicherung__rente__jahr_renteneintritt, Unit.YEARS)) - + cast_unit(sozialversicherung__rente__monat_renteneintritt, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m( + cast_unit(sozialversicherung__rente__jahr_renteneintritt, TTSIMUnit.YEARS) + ) + + cast_unit(sozialversicherung__rente__monat_renteneintritt, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) altersgrenze_zurechnungszeit = zurechnungszeitgrenze_gestaffelt.look_up( claiming_month_since_ad @@ -254,13 +258,13 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren cast_unit( altersgrenze_zurechnungszeit - sozialversicherung__rente__alter_bei_renteneintritt, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) * mean_entgeltpunkte_pro_bewertungsmonat ) -@policy_function(start_date="2001-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2001-01-01", unit=TTSIMUnit.DIMENSIONLESS) def rentenartfaktor( teilweise_erwerbsgemindert: bool, parameter_rentenartfaktor: dict[str, float], @@ -276,7 +280,7 @@ def rentenartfaktor( @policy_function( - end_date="2011-12-31", leaf_name="zugangsfaktor", unit=Unit.DIMENSIONLESS + end_date="2011-12-31", leaf_name="zugangsfaktor", unit=TTSIMUnit.DIMENSIONLESS ) def zugangsfaktor_ohne_gestaffelte_altersgrenze( sozialversicherung__rente__alter_bei_renteneintritt: float, @@ -308,7 +312,7 @@ def zugangsfaktor_ohne_gestaffelte_altersgrenze( @policy_function( - start_date="2012-01-01", leaf_name="zugangsfaktor", unit=Unit.DIMENSIONLESS + start_date="2012-01-01", leaf_name="zugangsfaktor", unit=TTSIMUnit.DIMENSIONLESS ) def zugangsfaktor_mit_gestaffelter_altersgrenze( sozialversicherung__rente__alter_bei_renteneintritt: float, @@ -336,9 +340,11 @@ def zugangsfaktor_mit_gestaffelter_altersgrenze( Berücksichtigungszeiten and certain Anrechnungszeiten or Ersatzzeiten). """ claiming_month_since_ad = cast_unit( - y_to_m(cast_unit(sozialversicherung__rente__jahr_renteneintritt, Unit.YEARS)) - + cast_unit(sozialversicherung__rente__monat_renteneintritt, Unit.MONTHS), - Unit.CALENDAR_MONTH, + y_to_m( + cast_unit(sozialversicherung__rente__jahr_renteneintritt, TTSIMUnit.YEARS) + ) + + cast_unit(sozialversicherung__rente__monat_renteneintritt, TTSIMUnit.MONTHS), + TTSIMUnit.CALENDAR_MONTH, ) if wartezeit_langjährig_versichert_erfüllt: @@ -360,7 +366,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", unit=Unit.DIMENSIONLESS) +@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, @@ -403,7 +409,7 @@ def wartezeit_langjährig_versichert_erfüllt( ) -@policy_function(end_date="2023-06-30", unit=Unit.DIMENSIONLESS) +@policy_function(end_date="2023-06-30", unit=TTSIMUnit.DIMENSIONLESS) def anteil_entgeltpunkte_ost( sozialversicherung__rente__entgeltpunkte_west: float, sozialversicherung__rente__entgeltpunkte_ost: float, @@ -426,7 +432,7 @@ def anteil_entgeltpunkte_ost( @policy_function( end_date="2023-06-30", leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( sozialversicherung__rente__entgeltpunkte_west: float, @@ -446,7 +452,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( belegungsfähiger_gesamtzeitraum = cast_unit( sozialversicherung__rente__alter_bei_renteneintritt - altersgrenze_grundbewertung, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) return ( @@ -458,7 +464,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( @policy_function( start_date="2023-07-01", leaf_name="mean_entgeltpunkte_pro_bewertungsmonat", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( sozialversicherung__rente__entgeltpunkte: float, @@ -477,7 +483,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( belegungsfähiger_gesamtzeitraum = cast_unit( sozialversicherung__rente__alter_bei_renteneintritt - altersgrenze_grundbewertung, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) return sozialversicherung__rente__entgeltpunkte / belegungsfähiger_gesamtzeitraum diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/inputs.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/inputs.py index b68195d64c..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@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(unit=Unit.DIMENSIONLESS) +@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/grundrente/grundrente.py b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py index dabfcd82e3..d2e71c4d64 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py @@ -5,7 +5,7 @@ from gettsim.tt import ( PiecewisePolynomialParamValue, RoundingSpec, - Unit, + TTSIMUnit, cast_unit, piecewise_polynomial, policy_function, @@ -17,13 +17,13 @@ @policy_function( rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m(basisbetrag_m: float, anzurechnendes_einkommen_m: float) -> float: """Additional monthly pensions payments (Grundrentenzuschlag).""" @@ -31,7 +31,7 @@ def betrag_m(basisbetrag_m: float, anzurechnendes_einkommen_m: float) -> float: return max(out, 0.0) -@policy_function(start_date="2021-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -83,13 +83,13 @@ def _anzurechnendes_einkommen_m( @policy_function( verify_units=False, rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def anzurechnendes_einkommen_m( einkommen_m_ehe: float, @@ -131,13 +131,13 @@ def anzurechnendes_einkommen_m( @policy_function( rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=0.01, direction="nearest", reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def basisbetrag_m( mean_entgeltpunkte_zuschlag_m: float, @@ -169,7 +169,7 @@ def basisbetrag_m( ) -@policy_function(start_date="2021-01-01", unit=Unit.DIMENSIONLESS.PER_MONTH) +@policy_function(start_date="2021-01-01", unit=TTSIMUnit.DIMENSIONLESS.PER_MONTH) def mean_entgeltpunkte_pro_bewertungsmonat_m( mean_entgeltpunkte: float, bewertungszeiten_monate: int, @@ -192,7 +192,7 @@ def mean_entgeltpunkte_pro_bewertungsmonat_m( reference="§76g SGB VI Abs. 4 Nr. 4", ), start_date="2021-01-01", - unit=Unit.DIMENSIONLESS.PER_MONTH, + unit=TTSIMUnit.DIMENSIONLESS.PER_MONTH, ) def höchstbetrag_m( grundrentenzeiten_monate: int, @@ -213,8 +213,8 @@ def höchstbetrag_m( return cast_unit( höchstwert_der_entgeltpunkte["base"] + höchstwert_der_entgeltpunkte["increment"] - * cast_unit(months_above_thresh, Unit.DIMENSIONLESS), - Unit.DIMENSIONLESS.PER_MONTH, + * cast_unit(months_above_thresh, TTSIMUnit.DIMENSIONLESS), + TTSIMUnit.DIMENSIONLESS.PER_MONTH, ) @@ -225,7 +225,7 @@ def höchstbetrag_m( reference="§ 123 SGB VI Abs. 1", ), start_date="2021-01-01", - unit=Unit.DIMENSIONLESS.PER_MONTH, + unit=TTSIMUnit.DIMENSIONLESS.PER_MONTH, ) def mean_entgeltpunkte_zuschlag_m( mean_entgeltpunkte_pro_bewertungsmonat_m: float, @@ -263,7 +263,7 @@ def mean_entgeltpunkte_zuschlag_m( return out * bonusfaktor -@policy_function(start_date="2021-01-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2021-01-01", unit=TTSIMUnit.DIMENSIONLESS) def grundsätzlich_anspruchsberechtigt( grundrentenzeiten_monate: int, berücksichtigte_wartezeit_monate: dict[str, int], @@ -272,7 +272,7 @@ def grundsätzlich_anspruchsberechtigt( return grundrentenzeiten_monate >= berücksichtigte_wartezeit_monate["min"] -@policy_function(start_date="2021-01-01", unit=Unit.CURRENCY.PER_MONTH) +@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 cf9756db19..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(start_date="2021-01-01", unit=Unit.MONTHS) +@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", unit=Unit.MONTHS) +@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", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.CURRENCY.PER_MONTH) +@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", unit=Unit.CURRENCY.PER_YEAR) +@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", unit=Unit.CURRENCY.PER_YEAR) +@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", unit=Unit.CURRENCY.PER_YEAR) +@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", unit=Unit.CURRENCY.PER_YEAR) +@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/inputs.py b/src/gettsim/germany/sozialversicherung/rente/inputs.py index d7b2cd9563..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def bezieht_rente() -> bool: """Draws public pension benefits.""" -@policy_input(end_date="2023-06-30", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@policy_input(start_date="2023-07-01", unit=TTSIMUnit.DIMENSIONLESS) def entgeltpunkte() -> float: """Earnings points for public pension claim.""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def ersatzzeiten_monate() -> float: """Total months during military, persecution/escape, internment, and consecutive sickness. """ -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def freiwillige_beitragsmonate() -> float: """Total months of voluntary pensioninsurance contributions.""" -@policy_input(unit=Unit.CALENDAR_YEAR) +@policy_input(unit=TTSIMUnit.CALENDAR_YEAR) def jahr_renteneintritt() -> int: """Year of pension claiming.""" -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) def monat_renteneintritt() -> int: """Month of retirement.""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def kinderberücksichtigungszeiten_monate() -> float: """Total months of childcare till age 10.""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def krankheitszeiten_ab_16_bis_24_monate() -> float: """Total months of sickness between age 16 and 24.""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def monate_geringfügiger_beschäftigung() -> float: """Total months of marginal employment (w/o mandatory contributions).""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_arbeitslosigkeit() -> float: """Total months of unemployment (registered).""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_arbeitsunfähigkeit() -> float: """Total months of sickness, rehabilitation, measures for worklife participation(Teilhabe). """ -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_ausbildungssuche() -> float: """Total months of apprenticeship search.""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_mutterschutz() -> float: """Total months of maternal protections.""" -@policy_input(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def monate_in_schulausbildung() -> float: """Months of schooling (incl college, unifrom age 17, max. 8 years).""" -@policy_input(unit=Unit.MONTHS) +@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(unit=Unit.MONTHS) +@policy_input(unit=TTSIMUnit.MONTHS) def pflichtbeitragsmonate() -> float: """Total months of mandatory pension insurance contributions.""" -@policy_input(unit=Unit.MONTHS) +@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/wartezeit.py b/src/gettsim/germany/sozialversicherung/rente/wartezeit.py index de0b025ef3..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 Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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(unit=Unit.DIMENSIONLESS) +@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", unit=Unit.DIMENSIONLESS) +@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(unit=Unit.MONTHS) +@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", unit=Unit.MONTHS) +@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/unterhalt/inputs.py b/src/gettsim/germany/unterhalt/inputs.py index 44326b414a..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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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(unit=Unit.CURRENCY.PER_MONTH) +@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 d35c840c6f..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 Unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@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/unterhaltsvorschuss/unterhaltsvorschuss.py b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py index 99688bec28..92929aedac 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py @@ -12,7 +12,7 @@ AggType, ConsecutiveIntLookupTableParamValue, RoundingSpec, - Unit, + TTSIMUnit, agg_by_p_id_function, cast_unit, join, @@ -26,7 +26,7 @@ from gettsim.typing import BoolColumn, IntColumn, RawParamValue -@agg_by_p_id_function(agg_type=AggType.SUM, unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -38,12 +38,12 @@ def an_elternteil_auszuzahlender_betrag_m( @policy_function( start_date="2009-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH, base=1, direction="up", reference="§ 9 Abs. 3 UhVorschG", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m( unterhalt__tatsächlich_erhaltener_betrag_m: float, @@ -75,7 +75,7 @@ def betrag_m( return out -@policy_function(vectorization_strategy="not_required", unit=Unit.DIMENSIONLESS) +@policy_function(vectorization_strategy="not_required", unit=TTSIMUnit.DIMENSIONLESS) def elternteil_alleinerziehend( kindergeld__p_id_empfänger: IntColumn, p_id: IntColumn, @@ -100,13 +100,13 @@ def elternteil_alleinerziehend( end_date="2008-12-31", leaf_name="betrag_m", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + 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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def betrag_m_bis_2008() -> float: pass @@ -115,7 +115,7 @@ def betrag_m_bis_2008() -> float: @param_function( start_date="2023-01-01", leaf_name="kindergeld_erstes_kind_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeld_erstes_kind_ohne_staffelung_m( kindergeld__satz: float, @@ -127,14 +127,14 @@ def kindergeld_erstes_kind_ohne_staffelung_m( @param_function( end_date="2022-12-31", leaf_name="kindergeld_erstes_kind_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def kindergeld_erstes_kind_gestaffelt_m( kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, ) -> float: """Kindergeld for first child when Kindergeld depends on number of children.""" return cast_unit( - kindergeld__satz_nach_anzahl_kinder.look_up(1), Unit.CURRENCY.PER_MONTH + kindergeld__satz_nach_anzahl_kinder.look_up(1), TTSIMUnit.CURRENCY.PER_MONTH ) @@ -142,7 +142,7 @@ def kindergeld_erstes_kind_gestaffelt_m( start_date="2009-01-01", end_date="2014-12-31", leaf_name="anspruchshöhe_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, # Plucks age bounds off a dict-of-dataclass parameter the dry-run cannot follow. verify_units=False, ) @@ -194,7 +194,7 @@ def unterhaltsvorschuss_anspruch_m_2009_bis_2014( start_date="2015-01-01", end_date="2015-12-31", leaf_name="anspruchshöhe_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, # Plucks age bounds off a dict-of-dataclass parameter the dry-run cannot follow. verify_units=False, ) @@ -229,7 +229,7 @@ def anspruchshöhe_m_anwendungsvors( start_date="2016-01-01", end_date="2017-06-30", leaf_name="anspruchshöhe_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, # Plucks age bounds and Satz off a dict-of-dataclass parameter the dry-run # cannot follow through the dict subscript. verify_units=False, @@ -266,7 +266,7 @@ def anspruchshöhe_m_2016_bis_2017_06( @policy_function( start_date="2017-07-01", leaf_name="anspruchshöhe_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, # Plucks age bounds and Satz off a dict-of-dataclass parameter, which the # dry-run cannot follow through the dict subscript. verify_units=False, @@ -307,7 +307,7 @@ def anspruchshöhe_m_ab_2017_07( @policy_function( start_date="2017-07-01", vectorization_strategy="not_required", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def elternteil_mindesteinkommen_erreicht( kindergeld__p_id_empfänger: IntColumn, @@ -327,7 +327,7 @@ def elternteil_mindesteinkommen_erreicht( ) -@policy_function(start_date="2017-07-01", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2017-07-01", unit=TTSIMUnit.DIMENSIONLESS) def mindesteinkommen_erreicht( einkommen_m: float, mindesteinkommen: float, @@ -336,7 +336,7 @@ def mindesteinkommen_erreicht( return einkommen_m >= mindesteinkommen -@policy_function(start_date="2017-07-01", unit=Unit.CURRENCY.PER_MONTH) +@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, 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 ca74009312..99697f96a6 100644 --- "a/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" +++ "b/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" @@ -3,14 +3,14 @@ from __future__ import annotations from gettsim.germany import WARNING_MSG_FOR_GETTSIM_BG_ID_WTHH_ID_ETC -from gettsim.tt import Unit, cast_unit, 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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( arbeitslosengeld_2__regelbedarf_m_bg: float, @@ -29,10 +29,10 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( # The check assumes WTHH = BG, so compare BG-level resources against the BG need. return cast_unit( arbeitslosengeld_2__anzurechnendes_einkommen_m_bg - + cast_unit(wohngeld__anspruchshöhe_m_wthh, Unit.CURRENCY.PER_MONTH.PER_BG) + + cast_unit(wohngeld__anspruchshöhe_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg >= arbeitslosengeld_2__regelbedarf_m_bg, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) @@ -40,7 +40,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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( bürgergeld__regelbedarf_m_bg: float, @@ -59,8 +59,8 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( # The check assumes WTHH = BG, so compare BG-level resources against the BG need. return cast_unit( bürgergeld__anzurechnendes_einkommen_m_bg - + cast_unit(wohngeld__anspruchshöhe_m_wthh, Unit.CURRENCY.PER_MONTH.PER_BG) + + cast_unit(wohngeld__anspruchshöhe_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg >= bürgergeld__regelbedarf_m_bg, - Unit.DIMENSIONLESS, + TTSIMUnit.DIMENSIONLESS, ) diff --git a/src/gettsim/germany/wohnen/inputs.py b/src/gettsim/germany/wohnen/inputs.py index 98c7673dfb..0c3888f15c 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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2008-12-31", unit=Unit.CALENDAR_YEAR) +@policy_input(end_date="2008-12-31", unit=TTSIMUnit.CALENDAR_YEAR) def baujahr_immobilie_hh() -> int: """Year of construction of the household dwelling.""" -@policy_input(start_date="2005-01-01", unit=Unit.DIMENSIONLESS) +@policy_input(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def bewohnt_eigentum_hh() -> bool: """Owner-occupied housing.""" -@policy_input(unit=Unit.CURRENCY.PER_MONTH) +@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", unit=Unit.CURRENCY.PER_MONTH) +@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", unit=Unit.SQUARE_METER) +@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 17a13f7902..de54874e04 100644 --- a/src/gettsim/germany/wohngeld/einkommen.py +++ b/src/gettsim/germany/wohngeld/einkommen.py @@ -11,7 +11,7 @@ AggType, ConsecutiveIntLookupTableParamValue, PiecewisePolynomialParamValue, - Unit, + TTSIMUnit, agg_by_p_id_function, get_consecutive_int_lookup_table_param_value, param_function, @@ -26,7 +26,7 @@ @agg_by_p_id_function( - agg_type=AggType.SUM, end_date="2015-12-31", unit=Unit.PERSON_COUNT + agg_type=AggType.SUM, end_date="2015-12-31", unit=TTSIMUnit.PERSON_COUNT ) def alleinerziehendenbonus( kindergeld__kind_bis_10_mit_kindergeld: bool, @@ -46,7 +46,7 @@ def min_einkommen_lookup_table( @policy_function( - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, # Clamps the look-up index with a raw `xnp` op reading the table's `.shape`, # which the dry-run cannot evaluate symbolically. verify_units=False, @@ -73,7 +73,7 @@ def einkommen_m_wthh( return xnp.maximum(einkommen_ohne_freibetrag, mindesteinkommen) -@policy_function(verify_units=False, unit=Unit.DIMENSIONLESS) +@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, @@ -100,7 +100,7 @@ def abzugsanteil_vom_einkommen_für_steuern_sozialversicherung( @policy_function( end_date="2006-12-31", leaf_name="einkommen_vor_freibetrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_vor_freibetrag_m_ohne_elterngeld( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -142,7 +142,7 @@ def einkommen_vor_freibetrag_m_ohne_elterngeld( @policy_function( start_date="2007-01-01", leaf_name="einkommen_vor_freibetrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_vor_freibetrag_m_mit_elterngeld( einkommensteuer__einkünfte__aus_selbstständiger_arbeit__betrag_m: float, @@ -188,7 +188,7 @@ def einkommen_vor_freibetrag_m_mit_elterngeld( @policy_function( - end_date="2015-12-31", leaf_name="freibetrag_m", unit=Unit.CURRENCY.PER_MONTH + end_date="2015-12-31", leaf_name="freibetrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def freibetrag_m_bis_2015( einnahmen__bruttolohn_m: float, @@ -229,7 +229,7 @@ def freibetrag_m_bis_2015( start_date="2016-01-01", end_date="2020-12-31", leaf_name="freibetrag_m", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def freibetrag_m_ab_2016_bis_2020( einnahmen__bruttolohn_m: float, @@ -258,7 +258,7 @@ def freibetrag_m_ab_2016_bis_2020( @policy_function( - start_date="2021-01-01", leaf_name="freibetrag_m", unit=Unit.CURRENCY.PER_MONTH + start_date="2021-01-01", leaf_name="freibetrag_m", unit=TTSIMUnit.CURRENCY.PER_MONTH ) def freibetrag_m_ab_2021( einnahmen__bruttolohn_m: float, @@ -317,7 +317,7 @@ def freibetrag_m_ab_2021( return freibetrag_bei_behinderung + freibetrag_kinder + freibetrag_grundrente -@policy_function(unit=Unit.DIMENSIONLESS) +@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/inputs.py b/src/gettsim/germany/wohngeld/inputs.py index 0637f1c036..12ee6848e1 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 Unit, policy_input +from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=Unit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.DIMENSIONLESS) 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 976a38c560..2c2a6e0e79 100644 --- a/src/gettsim/germany/wohngeld/miete.py +++ b/src/gettsim/germany/wohngeld/miete.py @@ -8,7 +8,7 @@ from gettsim.tt import ( UNSET_UNIT, ConsecutiveIntLookupTableParamValue, - Unit, + TTSIMUnit, cast_unit, get_consecutive_int_lookup_table_param_value, param_function, @@ -166,7 +166,7 @@ def klimakomponente_m_lookup( return get_consecutive_int_lookup_table_param_value(raw=expanded, xnp=xnp) # ty: ignore[invalid-argument-type] -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def miete_m_wthh( miete_m_hh: float, anzahl_personen_wthh: int, @@ -177,18 +177,19 @@ def miete_m_wthh( """ return cast_unit( miete_m_hh * (anzahl_personen_wthh / anzahl_personen_hh), - Unit.CURRENCY.PER_MONTH, + TTSIMUnit.CURRENCY.PER_MONTH, ) -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH) def min_miete_m_hh( anzahl_personen_hh: int, min_miete_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Minimum rent considered in Wohngeld calculation.""" return cast_unit( - min_miete_lookup.look_up(anzahl_personen_hh), Unit.CURRENCY.PER_MONTH + min_miete_lookup.look_up(anzahl_personen_hh), + TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) @@ -196,7 +197,7 @@ def min_miete_m_hh( start_date="1984-01-01", end_date="2008-12-31", leaf_name="miete_m_hh", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, # Three input axes with different units resolved via `xnp.searchsorted`, which # the dry-run cannot evaluate symbolically. verify_units=False, @@ -226,7 +227,7 @@ def miete_m_hh_mit_baujahr( start_date="2009-01-01", end_date="2020-12-31", leaf_name="miete_m_hh", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_ohne_baujahr_ohne_heizkostenentlastung( mietstufe_hh: int, @@ -236,8 +237,11 @@ def miete_m_hh_ohne_baujahr_ohne_heizkostenentlastung( max_miete_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - anzahl_personen = cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) - max_miete_m = max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh) + anzahl_personen = cast_unit(anzahl_personen_hh, TTSIMUnit.DIMENSIONLESS) + max_miete_m = cast_unit( + max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh), + TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, + ) return max(min(wohnen__bruttokaltmiete_m_hh, max_miete_m), min_miete_m_hh) @@ -246,7 +250,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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_mit_heizkostenentlastung( mietstufe_hh: int, @@ -257,8 +261,11 @@ def miete_m_hh_mit_heizkostenentlastung( heizkostenentlastung_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - anzahl_personen = cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) - max_miete_m = max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh) + anzahl_personen = cast_unit(anzahl_personen_hh, TTSIMUnit.DIMENSIONLESS) + max_miete_m = cast_unit( + max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh), + TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, + ) heating_allowance_m = heizkostenentlastung_m_lookup.look_up(anzahl_personen) @@ -271,7 +278,7 @@ def miete_m_hh_mit_heizkostenentlastung( @policy_function( start_date="2023-01-01", leaf_name="miete_m_hh", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, ) def miete_m_hh_mit_heizkostenentlastung_dauerhafte_heizkostenkomponente_klimakomponente( mietstufe_hh: int, @@ -284,8 +291,11 @@ def miete_m_hh_mit_heizkostenentlastung_dauerhafte_heizkostenkomponente_klimakom klimakomponente_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - anzahl_personen = cast_unit(anzahl_personen_hh, Unit.DIMENSIONLESS) - max_miete_m = max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh) + anzahl_personen = cast_unit(anzahl_personen_hh, TTSIMUnit.DIMENSIONLESS) + max_miete_m = cast_unit( + max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh), + TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, + ) heizkostenentlastung = heizkostenentlastung_m_lookup.look_up(anzahl_personen) dauerhafte_heizkostenkomponente = dauerhafte_heizkostenkomponente_m_lookup.look_up( diff --git a/src/gettsim/germany/wohngeld/miete.yaml b/src/gettsim/germany/wohngeld/miete.yaml index 2bc8a423e1..5ca35c2537 100644 --- a/src/gettsim/germany/wohngeld/miete.yaml +++ b/src/gettsim/germany/wohngeld/miete.yaml @@ -1430,7 +1430,7 @@ raw_heizkostenentlastung_m: Amount of relief in heating costs due to CO2 pricing in Euro depending on household size input_unit: DIMENSIONLESS - output_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH_PER_HH type: require_converter 2021-01-01: reference: §12 (6) WoGG, Art. 1 G. v. 15.05.2020, BGBl I S. 1015. @@ -1452,7 +1452,7 @@ raw_dauerhafte_heizkostenkomponente_m: Permanent heating cost component depending on household size introduced with the housing subsidy reform 2023 input_unit: DIMENSIONLESS - output_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH_PER_HH type: require_converter 2023-01-01: reference: Art. 1 G. v. 08.12.2022 BGBl. I Nr. 48 S. 2160 @@ -1476,7 +1476,7 @@ raw_klimakomponente_m: amounts pursuant to § 12 (1) in Euro depending on the size of the household; introduced with the housing subsidy reform 2023 input_unit: DIMENSIONLESS - output_unit: EUR_PER_MONTH + output_unit: EUR_PER_MONTH_PER_HH 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 bd33d9cf64..25c908d5c5 100644 --- a/src/gettsim/germany/wohngeld/voraussetzungen.py +++ b/src/gettsim/germany/wohngeld/voraussetzungen.py @@ -2,14 +2,14 @@ from __future__ import annotations -from gettsim.tt import Unit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, cast_unit, policy_function @policy_function( start_date="2005-01-01", end_date="2008-12-31", leaf_name="grundsätzlich_anspruchsberechtigt_wthh", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_wthh_ohne_vermögensprüfung( mindesteinkommen_erreicht_wthh: bool, @@ -21,7 +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=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def grundsätzlich_anspruchsberechtigt_wthh_mit_vermögensprüfung( mindesteinkommen_erreicht_wthh: bool, @@ -31,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", unit=Unit.DIMENSIONLESS) +@policy_function(start_date="2009-01-01", unit=TTSIMUnit.DIMENSIONLESS) def vermögensgrenze_unterschritten_wthh( vermögen_wthh: float, anzahl_personen_wthh: int, @@ -41,17 +41,17 @@ def vermögensgrenze_unterschritten_wthh( vermögensfreibetrag = parameter_vermögensfreibetrag[ "grundfreibetrag" ] + parameter_vermögensfreibetrag["je_weitere_person"] * ( - cast_unit(anzahl_personen_wthh, Unit.DIMENSIONLESS) - 1 + cast_unit(anzahl_personen_wthh, TTSIMUnit.DIMENSIONLESS) - 1 ) - return cast_unit(vermögen_wthh, Unit.CURRENCY) <= vermögensfreibetrag + return cast_unit(vermögen_wthh, TTSIMUnit.CURRENCY) <= vermögensfreibetrag @policy_function( leaf_name="mindesteinkommen_erreicht_wthh", start_date="2005-01-01", end_date="2022-12-31", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def mindesteinkommen_erreicht_wthh_bis_2022( arbeitslosengeld_2__regelbedarf_m_wthh: float, @@ -70,14 +70,14 @@ def mindesteinkommen_erreicht_wthh_bis_2022( """ return einkommen_für_mindesteinkommen_m_wthh >= cast_unit( - arbeitslosengeld_2__regelbedarf_m_wthh, Unit.CURRENCY.PER_MONTH + arbeitslosengeld_2__regelbedarf_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH ) @policy_function( leaf_name="mindesteinkommen_erreicht_wthh", start_date="2023-01-01", - unit=Unit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS, ) def mindesteinkommen_erreicht_wthh_ab_2023( bürgergeld__regelbedarf_m_wthh: float, @@ -96,7 +96,7 @@ def mindesteinkommen_erreicht_wthh_ab_2023( """ return einkommen_für_mindesteinkommen_m_wthh >= cast_unit( - bürgergeld__regelbedarf_m_wthh, Unit.CURRENCY.PER_MONTH + bürgergeld__regelbedarf_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH ) @@ -104,7 +104,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=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_für_mindesteinkommen_m_wthh_bis_2022( arbeitslosengeld_2__nettoeinkommen_vor_abzug_freibetrag_m_wthh: float, @@ -130,15 +130,15 @@ def einkommen_für_mindesteinkommen_m_wthh_bis_2022( + unterhaltsvorschuss__betrag_m_wthh + kindergeld__betrag_m_wthh + kinderzuschlag__anspruchshöhe_m_wthh - + cast_unit(basisbetrag_m_wthh, Unit.CURRENCY.PER_MONTH.PER_WTHH), - Unit.CURRENCY.PER_MONTH, + + basisbetrag_m_wthh, + TTSIMUnit.CURRENCY.PER_MONTH, ) @policy_function( leaf_name="einkommen_für_mindesteinkommen_m_wthh", start_date="2023-01-01", - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def einkommen_für_mindesteinkommen_m_wthh_ab_2023( bürgergeld__nettoeinkommen_vor_abzug_freibetrag_m_wthh: float, @@ -164,6 +164,6 @@ def einkommen_für_mindesteinkommen_m_wthh_ab_2023( + unterhaltsvorschuss__betrag_m_wthh + kindergeld__betrag_m_wthh + kinderzuschlag__anspruchshöhe_m_wthh - + cast_unit(basisbetrag_m_wthh, Unit.CURRENCY.PER_MONTH.PER_WTHH), - Unit.CURRENCY.PER_MONTH, + + basisbetrag_m_wthh, + TTSIMUnit.CURRENCY.PER_MONTH, ) diff --git a/src/gettsim/germany/wohngeld/wohngeld.py b/src/gettsim/germany/wohngeld/wohngeld.py index 0f6d775765..41f53a94cf 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.py +++ b/src/gettsim/germany/wohngeld/wohngeld.py @@ -13,7 +13,7 @@ UNSET_UNIT, AggType, RoundingSpec, - Unit, + TTSIMUnit, agg_by_group_function, get_consecutive_int_lookup_table_param_value, param_function, @@ -26,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(unit=Unit.CURRENCY.PER_MONTH) +@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, @@ -43,7 +43,7 @@ def betrag_m_wthh( return 0.0 -@policy_function(unit=Unit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def anspruchshöhe_m_wthh( basisbetrag_m_wthh: float, grundsätzlich_anspruchsberechtigt_wthh: bool, @@ -59,12 +59,12 @@ def anspruchshöhe_m_wthh( leaf_name="basisbetrag_m_wthh", end_date="2000-12-31", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_MONTH, + unit=TTSIMUnit.DM.PER_MONTH.PER_WTHH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, # Quadratic in (Miete, Einkommen); its per-currency coefficients are not # spellable in the unit grammar (GEP 10 D1). verify_units=False, @@ -96,12 +96,12 @@ def basisbetrag_m_wthh_bis_2000( start_date="2001-01-01", end_date="2001-12-31", rounding_spec=RoundingSpec( - unit=Unit.DM.PER_MONTH, + unit=TTSIMUnit.DM.PER_MONTH.PER_WTHH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, # Quadratic in (Miete, Einkommen); its per-currency coefficients are not # spellable in the unit grammar (GEP 10 D1). verify_units=False, @@ -137,12 +137,12 @@ def basisbetrag_m_wthh_2001( leaf_name="basisbetrag_m_wthh", start_date="2002-01-01", rounding_spec=RoundingSpec( - unit=Unit.EUR.PER_MONTH, + unit=TTSIMUnit.EUR.PER_MONTH.PER_WTHH, base=1, direction="nearest", reference="§ 19 WoGG Abs.2 Anlage 3", ), - unit=Unit.CURRENCY.PER_MONTH, + unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, # Quadratic in (Miete, Einkommen); its per-currency coefficients are not # spellable in the unit grammar (GEP 10 D1). verify_units=False, diff --git a/src/gettsim/tt/__init__.py b/src/gettsim/tt/__init__.py index e605d9c3cc..63751a960e 100644 --- a/src/gettsim/tt/__init__.py +++ b/src/gettsim/tt/__init__.py @@ -21,7 +21,7 @@ RoundingSpec, ScalarParam, TimeConversionFunction, - Unit, + TTSIMUnit, agg_by_group_function, agg_by_p_id_function, cast_unit, @@ -61,8 +61,8 @@ "RawParam", "RoundingSpec", "ScalarParam", + "TTSIMUnit", "TimeConversionFunction", - "Unit", "agg_by_group_function", "agg_by_p_id_function", "cast_unit", From 8e07b0689b9c8014f1ee6f4ba26125c84840e86a Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 14:13:35 +0200 Subject: [PATCH 58/65] Bump ttsim pin to bfc1170a (registries branch after the stack reorder) --- pixi.lock | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/pixi.lock b/pixi.lock index 85035c17d2..6e16434c14 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,7 +261,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -500,7 +500,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -739,7 +739,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -983,7 +983,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -1278,7 +1278,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -1530,7 +1530,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -1782,7 +1782,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -2039,7 +2039,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -2320,7 +2320,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -2562,7 +2562,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -2804,7 +2804,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -3051,7 +3051,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -3341,7 +3341,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -3586,7 +3586,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -3831,7 +3831,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -4081,7 +4081,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -4370,7 +4370,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -4616,7 +4616,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -4862,7 +4862,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -5113,7 +5113,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -5402,7 +5402,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -5648,7 +5648,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -5894,7 +5894,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -6145,7 +6145,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -6434,7 +6434,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -6744,7 +6744,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -6995,7 +6995,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -7251,7 +7251,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -7509,7 +7509,7 @@ 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=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea - 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 @@ -19821,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#4dc065aaa92dd3fa680359fd6cd78dce295609d3 +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea name: ttsim-backend - version: 1.2.2.dev52+g4dc065aaa + version: 1.2.2.dev41+gbfc1170a8 requires_dist: - beartype>=0.18 - dags>=0.6 From aaa32f8b9c1a2db508d7ddb25958b9cd1439e92e Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 14:38:12 +0200 Subject: [PATCH 59/65] Bump ttsim pin to aa1df477 (mappingproxy import fix for Python 3.11) Co-Authored-By: Claude Opus 4.8 --- pixi.lock | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/pixi.lock b/pixi.lock index 6e16434c14..bea9d4c679 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,7 +261,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -500,7 +500,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -739,7 +739,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -983,7 +983,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -1278,7 +1278,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -1530,7 +1530,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -1782,7 +1782,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -2039,7 +2039,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -2320,7 +2320,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -2562,7 +2562,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -2804,7 +2804,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -3051,7 +3051,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -3341,7 +3341,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -3586,7 +3586,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -3831,7 +3831,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -4081,7 +4081,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -4370,7 +4370,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -4616,7 +4616,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -4862,7 +4862,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -5113,7 +5113,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -5402,7 +5402,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -5648,7 +5648,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -5894,7 +5894,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -6145,7 +6145,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -6434,7 +6434,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -6744,7 +6744,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -6995,7 +6995,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -7251,7 +7251,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -7509,7 +7509,7 @@ 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=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c - 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 @@ -19821,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#bfc1170a808c8d8eb3c6500666aa6cdf9cb935ea +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c name: ttsim-backend - version: 1.2.2.dev41+gbfc1170a8 + version: 1.2.2.dev42+gaa1df4773 requires_dist: - beartype>=0.18 - dags>=0.6 From 811f33e68d8ce0b2f05977de0bae640e876cb110 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 14:57:34 +0200 Subject: [PATCH 60/65] Depend on ttsim #141 (gep10-annotate-mettsim) Repoint the ttsim-backend pin to the mettsim worked-example branch, which sits on top of the merged per-system-unit-registries work and carries the Python 3.11 mappingproxy import fix. Co-Authored-By: Claude Opus 4.8 --- pixi.lock | 62 +++++++++++++++++++++++++------------------------- pyproject.toml | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/pixi.lock b/pixi.lock index bea9d4c679..5257de24c5 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,7 +261,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -500,7 +500,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -739,7 +739,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -983,7 +983,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -1278,7 +1278,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -1530,7 +1530,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -1782,7 +1782,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -2039,7 +2039,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -2320,7 +2320,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -2562,7 +2562,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -2804,7 +2804,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -3051,7 +3051,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -3341,7 +3341,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -3586,7 +3586,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -3831,7 +3831,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -4081,7 +4081,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -4370,7 +4370,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -4616,7 +4616,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -4862,7 +4862,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -5113,7 +5113,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -5402,7 +5402,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -5648,7 +5648,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -5894,7 +5894,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -6145,7 +6145,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -6434,7 +6434,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -6744,7 +6744,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -6995,7 +6995,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -7251,7 +7251,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -7509,7 +7509,7 @@ 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=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c + - pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b - 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 @@ -19821,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-per-system-unit-registries#aa1df47735f36b9d839a0170b07d55d3c32ae82c +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b name: ttsim-backend - version: 1.2.2.dev42+gaa1df4773 + version: 1.2.2.dev52+g001365a42 requires_dist: - beartype>=0.18 - dags>=0.6 diff --git a/pyproject.toml b/pyproject.toml index b7206930e7..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 = "gep10-per-system-unit-registries" } +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" ] From 749c41757c223cfffd1878a0abd1bd0fa74b0e68 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 15:07:02 +0200 Subject: [PATCH 61/65] Bump ttsim pin to 46b6b439 (rebased #141 head) The UTF-8 repro-script fix moved down into the ttsim infra branch, so #141 was restacked; re-pin the lock to its live head. Co-Authored-By: Claude Opus 4.8 --- pixi.lock | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/pixi.lock b/pixi.lock index 5257de24c5..fcc91a3e55 100644 --- a/pixi.lock +++ b/pixi.lock @@ -261,7 +261,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -500,7 +500,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -739,7 +739,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -983,7 +983,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -1278,7 +1278,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -1530,7 +1530,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -1782,7 +1782,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -2039,7 +2039,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -2320,7 +2320,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -2562,7 +2562,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -2804,7 +2804,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -3051,7 +3051,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -3341,7 +3341,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -3586,7 +3586,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -3831,7 +3831,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -4081,7 +4081,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -4370,7 +4370,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -4616,7 +4616,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -4862,7 +4862,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -5113,7 +5113,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -5402,7 +5402,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -5648,7 +5648,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -5894,7 +5894,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -6145,7 +6145,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -6434,7 +6434,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -6744,7 +6744,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -6995,7 +6995,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -7251,7 +7251,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -7509,7 +7509,7 @@ 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=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b + - 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 @@ -19821,9 +19821,9 @@ packages: - dags>=0.6 - gettsim>=1.1 requires_python: '>=3.11' -- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#001365a422b9573409f1ce94cd9a09e2f9105e4b +- pypi: git+https://github.com/ttsim-dev/ttsim.git?branch=gep10-annotate-mettsim#46b6b439a529299bf6f4793f4de5e678b7574011 name: ttsim-backend - version: 1.2.2.dev52+g001365a42 + version: 1.2.2.dev52+g46b6b439a requires_dist: - beartype>=0.18 - dags>=0.6 From 3e2a6cb492840a0ad381f172ac8e0fcdd952bb79 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 15:43:46 +0200 Subject: [PATCH 62/65] Fix docs notebook: per-fg unit on the child-count threshold The 'tax deduction only for families with at least two children' example compares `familie__anzahl_kinder_fg` (a count at the Familiengemeinschaft level) against a threshold parameter. Under GEP 10 a comparison requires both operands in the same unit, so the threshold must be declared `PERSON_COUNT.PER_FG`, not plain `PERSON_COUNT`. Without this the docs build fails with a UnitConsistencyError while executing the notebook. Co-Authored-By: Claude Opus 4.8 --- .../how_to_guides/modifications_of_policy_environments.ipynb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/how_to_guides/modifications_of_policy_environments.ipynb b/docs/how_to_guides/modifications_of_policy_environments.ipynb index ad6caa33dc..2afbfd72cb 100644 --- a/docs/how_to_guides/modifications_of_policy_environments.ipynb +++ b/docs/how_to_guides/modifications_of_policy_environments.ipynb @@ -1010,8 +1010,11 @@ "# Step 2: Create a new parameter `min_anzahl_kinder_für_kinderfreibetrag`\n", "from gettsim.tt import ScalarParam, TTSIMUnit\n", "\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\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", From cdf878b9b0363345d78ebac4174fd1ebfe472356 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 16:31:08 +0200 Subject: [PATCH 63/65] Address code-review findings on GEP 10 unit annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Keep `alter` in YEARS at age comparisons and tag the literal instead (`alter <= cast_unit(N, TTSIMUnit.YEARS)`), matching the kindergeld convention and preserving the unit contract (familie, individual_characteristics). - Rename the parameter `midijobgrenze` to `midijobgrenze_m` for symmetry with its sibling `minijobgrenze_m`; both are EUR_PER_MONTH. - Bump the local ty-jax hook pin to ty==0.0.52 to match the ty-pre-commit rev. - Annotate the new test_currency.py functions with mandatory type hints. - Run the ty / ty-jax commands in AGENTS.md through pixi. - Fix the `volljährig` docstring to match `alter >= 18`. Co-Authored-By: Claude Opus 4.8 --- .pre-commit-config.yaml | 2 +- AGENTS.md | 4 ++-- src/gettsim/germany/familie/familie.py | 24 +++++++------------ .../germany/individual_characteristics.py | 2 +- .../germany/sozialversicherung/midijob.py | 24 ++++++++++--------- .../germany/sozialversicherung/midijob.yaml | 2 +- .../regul\303\244r_besch\303\244ftigt.py" | 4 ++-- src/gettsim/tests_germany/test_currency.py | 10 ++++---- 8 files changed, 34 insertions(+), 38 deletions(-) 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/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index f541ba5630..71188a8693 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -65,9 +65,7 @@ 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 ( - cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 2 - ) + return ist_kind_in_familiengemeinschaft and (alter <= cast_unit(2, TTSIMUnit.YEARS)) @agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) @@ -82,9 +80,7 @@ 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 ( - cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 5 - ) + return ist_kind_in_familiengemeinschaft and (alter <= cast_unit(5, TTSIMUnit.YEARS)) @agg_by_group_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT.PER_FG) @@ -99,9 +95,7 @@ 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 ( - cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 6 - ) + return ist_kind_in_familiengemeinschaft and (alter <= cast_unit(6, TTSIMUnit.YEARS)) @agg_by_group_function( @@ -119,7 +113,7 @@ def ist_kind_bis_15_in_familiengemeinschaft( ) -> bool: """Child under the age of 16 in Familiengemeinschaft.""" return ist_kind_in_familiengemeinschaft and ( - cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 15 + alter <= cast_unit(15, TTSIMUnit.YEARS) ) @@ -138,7 +132,7 @@ def ist_kind_bis_17_in_familiengemeinschaft( ) -> bool: """Child under the age of 18 in Familiengemeinschaft.""" return ist_kind_in_familiengemeinschaft and ( - cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 17 + alter <= cast_unit(17, TTSIMUnit.YEARS) ) @@ -232,9 +226,7 @@ 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 ( - cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 17 - ) + return ist_kind_in_bedarfsgemeinschaft and (alter <= cast_unit(17, TTSIMUnit.YEARS)) @agg_by_group_function( @@ -345,8 +337,8 @@ def anzahl_personen_ehe(ehe_id: int) -> int: @policy_function(unit=TTSIMUnit.DIMENSIONLESS) def volljährig(alter: int) -> bool: - """Person over the age of 18.""" - return cast_unit(alter, TTSIMUnit.DIMENSIONLESS) >= 18 + """Person aged 18 years or older.""" + return alter >= cast_unit(18, TTSIMUnit.YEARS) @policy_function(unit=TTSIMUnit.DIMENSIONLESS) diff --git a/src/gettsim/germany/individual_characteristics.py b/src/gettsim/germany/individual_characteristics.py index f4cbc7c6f2..ef85005cda 100644 --- a/src/gettsim/germany/individual_characteristics.py +++ b/src/gettsim/germany/individual_characteristics.py @@ -9,4 +9,4 @@ def alter_bis_24(alter: int) -> bool: Trivial, but necessary in order to use the target for aggregation. """ - return cast_unit(alter, TTSIMUnit.DIMENSIONLESS) <= 24 # noqa: PLR2004 + return alter <= cast_unit(24, TTSIMUnit.YEARS) diff --git a/src/gettsim/germany/sozialversicherung/midijob.py b/src/gettsim/germany/sozialversicherung/midijob.py index a359729ff1..d6eaf8d02a 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.py +++ b/src/gettsim/germany/sozialversicherung/midijob.py @@ -9,7 +9,7 @@ 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,21 +19,23 @@ 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(verify_units=False, unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( einnahmen__bruttolohn_m: float, minijobgrenze_m: float, - midijobgrenze: 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_m) + quotient = midijobgrenze_m / (midijobgrenze_m - minijobgrenze_m) einkommen_diff = einnahmen__bruttolohn_m - minijobgrenze_m return quotient * einkommen_diff @@ -184,7 +186,7 @@ def midijob_bemessungsentgelt_m_bis_09_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, minijobgrenze_m: float, - midijobgrenze: float, + midijobgrenze_m: float, ) -> float: """Income subject to social insurance contributions for midijob until September 2022. @@ -198,9 +200,9 @@ def midijob_bemessungsentgelt_m_bis_09_2022( # Now use the factor to calculate the overall bemessungsentgelt minijob_anteil = midijob_faktor_f * minijobgrenze_m lohn_über_mini = einnahmen__bruttolohn_m - minijobgrenze_m - gewichtete_midijob_rate = (midijobgrenze / (midijobgrenze - minijobgrenze_m)) - ( - minijobgrenze_m / (midijobgrenze - minijobgrenze_m) * midijob_faktor_f - ) + 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 @@ -215,7 +217,7 @@ def midijob_bemessungsentgelt_m_ab_10_2022( einnahmen__bruttolohn_m: float, midijob_faktor_f: float, minijobgrenze_m: float, - midijobgrenze: float, + midijobgrenze_m: float, ) -> float: """Total income subject to social insurance contributions for midijobs since October 2022. @@ -228,8 +230,8 @@ def midijob_bemessungsentgelt_m_ab_10_2022( Legal reference: Changes in § 20 SGB IV from 01.10.2022 """ - quotient1 = (midijobgrenze) / (midijobgrenze - minijobgrenze_m) - quotient2 = (minijobgrenze_m) / (midijobgrenze - minijobgrenze_m) + 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_m diff --git a/src/gettsim/germany/sozialversicherung/midijob.yaml b/src/gettsim/germany/sozialversicherung/midijob.yaml index fa4bc67133..39d9f13485 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.yaml +++ b/src/gettsim/germany/sozialversicherung/midijob.yaml @@ -1,5 +1,5 @@ --- -midijobgrenze: +midijobgrenze_m: name: de: Midijobgrenze en: Midijob threshold 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 dd8b25e2c8..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" @@ -27,7 +27,7 @@ def regulär_beschäftigt_vor_midijob( ) 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/tests_germany/test_currency.py b/src/gettsim/tests_germany/test_currency.py index 5e47faf9ab..ab821efd7c 100644 --- a/src/gettsim/tests_germany/test_currency.py +++ b/src/gettsim/tests_germany/test_currency.py @@ -17,17 +17,17 @@ DM_PER_EUR = 1.95583 -def test_euro_is_the_base_currency(): +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(): +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(): +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) @@ -42,5 +42,7 @@ def test_euro_converts_to_deutsche_mark_at_the_statutory_rate(): (datetime.date(2025, 1, 1), "EUR"), ], ) -def test_statutory_currency_changes_over_to_the_euro_in_2002(policy_date, expected): +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 From 09c1b298582fe57bacbd83d95e28a017cbff6962 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Fri, 17 Jul 2026 18:45:47 +0200 Subject: [PATCH 64/65] Checkpoint. --- CHANGES.md | 4 +- ...modifications_of_policy_environments.ipynb | 6 +- ...hildrens_income_grundsicherung_im_alter.md | 2 +- ...edarfsgemeinschaften_and_mischhaushalte.md | 2 +- docs/tutorials/simple_example.ipynb | 4 +- .../arbeitslosengeld_2/arbeitslosengeld_2.py | 7 +- .../germany/arbeitslosengeld_2/bedarfe.yaml | 2 +- .../germany/arbeitslosengeld_2/regelbedarf.py | 20 +-- .../germany/b\303\274rgergeld/bedarfe.yaml" | 2 +- .../b\303\274rgergeld/b\303\274rgergeld.py" | 17 +-- .../freibetr\303\244ge_verm\303\266gen.py" | 10 +- .../germany/b\303\274rgergeld/regelbedarf.py" | 24 ++- .../abz\303\274ge/alleinerziehend.py" | 16 +- .../abz\303\274ge/alleinerziehend.yaml" | 4 +- .../einkommensteuer/abz\303\274ge/alter.py" | 25 ++- .../einkommensteuer/abz\303\274ge/alter.yaml" | 7 +- .../abz\303\274ge/behinderung.yaml" | 4 +- .../abz\303\274ge/sonderausgaben.yaml" | 1 - .../abz\303\274ge/vorsorge.py" | 6 - .../abz\303\274ge/vorsorge.yaml" | 4 - .../einkommensteuer/einkommensteuer.py | 40 +++-- .../aus_kapitalverm\303\266gen.py" | 11 +- .../freibetr\303\244ge.yaml" | 8 +- ...aus_nichtselbstst\303\244ndiger_arbeit.py" | 7 +- .../werbungskostenpauschale.yaml" | 1 - .../eink\303\274nfte/sonstige/rente/rente.py" | 3 - .../eink\303\274nfte/sonstige/sonstige.py" | 4 +- .../sonstige/werbungskostenpauschale.yaml" | 3 +- .../einkommensteuer/kinderfreibetrag.py | 6 +- .../einkommensteuer/kinderfreibetrag.yaml | 4 - src/gettsim/germany/elterngeld/anspruch.yaml | 2 +- src/gettsim/germany/elterngeld/boni.yaml | 8 +- src/gettsim/germany/elterngeld/elterngeld.py | 50 +++--- src/gettsim/germany/elterngeld/formel.yaml | 8 +- .../germany/elterngeld/geschwisterbonus.py | 28 ++-- src/gettsim/germany/elterngeld/inputs.py | 2 +- .../germany/erziehungsgeld/erziehungsgeld.py | 44 +++--- .../germany/erziehungsgeld/formel.yaml | 2 +- src/gettsim/germany/familie/familie.py | 5 +- .../freibetr\303\244ge_und_mehrbedarfe.yaml" | 2 +- .../grundsicherung/im_alter/im_alter.py | 37 ++--- .../germany/kinderbonus/kinderbonus.py | 4 +- .../germany/kinderbonus/kinderbonus.yaml | 2 +- src/gettsim/germany/kindergeld/kindergeld.py | 21 ++- .../germany/kindergeld/kindergeld.yaml | 8 +- .../germany/kinderzuschlag/einkommen.py | 19 +-- .../germany/kinderzuschlag/kinderzuschlag.py | 28 ++-- .../kinderzuschlag/kinderzuschlag.yaml | 2 +- src/gettsim/germany/lohnsteuer/einkommen.py | 12 +- src/gettsim/germany/lohnsteuer/lohnsteuer.py | 8 +- src/gettsim/germany/lohnsteuer/vorsorge.yaml | 3 +- .../solidarit\303\244tszuschlag.py" | 2 - .../solidarit\303\244tszuschlag.yaml" | 8 - .../arbeitslosen/betrag.yaml | 3 +- .../beitrag/beitragsbemessungsgrenze.yaml | 6 - .../f\303\274r_frauen/f\303\274r_frauen.py" | 13 +- .../langj\303\244hrig/langj\303\244hrig.py" | 7 +- .../wegen_arbeitslosigkeit.py | 37 +---- .../beitrag/beitragsbemessungsgrenze.yaml | 142 ------------------ .../rente/beitrag/rentenanpassungsformel.yaml | 9 -- ...emischte_bg_\303\274berschuss_sgb_ii.yaml" | 19 ++- .../kinderzuschlag/2013-01-01/hh_id_2.yaml | 2 +- .../kinderzuschlag/2016-01-01/hh_id_1.yaml | 2 +- .../kinderzuschlag/2016-01-01/hh_id_11.yaml | 2 +- .../kinderzuschlag/2016-01-01/hh_id_12.yaml | 2 +- .../kinderzuschlag/2016-01-01/hh_id_13.yaml | 2 +- .../kinderzuschlag/2016-01-01/hh_id_7.yaml | 2 +- .../kinderzuschlag/2017-01-01/hh_id_9.yaml | 2 +- .../kinderzuschlag/2019-01-01/hh_id_6.yaml | 2 +- .../kinderzuschlag/2020-01-01/hh_id_8.yaml | 2 +- .../kinderzuschlag/2021-01-01/hh_id_10.yaml | 2 +- .../kinderzuschlag/2023-01-01/hh_id_14.yaml | 2 +- .../2023-01-01/test_child_income.yaml | 2 +- .../2023-01-01/test_family_high_wealth.yaml | 2 +- .../test_higher_wealth_exemptions.yaml | 2 +- .../kinderzuschlag/skip_2006/hh_id_4.yaml | 2 +- .../kinderzuschlag/skip_2009/hh_id_3.yaml | 2 +- .../lohnsteuer/2026-01-01/aktivrente.yaml | 2 +- 78 files changed, 278 insertions(+), 551 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bcd8e5832f..00b59393cc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,8 +26,8 @@ All releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ge `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 - `mehrbedarf_alleinerziehend_m`. `gesamteinkommen_y` becomes `gesamteinkommen_y_sn`, - naming the level it is aggregated to. ({ghuser}`MImmesberger`) + `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/how_to_guides/modifications_of_policy_environments.ipynb b/docs/how_to_guides/modifications_of_policy_environments.ipynb index 2afbfd72cb..3d708be9d2 100644 --- a/docs/how_to_guides/modifications_of_policy_environments.ipynb +++ b/docs/how_to_guides/modifications_of_policy_environments.ipynb @@ -230,8 +230,8 @@ "- `reference`: A legal reference.\n", "\n", "When modifying parameters, you will mostly care about the `value` attribute. Every\n", - "parameter must declare a `unit` (GEP 10); keep the one the original declares.\n", - "Parameters state a concrete currency, e.g. `TTSIMUnit.EUR.PER_YEAR`.\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", @@ -303,7 +303,7 @@ "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. The\n", - "`value` and the `unit` are required; the unit is the one the original parameter\n", + "`value` and the `unit` are required; here the unit is the one the original parameter\n", "declares (GEP 10)." ] }, 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 88417db9f8..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`, carrying over the unit of the parameter we replace — every parameter must declare one (GEP 10)." + "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)." ] }, { diff --git a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py index 7a35f7306a..20556a6022 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py +++ b/src/gettsim/germany/arbeitslosengeld_2/arbeitslosengeld_2.py @@ -117,7 +117,7 @@ def einkommen_zur_verteilung_m( @policy_function( start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.CURRENCY.PER_MONTH ) -def überschusseinkommen_m( +def überschusseinkommen_m_bg( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, ) -> float: @@ -129,7 +129,4 @@ def überschusseinkommen_m( Reference: BSG B 14 AS 89/20 R """ - return cast_unit( - max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg), - TTSIMUnit.CURRENCY.PER_MONTH, - ) + return max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg) diff --git a/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml b/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml index ff44cded67..fa6f0a9782 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml +++ b/src/gettsim/germany/arbeitslosengeld_2/bedarfe.yaml @@ -117,7 +117,7 @@ kindersofortzuschlag: 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 diff --git a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py index 63cca58f75..dcf9517479 100644 --- a/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py +++ b/src/gettsim/germany/arbeitslosengeld_2/regelbedarf.py @@ -39,12 +39,12 @@ def regelbedarf_m( @policy_function( start_date="2005-01-01", end_date="2022-12-31", unit=TTSIMUnit.DIMENSIONLESS ) -def mehrbedarf_alleinerziehend( +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. @@ -56,7 +56,7 @@ def mehrbedarf_alleinerziehend( """ # 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_mehrbedarf_alleinerziehend[ + basis_mehrbedarf = parameter_mehrbedarfsanteil_alleinerziehend[ "basis_je_kind_bis_17" ] * cast_unit(familie__anzahl_kinder_bis_17_fg, TTSIMUnit.DIMENSIONLESS) @@ -66,14 +66,16 @@ def mehrbedarf_alleinerziehend( 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 @@ -208,7 +210,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_bis_2010( - mehrbedarf_alleinerziehend: float, + mehrbedarfsanteil_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, regelsatz_anteilsbasiert: RegelsatzAnteilsbasiert, @@ -225,7 +227,7 @@ def erwachsenensatz_m_bis_2010( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend) + return out * (1 + mehrbedarfsanteil_alleinerziehend) @policy_function( @@ -235,7 +237,7 @@ def erwachsenensatz_m_bis_2010( unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( - mehrbedarf_alleinerziehend: float, + mehrbedarfsanteil_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, @@ -250,7 +252,7 @@ def erwachsenensatz_m_ab_2011( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend) + return out * (1 + mehrbedarfsanteil_alleinerziehend) @policy_function( diff --git "a/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" "b/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" index ef87dee265..13fd30d230 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" +++ "b/src/gettsim/germany/b\303\274rgergeld/bedarfe.yaml" @@ -24,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 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 d43b884fb0..439d6ec0ba 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/b\303\274rgergeld.py" @@ -43,6 +43,8 @@ def anspruchshöhe_m( Reference: §9 Abs. 2 Satz 3 SGB II """ + # 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, @@ -52,11 +54,7 @@ def anspruchshöhe_m( if ungedeckter_bedarf_m_bg == 0.0 or vermögen_bg > vermögensfreibetrag_bg: return 0.0 else: - # Distribute the BG surplus by each member's share of the BG Bedarf. - return cast_unit( - (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg, - TTSIMUnit.CURRENCY.PER_MONTH, - ) + return (ungedeckter_bedarf_m / ungedeckter_bedarf_m_bg) * anspruch_m_bg @policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) @@ -109,7 +107,7 @@ def einkommen_zur_verteilung_m( @policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) -def überschusseinkommen_m( +def überschusseinkommen_m_bg( einkommen_zur_verteilung_m_bg: float, ungedeckter_bedarf_m_bg: float, ) -> float: @@ -121,9 +119,4 @@ def überschusseinkommen_m( Reference: BSG B 14 AS 89/20 R """ - # The BG-level surplus is attributed to each member; downstream code aggregates - # `_m_eg` for the mixed-BG partner's Grundsicherung. - return cast_unit( - max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg), - TTSIMUnit.CURRENCY.PER_MONTH, - ) + return max(0.0, einkommen_zur_verteilung_m_bg - ungedeckter_bedarf_m_bg) 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 a346913330..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,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import TTSIMUnit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_BG) @@ -14,12 +14,10 @@ def vermögensfreibetrag_in_karenzzeit_bg( This variable is also referred to as 'erhebliches Vermögen'. """ - # Per-person exemptions sum to the BG-level total wealth exemption. - return cast_unit( + return ( vermögensfreibetrag_je_person_nach_karenzzeit["während_karenzzeit"] - + (cast_unit(familie__anzahl_personen_bg, TTSIMUnit.DIMENSIONLESS) - 1) - * vermögensfreibetrag_je_person_nach_karenzzeit["normaler_satz"], - TTSIMUnit.CURRENCY.PER_BG, + + (familie__anzahl_personen_bg - 1) + * vermögensfreibetrag_je_person_nach_karenzzeit["normaler_satz"] ) diff --git "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" index 6d55a0b0bd..24d233441e 100644 --- "a/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" +++ "b/src/gettsim/germany/b\303\274rgergeld/regelbedarf.py" @@ -35,12 +35,12 @@ def regelbedarf_m( @policy_function(start_date="2023-01-01", unit=TTSIMUnit.DIMENSIONLESS) -def mehrbedarf_alleinerziehend( +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. @@ -50,7 +50,7 @@ def mehrbedarf_alleinerziehend( Reference: §21 SGB II """ - basis_mehrbedarf = parameter_mehrbedarf_alleinerziehend[ + basis_mehrbedarf = parameter_mehrbedarfsanteil_alleinerziehend[ "basis_je_kind_bis_17" ] * cast_unit(familie__anzahl_kinder_bis_17_fg, TTSIMUnit.DIMENSIONLESS) @@ -60,14 +60,16 @@ def mehrbedarf_alleinerziehend( 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 @@ -116,7 +118,7 @@ def kindersatz_m_nach_regelbedarfsstufen_mit_sofortzuschlag( unit=TTSIMUnit.CURRENCY.PER_MONTH, ) def erwachsenensatz_m_ab_2011( - mehrbedarf_alleinerziehend: float, + mehrbedarfsanteil_alleinerziehend: float, kindersatz_m: float, p_id_einstandspartner: int, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, @@ -131,7 +133,7 @@ def erwachsenensatz_m_ab_2011( else: out = 0.0 - return out * (1 + mehrbedarf_alleinerziehend) + return out * (1 + mehrbedarfsanteil_alleinerziehend) @policy_function(start_date="2023-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) @@ -183,13 +185,7 @@ def anerkannte_warmmiete_je_qm_m( return min(out, mietobergrenze_pro_qm) -@policy_function( - start_date="2023-01-01", - unit=TTSIMUnit.SQUARE_METER, - # The Eigentum branch looks up a dynamically built table whose axes the dry-run - # cannot model; the per-person division is covered by `wohnfläche` above. - verify_units=False, -) +@policy_function(start_date="2023-01-01", unit=TTSIMUnit.SQUARE_METER) def berechtigte_wohnfläche( wohnfläche: float, wohnen__bewohnt_eigentum_hh: bool, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" index c829194e98..4e9db84a0a 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.py" @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import TTSIMUnit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( @@ -12,10 +12,10 @@ ) 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( @@ -26,15 +26,15 @@ def alleinerziehend_betrag_y_pauschal( 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 - + (cast_unit(kindergeld__anzahl_ansprüche_sn, TTSIMUnit.DIMENSIONLESS) - 1) - * alleinerziehendenfreibetrag_zusatz_pro_kind + alleinerziehendenfreibetrag_basis_y + + (kindergeld__anzahl_ansprüche_sn - 1) + * 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 2a73b8abdc..4822096a30 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alleinerziehend.yaml" @@ -1,5 +1,5 @@ --- -alleinerziehendenfreibetrag_basis: +alleinerziehendenfreibetrag_basis_y: name: de: Parmeter zur Berechnung ds Entlastungsbetrags für Alleinerziehende en: Income Tax Allowance for Single Parents @@ -33,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 diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" index 1ff1fc45b4..40ed2b1039 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.py" @@ -22,10 +22,6 @@ end_date="2004-12-31", leaf_name="altersfreibetrag_y", unit=TTSIMUnit.CURRENCY.PER_YEAR, - # Reads `maximaler_altersentlastungsbetrag` / `altersentlastungsquote`, declared - # `type: require_converter` though consumed as scalars, which the dry-run cannot - # follow; declared unit and edges stay checked. - verify_units=False, ) def altersfreibetrag_y_bis_2004( alter: int, @@ -34,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.""" @@ -48,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 @@ -60,9 +56,6 @@ def altersfreibetrag_y_bis_2004( start_date="2005-01-01", leaf_name="altersfreibetrag_y", unit=TTSIMUnit.CURRENCY.PER_YEAR, - # Reads two geburtsjahr-keyed lookup tables the dry-run cannot evaluate - # symbolically; its declared unit and edges stay checked. - verify_units=False, ) def altersfreibetrag_y_ab_2005( alter: int, @@ -73,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 ) ) @@ -97,7 +90,7 @@ def altersfreibetrag_y_ab_2005( ) if alter > altersentlastungsbetrag_altersgrenze: - out = min(betrag, maximaler_altersentlastungsbetrag) + out = min(betrag, maximaler_altersentlastungsbetrag_y) else: out = 0.0 @@ -130,13 +123,13 @@ def altersentlastungsquote_gestaffelt_nach_geburtsjahr( @param_function(start_date="2005-01-01", unit=UNSET_UNIT) -def maximaler_altersentlastungsbetrag_gestaffelt_nach_geburtsjahr( - raw_maximaler_altersentlastungsbetrag_gestaffelt: dict[str | int, int | float], +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 f70f150c50..721dfea3a4 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/alter.yaml" @@ -17,7 +17,7 @@ altersentlastungsbetrag_altersgrenze: 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. @@ -28,7 +28,6 @@ maximaler_altersentlastungsbetrag: en: >- If someone receives employment income above the age of 64, a share up to this amount is deducted. - unit: EUR_PER_YEAR type: require_converter 1984-01-01: unit: DM_PER_YEAR @@ -41,8 +40,8 @@ maximaler_altersentlastungsbetrag: 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. diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" index 55cb6e6e84..ce7de6b59f 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/behinderung.yaml" @@ -6,11 +6,10 @@ parameter_behindertenpauschbetrag: description: de: § 33b (3) EStG. en: null - input_unit: DIMENSIONLESS - output_unit: EUR_PER_YEAR type: piecewise_constant 1975-01-01: reference: G. v. 05.08.1974 BGBl. I S. 1769. + input_unit: DIMENSIONLESS output_unit: DM_PER_YEAR intervals: - interval: (-inf, 25) @@ -33,6 +32,7 @@ parameter_behindertenpauschbetrag: 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) diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" index 0fd9be363c..82635db9d7 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/sonderausgaben.yaml" @@ -6,7 +6,6 @@ sonderausgabenpauschbetrag: description: de: § 10c EStG en: null - unit: EUR_PER_YEAR type: scalar 1984-01-01: unit: DM_PER_YEAR diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" index e3d4a55083..b65b562703 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.py" @@ -113,9 +113,6 @@ def vorsorgeaufwendungen_y_sn_ab_2020( @policy_function( end_date="2019-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, - # A per-capita Splitting formula (divide then multiply by anzahl_personen_sn) the - # level model cannot follow; declared unit and edges stay checked. - verify_units=False, ) def vorsorgeaufwendungen_regime_bis_2004_y_sn( vorwegabzug_lohnsteuer_y_sn: float, @@ -309,9 +306,6 @@ def altersvorsorge_y_sn_volle_anrechnung( @policy_function( end_date="2019-12-31", unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, - # A per-capita Splitting formula (divide then multiply by anzahl_personen_sn) the - # level model cannot follow; declared unit and edges stay checked. - verify_units=False, ) def vorwegabzug_lohnsteuer_y_sn( einnahmen__bruttolohn_y_sn: float, diff --git "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" index 26d3a8ec50..749d38ede8 100644 --- "a/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" +++ "b/src/gettsim/germany/einkommensteuer/abz\303\274ge/vorsorge.yaml" @@ -16,10 +16,6 @@ parameter_altersvorsorgeaufwendungen_regime_bis_2004: gekürzt bei abhängig Beschäftigten (vereinfacht). Achtung: Heterogene Einträge im dict! en: null - unit: - vorwegabzug: EUR_PER_YEAR - grundhöchstbetrag: EUR_PER_YEAR - kürzungsanteil_abhängig_beschäftigte: DIMENSIONLESS type: dict 1985-01-01: unit: diff --git a/src/gettsim/germany/einkommensteuer/einkommensteuer.py b/src/gettsim/germany/einkommensteuer/einkommensteuer.py index 8db2937aa2..1f5590d747 100644 --- a/src/gettsim/germany/einkommensteuer/einkommensteuer.py +++ b/src/gettsim/germany/einkommensteuer/einkommensteuer.py @@ -14,7 +14,6 @@ RoundingSpec, TTSIMUnit, agg_by_p_id_function, - cast_unit, get_piecewise_parameters, intervals_to_thresholds, param_function, @@ -28,7 +27,7 @@ from gettsim.typing import RawParamValue -@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) +@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, @@ -37,7 +36,7 @@ def anzahl_kindergeld_ansprüche_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) +@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, @@ -66,6 +65,33 @@ def betrag_y_sn_kindergeld_kinderfreibetrag_parallel( return betrag_mit_kinderfreibetrag_y_sn +@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, + 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( start_date="2002-01-01", leaf_name="betrag_y_sn", @@ -205,13 +231,7 @@ def relevantes_kindergeld_mit_staffelung_m( """ kindergeld_ansprüche = anzahl_kindergeld_ansprüche_1 + anzahl_kindergeld_ansprüche_2 - return ( - cast_unit( - kindergeld__satz_nach_anzahl_kinder.look_up(kindergeld_ansprüche), - TTSIMUnit.CURRENCY.PER_MONTH, - ) - / 2 - ) + return kindergeld__satz_nach_anzahl_kinder.look_up(kindergeld_ansprüche) / 2 @policy_function( 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 34f75575fc..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" @@ -13,13 +13,14 @@ 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, ) @@ -32,11 +33,11 @@ def betrag_y_sn_mit_sparerfreibetrag_und_werbungskostenpauschbetrag( 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 69da0f8cec..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,7 +8,6 @@ sparerfreibetrag: Früher § 20 (4) EStG. Wert für Einzelpersonen. Wird verdoppelt für gemeinsam veranlagte Paare. en: null - unit: EUR_PER_YEAR type: scalar 1975-01-01: unit: DM_PER_YEAR @@ -31,14 +30,13 @@ 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: EUR_PER_YEAR type: scalar 1975-01-01: unit: DM_PER_YEAR @@ -51,7 +49,7 @@ werbungskostenpauschbetrag: note: >- Integration von Sparerfreibetrag, Werbungskostenpauschbetrag bei Zinseinkünften in Sparerpauschbetrag. -sparerpauschbetrag: +sparerpauschbetrag_y: name: de: Sparerpauschbetrag en: Allowance for Capital Gains 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 2a0ae03286..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,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import TTSIMUnit, cast_unit, param_function, policy_function +from gettsim.tt import TTSIMUnit, param_function, policy_function @policy_function( @@ -76,13 +76,12 @@ def anteil_steuerfälliger_einnahmen( ) -> float: """Anteil steuerfälliger Einnahmen an Einnahmen aus nichtselbstständiger Arbeit.""" if einnahmen__bruttolohn_y > 0.0: - return cast_unit( + return ( max( einnahmen__bruttolohn_y - steuerbefreite_einnahmen_y, 0.0, ) - / einnahmen__bruttolohn_y, - TTSIMUnit.DIMENSIONLESS, + / einnahmen__bruttolohn_y ) else: return 0.0 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 35406ca466..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,7 +6,6 @@ arbeitnehmerpauschbetrag: description: de: § 9a Nr. 1a) EStG en: This is the minimum amount deducted from any employment income. - unit: EUR_PER_YEAR type: scalar 1975-01-01: unit: DM_PER_YEAR 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 2d511cf0d7..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" @@ -99,9 +99,6 @@ def ertragsanteil_berufsständische_altersvorsorge( @policy_function( end_date="2004-12-31", unit=TTSIMUnit.DIMENSIONLESS, - # The look-up index is built with raw `xnp.floor(...).astype(int)`, which the - # dry-run cannot evaluate symbolically. - verify_units=False, ) def ertragsanteil_gesetzliche_rente( sozialversicherung__rente__alter_bei_renteneintritt: float, 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 bb4711977c..4e32558ecc 100644 --- "a/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" +++ "b/src/gettsim/germany/einkommensteuer/eink\303\274nfte/sonstige/sonstige.py" @@ -9,12 +9,12 @@ 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 4110a110b7..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,7 +11,6 @@ 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: EUR_PER_YEAR type: scalar 1984-01-01: value: 200 diff --git a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py index f30dba80f3..a703276f6b 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.py @@ -25,7 +25,7 @@ def kinderfreibetrag_pro_kind_y(parameter_kinderfreibetrag: dict[str, float]) -> return sum(parameter_kinderfreibetrag.values()) -@policy_function(unit=TTSIMUnit.PERSON_COUNT) +@policy_function(unit=TTSIMUnit.DIMENSIONLESS) def anzahl_kinderfreibeträge( anzahl_kinderfreibeträge_1: int, anzahl_kinderfreibeträge_2: int, @@ -41,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, unit=TTSIMUnit.PERSON_COUNT) +@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, @@ -50,7 +50,7 @@ def anzahl_kinderfreibeträge_1( pass -@agg_by_p_id_function(agg_type=AggType.SUM, unit=TTSIMUnit.PERSON_COUNT) +@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, diff --git a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml index 8844dd45b1..659ed154d6 100644 --- a/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml +++ b/src/gettsim/germany/einkommensteuer/kinderfreibetrag.yaml @@ -9,7 +9,6 @@ parameter_kinderfreibetrag: Betreuungs-, Erziehungs- oder Ausbildungsbedarf. Wird verdoppelt für gemeinsam veranlagte Paare. §32 (6) EStG. en: null - unit: EUR_PER_YEAR type: dict 1983-01-01: unit: DM_PER_YEAR @@ -36,9 +35,6 @@ parameter_kinderfreibetrag: sächliches_existenzminimum: 3456 betreuung_erziehung_ausbildung: 1512 reference: Art. 1 G. v. 28.12.1999 BGBl. I. S. 2552. - note: >- - Ab hier nennt § 32 Abs. 6 EStG Jahresbeträge: 3 456 Deutsche Mark für das - sächliche Existenzminimum, 1 512 Deutsche Mark für die Betreuung. 2002-01-01: unit: EUR_PER_YEAR sächliches_existenzminimum: 1824 diff --git a/src/gettsim/germany/elterngeld/anspruch.yaml b/src/gettsim/germany/elterngeld/anspruch.yaml index 98cb0fad73..06ba1d02c3 100644 --- a/src/gettsim/germany/elterngeld/anspruch.yaml +++ b/src/gettsim/germany/elterngeld/anspruch.yaml @@ -9,7 +9,7 @@ max_bezugsmonate: § 4 (3) BEEG Basismonate plus "Partnermonate" bei gleichzeitiger Inanspruchnahme von Elterngeld bei Paaren. Basismonate bei Alleinerziehenden. - unit: MONTHS + unit: MONTHS_PER_FG type: dict 2007-01-01: basismonate: 12 diff --git a/src/gettsim/germany/elterngeld/boni.yaml b/src/gettsim/germany/elterngeld/boni.yaml index cdfab9c282..2d3b076eda 100644 --- a/src/gettsim/germany/elterngeld/boni.yaml +++ b/src/gettsim/germany/elterngeld/boni.yaml @@ -14,7 +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: PERSON_COUNT + unit: PERSON_COUNT_PER_FG type: dict 2007-01-01: 3: 2 @@ -31,19 +31,19 @@ geschwisterbonus_aufschlag: 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: EUR_PER_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 diff --git a/src/gettsim/germany/elterngeld/elterngeld.py b/src/gettsim/germany/elterngeld/elterngeld.py index f6c63bc090..2c178539fc 100644 --- a/src/gettsim/germany/elterngeld/elterngeld.py +++ b/src/gettsim/germany/elterngeld/elterngeld.py @@ -108,7 +108,7 @@ 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. @@ -117,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 @@ -141,23 +141,25 @@ def elterngeld_not_implemented() -> float: @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 ) @@ -221,7 +223,6 @@ def bezugsmonate_unter_grenze_fg( parent. """ - bisherige_monate = cast_unit(bisherige_bezugsmonate_fg, TTSIMUnit.MONTHS) grenze_mit_partnermonaten = ( max_bezugsmonate["basismonate"] + max_bezugsmonate["partnermonate"] ) @@ -229,14 +230,11 @@ def bezugsmonate_unter_grenze_fg( familie__alleinerziehend or bezugsmonate_partner >= max_bezugsmonate["partnermonate"] ): - out = bisherige_monate < grenze_mit_partnermonaten - elif cast_unit(anzahl_anträge_fg, TTSIMUnit.DIMENSIONLESS) > 1: - out = ( - bisherige_monate + cast_unit(1, TTSIMUnit.MONTHS) - < grenze_mit_partnermonaten - ) + out = bisherige_bezugsmonate_fg < grenze_mit_partnermonaten + elif anzahl_anträge_fg > 1: + out = bisherige_bezugsmonate_fg + 1 < grenze_mit_partnermonaten else: - out = bisherige_monate < max_bezugsmonate["basismonate"] + out = bisherige_bezugsmonate_fg < max_bezugsmonate["basismonate"] return out @@ -245,7 +243,7 @@ def lohnersatzanteil( mean_nettoeinkommen_in_12_monaten_vor_geburt_m: float, lohnersatzanteil_einkommen_untere_grenze_m: float, lohnersatzanteil_einkommen_obere_grenze_m: float, - einkommensschritte_korrektur: float, + einkommensschritte_korrektur_m: float, satz: float, prozent_korrektur: float, prozent_minimum: float, @@ -265,7 +263,7 @@ def lohnersatzanteil( ): out = satz + ( lohnersatzanteil_einkommen_untere_grenze_m - / einkommensschritte_korrektur + / einkommensschritte_korrektur_m * prozent_korrektur ) # Lower replacement rate if considered income is above a threshold @@ -278,7 +276,7 @@ def lohnersatzanteil( satz - ( lohnersatzanteil_einkommen_obere_grenze_m - / einkommensschritte_korrektur + / einkommensschritte_korrektur_m * prozent_korrektur ), prozent_minimum, @@ -296,7 +294,7 @@ def lohnersatzanteil( 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. @@ -310,11 +308,7 @@ def anrechenbarer_betrag_m( """ return max( - betrag_m - - ( - (1 + cast_unit(anzahl_mehrlinge_fg, TTSIMUnit.DIMENSIONLESS)) - * mindestbetrag - ), + betrag_m - ((1 + anzahl_mehrlinge_fg) * mindestbetrag_m), 0, ) @@ -337,5 +331,5 @@ def jüngstes_kind_oder_mehrling( alter_monate - cast_unit(familie__alter_monate_jüngstes_mitglied_fg, TTSIMUnit.MONTHS) ) - < cast_unit(0.1, 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 d0edf4edc6..78d7c357b8 100644 --- a/src/gettsim/germany/elterngeld/formel.yaml +++ b/src/gettsim/germany/elterngeld/formel.yaml @@ -13,7 +13,7 @@ satz: 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 @@ -25,7 +25,7 @@ höchstbetrag: 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 @@ -37,7 +37,7 @@ mindestbetrag: 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. @@ -98,7 +98,7 @@ 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 diff --git a/src/gettsim/germany/elterngeld/geschwisterbonus.py b/src/gettsim/germany/elterngeld/geschwisterbonus.py index 643b525ba3..39e1fe7bb8 100644 --- a/src/gettsim/germany/elterngeld/geschwisterbonus.py +++ b/src/gettsim/germany/elterngeld/geschwisterbonus.py @@ -6,11 +6,11 @@ @policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) -def geschwisterbonus_m( +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,8 +18,9 @@ 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 @@ -27,12 +28,11 @@ def geschwisterbonus_m( @policy_function(start_date="2007-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) -def mehrlingsbonus_m(anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind: float) -> float: +def mehrlingsbonus_m_fg( + anzahl_mehrlinge_fg: int, mehrlingsbonus_pro_kind_m: float +) -> float: """Elterngeld bonus for multiples.""" - return ( - cast_unit(anzahl_mehrlinge_fg, TTSIMUnit.DIMENSIONLESS) - * mehrlingsbonus_pro_kind - ) + return anzahl_mehrlinge_fg * mehrlingsbonus_pro_kind_m @policy_function(start_date="2007-01-01", unit=TTSIMUnit.DIMENSIONLESS) @@ -43,12 +43,10 @@ def geschwisterbonus_grundsätzlich_anspruchsberechtigt_fg( ) -> bool: """Siblings that give rise to Elterngeld siblings bonus.""" geschwister_unter_3 = ( - cast_unit(familie__anzahl_kinder_bis_2_fg, TTSIMUnit.PERSON_COUNT) - >= geschwisterbonus_altersgrenzen[3] + familie__anzahl_kinder_bis_2_fg >= geschwisterbonus_altersgrenzen[3] ) geschwister_unter_6 = ( - cast_unit(familie__anzahl_kinder_bis_5_fg, TTSIMUnit.PERSON_COUNT) - >= geschwisterbonus_altersgrenzen[6] + familie__anzahl_kinder_bis_5_fg >= geschwisterbonus_altersgrenzen[6] ) return geschwister_unter_3 or geschwister_unter_6 @@ -59,5 +57,5 @@ def anzahl_mehrlinge_fg( anzahl_mehrlinge_jüngstes_kind_fg: int, ) -> int: """Number of multiples of the youngest child.""" - out = cast_unit(anzahl_mehrlinge_jüngstes_kind_fg, TTSIMUnit.DIMENSIONLESS) - 1 - return cast_unit(max(out, 0), TTSIMUnit.PERSON_COUNT.PER_FG) + out = anzahl_mehrlinge_jüngstes_kind_fg - 1 + return max(out, 0) diff --git a/src/gettsim/germany/elterngeld/inputs.py b/src/gettsim/germany/elterngeld/inputs.py index dd1c07d4cd..3b9707386b 100644 --- a/src/gettsim/germany/elterngeld/inputs.py +++ b/src/gettsim/germany/elterngeld/inputs.py @@ -25,7 +25,7 @@ def mean_nettoeinkommen_in_12_monaten_vor_geburt_m() -> float: """ -@policy_input(unit=TTSIMUnit.CURRENCY.PER_YEAR) +@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/erziehungsgeld.py b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py index 0bb86fb3ee..c9b8a0907e 100644 --- a/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py +++ b/src/gettsim/germany/erziehungsgeld/erziehungsgeld.py @@ -295,33 +295,33 @@ def anzurechnendes_einkommen_y_fg( unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) def einkommensgrenze_y_fg( - einkommensgrenze_ohne_geschwisterbonus_y: 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). Legal reference: BGBl I. v. 17.02.2004 S.208 """ if ist_leistungsbegründendes_kind: - return cast_unit( - einkommensgrenze_ohne_geschwisterbonus_y - + (cast_unit(familie__anzahl_kinder_fg, TTSIMUnit.DIMENSIONLESS) - 1) - * aufschlag_einkommen, - TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, + return ( + 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", unit=TTSIMUnit.CURRENCY.PER_YEAR + start_date="2004-01-01", + end_date="2008-12-31", + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) -def einkommensgrenze_ohne_geschwisterbonus_y( +def einkommensgrenze_ohne_geschwisterbonus_y_fg( alter_monate: int, - einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y: float, - einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y: 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 @@ -330,24 +330,17 @@ def einkommensgrenze_ohne_geschwisterbonus_y( 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_y - ) + return einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y_fg else: - return ( - einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y - ) + return einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y_fg @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=TTSIMUnit.CURRENCY.PER_YEAR, - # Plucks thresholds off dict-typed dataclass fields, which the dry-run cannot - # follow through the subscript. - verify_units=False, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) -def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y( +def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y_fg( familie__alleinerziehend_fg: bool, budgetsatz: bool, einkommensgrenzen: Einkommensgrenzen, @@ -369,12 +362,9 @@ def einkommensgrenze_ohne_geschwisterbonus_kind_jünger_als_reduzierungsgrenze_y @policy_function( start_date="2004-01-01", end_date="2008-12-31", - unit=TTSIMUnit.CURRENCY.PER_YEAR, - # Plucks thresholds off dict-typed dataclass fields, which the dry-run cannot - # follow through the subscript. - verify_units=False, + unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_FG, ) -def einkommensgrenze_ohne_geschwisterbonus_kind_älter_als_reduzierungsgrenze_y( +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 fb4c24a7e8..6d770c4579 100644 --- a/src/gettsim/germany/erziehungsgeld/formel.yaml +++ b/src/gettsim/germany/erziehungsgeld/formel.yaml @@ -50,7 +50,7 @@ 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 diff --git a/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index 71188a8693..8572c1ec75 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -251,10 +251,7 @@ def hat_kind_in_gleicher_bedarfsgemeinschaft( ist_erwachsener_in_bedarfsgemeinschaft: bool, ) -> bool: """Has a child in the same Bedarfsgemeinschaft.""" - return ( - cast_unit(anzahl_kinder_bg, TTSIMUnit.DIMENSIONLESS) >= 1 - and ist_erwachsener_in_bedarfsgemeinschaft - ) + return anzahl_kinder_bg >= 1 and ist_erwachsener_in_bedarfsgemeinschaft @agg_by_group_function(agg_type=AggType.COUNT, unit=TTSIMUnit.PERSON_COUNT.PER_SN) 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 c2fa02548a..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" @@ -117,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 diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index 4984629aba..9f5eaf4b7f 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -21,7 +21,6 @@ AggType, TTSIMUnit, agg_by_p_id_function, - cast_unit, policy_function, ) @@ -125,12 +124,9 @@ def anspruchshöhe_m_bis_2022( if individueller_restbedarf_m_eg == 0.0 or not vermögensgrenze_unterschritten_eg: return 0.0 else: - # Distribute the EG-level surplus by each member's share of the EG restbedarf. - return cast_unit( - (individueller_restbedarf_m / individueller_restbedarf_m_eg) - * anspruch_m_eg, - TTSIMUnit.CURRENCY.PER_MONTH, - ) + return ( + individueller_restbedarf_m / individueller_restbedarf_m_eg + ) * anspruch_m_eg @policy_function( @@ -169,12 +165,9 @@ def anspruchshöhe_m_ab_2023( if individueller_restbedarf_m_eg == 0.0 or not vermögensgrenze_unterschritten_eg: return 0.0 else: - # Distribute the EG-level surplus by each member's share of the EG restbedarf. - return cast_unit( - (individueller_restbedarf_m / individueller_restbedarf_m_eg) - * anspruch_m_eg, - TTSIMUnit.CURRENCY.PER_MONTH, - ) + return ( + individueller_restbedarf_m / individueller_restbedarf_m_eg + ) * anspruch_m_eg @policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH) @@ -279,9 +272,7 @@ def mehrbedarf_schwerbehinderung_g_m_vor_2011( arbeitslosengeld_2__regelsatz_anteilsbasiert.basissatz * mehrbedarf_bei_schwerbehinderungsgrad_g ) - elif (schwerbehindert_grad_g) and ( - cast_unit(familie__anzahl_erwachsene_eg, TTSIMUnit.DIMENSIONLESS) > 1 - ): + elif (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg > 1): out = ( arbeitslosengeld_2__regelsatz_anteilsbasiert.basissatz * arbeitslosengeld_2__regelsatz_anteilsbasiert.erwachsen.je_erwachsener_ab_drei_erwachsene @@ -318,9 +309,7 @@ def mehrbedarf_schwerbehinderung_g_m_ab_2011( if (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg == 1): out = mehrbedarf_single - elif (schwerbehindert_grad_g) and ( - cast_unit(familie__anzahl_erwachsene_eg, TTSIMUnit.DIMENSIONLESS) > 1 - ): + elif (schwerbehindert_grad_g) and (familie__anzahl_erwachsene_eg > 1): out = mehrbedarf_in_couple else: out = 0.0 @@ -352,18 +341,14 @@ def vermögensfreibetrag_eg( @policy_function(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS) def hat_gesamteinkommen_über_kindeseinkommensgrenze( - einkommensteuer__gesamteinkommen_y_sn: 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) """ - # The child's Steuernummer-level Gesamteinkommen is read as their individual income. - return ( - cast_unit(einkommensteuer__gesamteinkommen_y_sn, TTSIMUnit.CURRENCY.PER_YEAR) - >= einkommensgrenze_kinder - ) + return einkünfte__gesamtbetrag_der_einkünfte_y >= einkommensgrenze_kinder_y @agg_by_p_id_function(agg_type=AggType.ANY, unit=TTSIMUnit.DIMENSIONLESS) diff --git a/src/gettsim/germany/kinderbonus/kinderbonus.py b/src/gettsim/germany/kinderbonus/kinderbonus.py index 9aca5d745e..75f3b4532f 100644 --- a/src/gettsim/germany/kinderbonus/kinderbonus.py +++ b/src/gettsim/germany/kinderbonus/kinderbonus.py @@ -8,10 +8,10 @@ @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: float) -> float: +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 a75ee1e015..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) diff --git a/src/gettsim/germany/kindergeld/kindergeld.py b/src/gettsim/germany/kindergeld/kindergeld.py index ce32e2b9b0..59beebdd2e 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.py +++ b/src/gettsim/germany/kindergeld/kindergeld.py @@ -9,6 +9,7 @@ AggType, ConsecutiveIntLookupTableParamValue, TTSIMUnit, + agg_by_group_function, agg_by_p_id_function, cast_unit, get_consecutive_int_lookup_table_param_value, @@ -32,12 +33,24 @@ def anzahl_ansprüche( pass +@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. @@ -45,7 +58,7 @@ def betrag_ohne_staffelung_m( of children. """ - return satz * anzahl_ansprüche + return satz_m * anzahl_ansprüche @policy_function( @@ -87,7 +100,7 @@ def leistungsbegründendes_kind_nach_lohn( 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. @@ -99,7 +112,7 @@ 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) ) diff --git a/src/gettsim/germany/kindergeld/kindergeld.yaml b/src/gettsim/germany/kindergeld/kindergeld.yaml index ccd8261ff2..d16546d6ee 100644 --- a/src/gettsim/germany/kindergeld/kindergeld.yaml +++ b/src/gettsim/germany/kindergeld/kindergeld.yaml @@ -33,7 +33,6 @@ 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: EUR_PER_MONTH type: require_converter 1975-01-01: unit: DM_PER_MONTH @@ -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. @@ -183,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. @@ -192,7 +191,6 @@ maximales_einkommen_des_kindes: § 32 (4) EStG. Wurde 2012 durch eine Höchstgrenze der gearbeiteten Stunden ersetzt. en: null - unit: EUR_PER_YEAR type: scalar 1996-01-01: unit: DM_PER_YEAR @@ -233,7 +231,7 @@ maximale_arbeitsstunden_des_kindes: 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) diff --git a/src/gettsim/germany/kinderzuschlag/einkommen.py b/src/gettsim/germany/kinderzuschlag/einkommen.py index fec65fcea8..0fa2d53444 100644 --- a/src/gettsim/germany/kinderzuschlag/einkommen.py +++ b/src/gettsim/germany/kinderzuschlag/einkommen.py @@ -16,7 +16,6 @@ RoundingSpec, TTSIMUnit, agg_by_group_function, - cast_unit, param_function, policy_function, ) @@ -26,7 +25,7 @@ @agg_by_group_function( - start_date="2005-01-01", agg_type=AggType.SUM, unit=TTSIMUnit.DIMENSIONLESS.PER_BG + 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 @@ -180,10 +179,7 @@ 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). """ - # Per-child Satz times the number of children is the BG-level child total. - return erwachsenenbedarf_m_bg + cast_unit( - satz_m * anzahl_kinder_bg, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG - ) + return erwachsenenbedarf_m_bg + satz_m * anzahl_kinder_bg @policy_function(start_date="2008-10-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) @@ -198,14 +194,11 @@ 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"] - - # The statutory thresholds apply to the Bedarfsgemeinschaft as a whole. - return cast_unit(out, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + return mindesteinkommen["paar"] @policy_function(start_date="2005-01-01", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) @@ -353,7 +346,7 @@ def wohnbedarf_anteil_eltern_bg( ) kinderbetrag = min( - cast_unit(anzahl_kinder_bg, TTSIMUnit.DIMENSIONLESS), + anzahl_kinder_bg, wohnbedarf_anteil_berücksichtigte_kinder, ) * (existenzminimum.kosten_der_unterkunft.kind + existenzminimum.heizkosten.kind) diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py index 853c98c1b9..8eb7541f9f 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.py @@ -23,7 +23,7 @@ ) 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 @@ -40,9 +40,7 @@ def satz_mit_gestaffeltem_kindergeld( + existenzminimum.kosten_der_unterkunft.kind + existenzminimum.heizkosten.kind ) - - cast_unit( - kindergeld__satz_nach_anzahl_kinder.look_up(1), TTSIMUnit.CURRENCY.PER_MONTH - ), + - kindergeld__satz_gestaffelt.look_up(1), satz_vorjahr_ohne_kindersofortzuschlag, ) @@ -167,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 cast_unit( - familie__anzahl_erwachsene_bg, TTSIMUnit.DIMENSIONLESS - ) >= 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 @@ -206,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 cast_unit(familie__anzahl_erwachsene_bg, TTSIMUnit.DIMENSIONLESS) >= 1 + and (familie__anzahl_erwachsene_bg >= 1) ): out = max(basisbetrag_kind_m_bg - anzurechnendes_einkommen_eltern_m_bg, 0.0) else: @@ -237,9 +235,9 @@ def basisbetrag_m_bg_check_mindestbruttoeinkommen( (familie__anzahl_erwachsene_bg >= 1). """ - if (bruttoeinkommen_eltern_m_bg >= mindestbruttoeinkommen_m_bg) and cast_unit( - familie__anzahl_erwachsene_bg, TTSIMUnit.DIMENSIONLESS - ) >= 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 @@ -263,9 +261,7 @@ def basisbetrag_kind_m_bis_2022( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = cast_unit( - kindergeld__ist_leistungsbegründendes_kind, TTSIMUnit.DIMENSIONLESS - ) * ( + out = kindergeld__ist_leistungsbegründendes_kind * ( satz_m - entzugsrate_kindeseinkommen * ( @@ -294,9 +290,7 @@ def basisbetrag_kind_m_ab_2023( entzugsrate_kindeseinkommen: float, ) -> float: """Kinderzuschlag after income for each possibly eligible child is considered.""" - out = cast_unit( - kindergeld__ist_leistungsbegründendes_kind, TTSIMUnit.DIMENSIONLESS - ) * ( + out = kindergeld__ist_leistungsbegründendes_kind * ( satz_m - entzugsrate_kindeseinkommen * ( diff --git a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml index cfc43c392f..a5d7147144 100644 --- a/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml +++ b/src/gettsim/germany/kinderzuschlag/kinderzuschlag.yaml @@ -54,7 +54,7 @@ mindesteinkommen: description: de: § 6a (1) Nr. 2 BKGG. en: null - unit: EUR_PER_MONTH + unit: EUR_PER_MONTH.PER_BG type: dict 2008-10-01: single: 600 diff --git a/src/gettsim/germany/lohnsteuer/einkommen.py b/src/gettsim/germany/lohnsteuer/einkommen.py index 43ff53a837..539468e3da 100644 --- a/src/gettsim/germany/lohnsteuer/einkommen.py +++ b/src/gettsim/germany/lohnsteuer/einkommen.py @@ -29,7 +29,7 @@ def einkommen_y_bis_2025( 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).""" @@ -45,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 @@ -71,7 +71,7 @@ def einkommen_y_ab_2026( 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: @@ -94,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 @@ -346,7 +346,7 @@ def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( vorsorge_rentenversicherungsbeiträge_y: float, vorsorge_gesetzliche_krankenversicherungsbeiträge_y: float, vorsorge_arbeitslosenversicherungsbeiträge_y: float, - vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge: float, + vorsorgeaufwendungen_grenze_zur_berücksichtigung_arbeitslosenversicherungsbeiträge_y: float, ) -> float: """Vorsorgepauschale considering unemployment insurance contributions. @@ -358,7 +358,7 @@ def vorsorgepauschale_mit_arbeitslosenversicherungsbeiträgen_y( summe_av_kv_pv = min( 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 diff --git a/src/gettsim/germany/lohnsteuer/lohnsteuer.py b/src/gettsim/germany/lohnsteuer/lohnsteuer.py index ea587e2834..b1a1a660c7 100644 --- a/src/gettsim/germany/lohnsteuer/lohnsteuer.py +++ b/src/gettsim/germany/lohnsteuer/lohnsteuer.py @@ -122,9 +122,7 @@ def splittingtarif_y( ) -@policy_function( - verify_units=False, start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR -) +@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, @@ -203,9 +201,7 @@ def splittingtarif_mit_kinderfreibetrag_y( ) -@policy_function( - verify_units=False, start_date="2015-01-01", unit=TTSIMUnit.CURRENCY.PER_YEAR -) +@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, diff --git a/src/gettsim/germany/lohnsteuer/vorsorge.yaml b/src/gettsim/germany/lohnsteuer/vorsorge.yaml index 281b7a337c..587b2b80ca 100644 --- a/src/gettsim/germany/lohnsteuer/vorsorge.yaml +++ b/src/gettsim/germany/lohnsteuer/vorsorge.yaml @@ -19,7 +19,6 @@ parameter_einführungsfaktor_rentenversicherungsaufwendungen: prematurely set to 100 percent. input_unit: CALENDAR_YEAR output_unit: DIMENSIONLESS - # type: require_converter type: piecewise_linear 2005-01-01: intervals: @@ -74,7 +73,7 @@ maximal_absetzbare_krankenversicherungskosten: 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 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 ff03391f66..b7161b6776 100644 --- "a/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" +++ "b/src/gettsim/germany/solidarit\303\244tszuschlag/solidarit\303\244tszuschlag.py" @@ -30,7 +30,6 @@ def solidaritätszuschlagstarif( @policy_function( - verify_units=False, end_date="2008-12-31", leaf_name="betrag_y_sn", unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, @@ -64,7 +63,6 @@ def betrag_y_sn_ohne_abgelt_st( @policy_function( - verify_units=False, start_date="2009-01-01", leaf_name="betrag_y_sn", unit=TTSIMUnit.CURRENCY.PER_YEAR.PER_SN, 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 4b47211286..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,8 +8,6 @@ parameter_solidaritätszuschlag: Ab 1995, der upper threshold im Intervall 1 ist nach der Formel transition_threshold in soli_st.py berechnet. en: null - input_unit: EUR_PER_YEAR - output_unit: EUR_PER_YEAR type: piecewise_linear 1991-01-01: input_unit: DM_PER_YEAR @@ -28,9 +26,6 @@ parameter_solidaritätszuschlag: intercept: 0 1995-01-01: reference: Artikel 31 G. v. 23.06.1993 BGBl. I S. 944. - note: >- - § 3 Abs. 3 Nr. 2 SolzG nennt die Freigrenze von 1 332 Deutsche Mark, § 4 den - Satz von 7,5 vom Hundert. intervals: - interval: (-inf, 1332) intercept: 0 @@ -41,9 +36,6 @@ parameter_solidaritätszuschlag: slope: 0.075 1998-01-01: reference: Artikel 1 G. v. 21.11.1997 BGBl. I S. 2743. - note: >- - Das Gesetz hebt die Freigrenze des § 3 Abs. 3 Nr. 2 SolzG auf 1 836 Deutsche - Mark und senkt den Satz des § 4 auf 5,5 vom Hundert. intervals: - interval: (-inf, 1836) slope: 0 diff --git a/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml index ea1df7e438..632549414b 100644 --- a/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml +++ b/src/gettsim/germany/sozialversicherung/arbeitslosen/betrag.yaml @@ -1,12 +1,11 @@ --- -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: EUR_PER_MONTH type: scalar 1999-08-01: unit: DM_PER_MONTH diff --git a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml index e28afe8bdd..36948e3039 100644 --- a/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/kranken/beitrag/beitragsbemessungsgrenze.yaml @@ -11,7 +11,6 @@ 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: EUR_PER_MONTH type: scalar 1984-01-01: unit: DM_PER_MONTH @@ -105,17 +104,12 @@ 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: EUR_PER_MONTH type: dict 1990-01-01: unit: DM_PER_MONTH west: 4725 ost: 2025 reference: § 6 Abs. 7 SGB V; Anlage 2 SGB VI. - note: >- - Die Grenze beträgt drei Viertel der Beitragsbemessungsgrenze der - Rentenversicherung; die Deutsche-Mark-Beträge folgen daher aus den - Rechengrößenverordnungen und nicht aus einer Umrechnung. 1991-01-01: west: 4875 ost: 2250 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 e3b4761bbf..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" @@ -10,7 +10,6 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, TTSIMUnit, - cast_unit, policy_function, ) @@ -32,11 +31,7 @@ def altersgrenze_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -57,11 +52,7 @@ def altersgrenze_vorzeitig_mit_staffelung( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) 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 4ab4c46f1a..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" @@ -7,7 +7,6 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, TTSIMUnit, - cast_unit, policy_function, ) @@ -32,11 +31,7 @@ def altersgrenze_gestaffelt_ab_1989( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) 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 c1c9a46e65..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 @@ -14,7 +14,6 @@ from gettsim.tt import ( ConsecutiveIntLookupTableParamValue, TTSIMUnit, - cast_unit, policy_function, ) @@ -34,11 +33,7 @@ def altersgrenze_bis_1996( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -101,11 +96,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_bis_1996_07( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -170,11 +161,7 @@ def altersgrenze_ohne_vertrauensschutz( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_gestaffelt.look_up(birth_month_since_ad) @@ -186,11 +173,7 @@ def altersgrenze_mit_vertrauensschutz( altersgrenze_gestaffelt_vertrauensschutz: ConsecutiveIntLookupTableParamValue, ) -> float: """Full retirement age for unemployed for individuals under Vertrauensschutz.""" - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_gestaffelt_vertrauensschutz.look_up(birth_month_since_ad) @@ -212,11 +195,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_12_1989_bis_09_1996( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) @@ -238,11 +217,7 @@ def altersgrenze_vorzeitig_ohne_vertrauensschutz_ab_07_2004( Does not check for eligibility for this pathway into retirement. """ - birth_month_since_ad = cast_unit( - y_to_m(cast_unit(geburtsjahr, TTSIMUnit.YEARS)) - + cast_unit(geburtsmonat - 1, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, - ) + birth_month_since_ad = y_to_m(geburtsjahr) + (geburtsmonat - 1) return altersgrenze_vorzeitig_gestaffelt.look_up(birth_month_since_ad) diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml index 4bc5a30a69..6f52442fa5 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/beitragsbemessungsgrenze.yaml @@ -10,146 +10,109 @@ beitragsbemessungsgrenze_y: en: >- Maximum amount of income subject to statutory pension insurance contributions (Anlage 2 SGB VI). - unit: EUR_PER_YEAR type: scalar 1949-01-01: value: 3600 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_PER_YEAR 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_PER_YEAR 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_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1960-01-01: value: 10200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1961-01-01: value: 10800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1962-01-01: value: 11400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1963-01-01: value: 12000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 13200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 14400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 15600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 16800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 19200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 20400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 21600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 22800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 25200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 27600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 30000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 33600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 37200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 40800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 44400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 48000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 50400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 52800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 56400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 60000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 62400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 64800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 67200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 68400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 72000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1989-01-01: value: 73200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1990-01-01: note: >- @@ -161,7 +124,6 @@ beitragsbemessungsgrenze_y: reference: V. v. 25.11.2024 BGBl. 2024 I Nr. 365 2026-01-01: value: 101400 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -176,7 +138,6 @@ parameter_beitragsbemessungsgrenze_nach_wohnort: en: >- Maximum amount of income subject to statutory pension insurance contributions, with different values for West and East Germany. - unit: EUR_PER_MONTH type: dict 1990-01-01: unit: DM_PER_MONTH @@ -330,7 +291,6 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: en: >- Maximum amount of income subject to statutory miners' pension insurance contributions (West). - unit: EUR_PER_YEAR type: scalar 1949-01-01: value: 7200 @@ -339,132 +299,101 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: note: Anlage 2 SGB VI, Zeitraum 1.3.1947-31.5.1949. 1949-06-01: value: 8400 - unit: DM_PER_YEAR 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_PER_YEAR 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_PER_YEAR 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_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 16800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 18000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 19200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 20400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 22800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 24000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 25200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 27600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 30000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 33600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 37200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 40800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 45600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 50400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 55200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 57600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 61200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 64800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 69600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 73200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 76800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 80400 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 82800 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 85200 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 87600 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1989-01-01: value: 90000 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1990-01-01: value: 93600 - unit: DM_PER_YEAR 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 @@ -472,47 +401,36 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: Sozialversicherungs-Rechengrößenverordnung 1992 ergänzt. 1991-01-01: value: 96000 - unit: DM_PER_YEAR reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 1992-01-01: value: 100800 - unit: DM_PER_YEAR reference: § 3 V. v. 18.12.1991 BGBl. I S. 2331 1993-01-01: value: 106800 - unit: DM_PER_YEAR reference: V. v. 22.12.1992 BGBl. I S. 2474 1994-01-01: value: 112800 - unit: DM_PER_YEAR reference: V. v. 01.12.1993 BGBl. I S. 1987 1995-01-01: value: 115200 - unit: DM_PER_YEAR reference: V. v. 12.12.1994 BGBl. I S. 3806 1996-01-01: value: 117600 - unit: DM_PER_YEAR reference: V. v. 04.12.1995 BGBl. I S. 1577 1997-01-01: value: 121200 - unit: DM_PER_YEAR reference: V. v. 11.12.1996 BGBl. I S. 1870 1998-01-01: value: 123600 - unit: DM_PER_YEAR reference: V. v. 02.12.1997 BGBl. I S. 2782 1999-01-01: value: 124800 - unit: DM_PER_YEAR reference: V. v. 18.12.1998 BGBl. I S. 3823 2000-01-01: value: 127200 - unit: DM_PER_YEAR reference: V. v. 29.11.1999 BGBl. I S. 2375 2001-01-01: value: 128400 - unit: DM_PER_YEAR reference: V. v. 13.12.2000 BGBl. I S. 1710 2002-01-01: value: 66600 @@ -520,115 +438,91 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_west_y: reference: V. v. 03.12.2001 BGBl. I S. 3302 2003-01-01: value: 75000 - unit: EUR_PER_YEAR reference: V. v. 17.12.2002 BGBl. I S. 4561 2004-01-01: value: 76200 - unit: EUR_PER_YEAR reference: V. v. 09.12.2003 BGBl. I S. 2497 2005-01-01: value: 76800 - unit: EUR_PER_YEAR reference: V. v. 29.11.2004 BGBl. I S. 3098 2006-01-01: value: 77400 - unit: EUR_PER_YEAR reference: V. v. 21.12.2005 BGBl. I S. 3627 2007-01-01: value: 77400 - unit: EUR_PER_YEAR reference: G. v. 02.12.2006 BGBl. I S. 2742 2008-01-01: value: 78600 - unit: EUR_PER_YEAR reference: V. v. 05.12.2007 BGBl. I S. 2797 2009-01-01: value: 79800 - unit: EUR_PER_YEAR reference: V. v. 02.12.2008 BGBl. I S. 2336 2010-01-01: value: 81600 - unit: EUR_PER_YEAR reference: V. v. 07.12.2009 BGBl. I S. 3846 2011-01-01: value: 81000 - unit: EUR_PER_YEAR reference: V. v. 03.12.2010 BGBl. I S. 1761 2012-01-01: value: 82800 - unit: EUR_PER_YEAR reference: V. v. 02.12.2011 BGBl. I S. 2421 2013-01-01: value: 85200 - unit: EUR_PER_YEAR reference: V. v. 26.11.2012 BGBl. I S. 2361 2014-01-01: value: 87600 - unit: EUR_PER_YEAR reference: V. v. 02.12.2013 BGBl. I S. 4038 2015-01-01: value: 89400 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2015 vom 1. Dezember 2014 BGBl. I S. 1957 2016-01-01: value: 91800 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2016 vom 30. November 2015 BGBl. I S. 2137 2017-01-01: value: 94200 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2017 vom 28. November 2016 BGBl. I S. 2665 2018-01-01: value: 96000 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2018 vom 16. November 2017 BGBl. I S. 3778 2019-01-01: value: 98400 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2019 vom 27. November 2018 BGBl. I S. 2024 2020-01-01: value: 101400 - unit: EUR_PER_YEAR reference: Art. 3 V. v. 17.12.2019 BGBl I S. 2848. 2021-01-01: value: 104400 - unit: EUR_PER_YEAR reference: §3 V. v. 30.11.2020 BGBl. I S. 2612. 2022-01-01: value: 103800 - unit: EUR_PER_YEAR reference: §3 V. v. 30.11.2021, BGBl. I S. 5044. 2023-01-01: value: 107400 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2023 vom 28. November 2022 BGBl. I S. 2128 2024-01-01: value: 111600 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2024 vom 24. November 2023 BGBl. 2023 I Nr. 322 2025-01-01: value: 118800 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2025 vom 25. November 2024 BGBl. 2024 I Nr. 365 2026-01-01: value: 124800 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 @@ -645,62 +539,48 @@ 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: EUR_PER_YEAR type: scalar 1990-01-01: value: 32400 - unit: DM_PER_YEAR 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_PER_YEAR 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_PER_YEAR 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_PER_YEAR reference: § 2 V. v. 19.12.1991 BGBl. I S. 2344 (3. Rentenanpassungsverordnung) 1993-01-01: value: 78000 - unit: DM_PER_YEAR reference: V. v. 22.12.1992 BGBl. I S. 2474 1994-01-01: value: 87600 - unit: DM_PER_YEAR reference: V. v. 01.12.1993 BGBl. I S. 1987 1995-01-01: value: 93600 - unit: DM_PER_YEAR reference: V. v. 12.12.1994 BGBl. I S. 3806 1996-01-01: value: 100800 - unit: DM_PER_YEAR reference: V. v. 04.12.1995 BGBl. I S. 1577 1997-01-01: value: 104400 - unit: DM_PER_YEAR reference: V. v. 11.12.1996 BGBl. I S. 1870 1998-01-01: value: 103200 - unit: DM_PER_YEAR reference: V. v. 02.12.1997 BGBl. I S. 2782 1999-01-01: value: 105600 - unit: DM_PER_YEAR reference: V. v. 18.12.1998 BGBl. I S. 3823 2000-01-01: value: 104400 - unit: DM_PER_YEAR reference: V. v. 29.11.1999 BGBl. I S. 2375 2001-01-01: value: 108000 - unit: DM_PER_YEAR reference: V. v. 13.12.2000 BGBl. I S. 1710 2002-01-01: value: 55800 @@ -708,103 +588,81 @@ beitragsbemessungsgrenze_knappschaftliche_rentenversicherung_ost_y: reference: V. v. 03.12.2001 BGBl. I S. 3302 2003-01-01: value: 63000 - unit: EUR_PER_YEAR reference: V. v. 17.12.2002 BGBl. I S. 4561 2004-01-01: value: 64200 - unit: EUR_PER_YEAR reference: V. v. 09.12.2003 BGBl. I S. 2497 2005-01-01: value: 64800 - unit: EUR_PER_YEAR reference: V. v. 29.11.2004 BGBl. I S. 3098 2006-01-01: value: 64800 - unit: EUR_PER_YEAR reference: V. v. 21.12.2005 BGBl. I S. 3627 2007-01-01: value: 66600 - unit: EUR_PER_YEAR reference: G. v. 02.12.2006 BGBl. I S. 2742 2008-01-01: value: 66600 - unit: EUR_PER_YEAR reference: V. v. 05.12.2007 BGBl. I S. 2797 2009-01-01: value: 67200 - unit: EUR_PER_YEAR reference: V. v. 02.12.2008 BGBl. I S. 2336 2010-01-01: value: 68400 - unit: EUR_PER_YEAR reference: V. v. 07.12.2009 BGBl. I S. 3846 2011-01-01: value: 70800 - unit: EUR_PER_YEAR reference: V. v. 03.12.2010 BGBl. I S. 1761 2012-01-01: value: 70800 - unit: EUR_PER_YEAR reference: V. v. 02.12.2011 BGBl. I S. 2421 2013-01-01: value: 72600 - unit: EUR_PER_YEAR reference: V. v. 26.11.2012 BGBl. I S. 2361 2014-01-01: value: 73800 - unit: EUR_PER_YEAR reference: V. v. 02.12.2013 BGBl. I S. 4038 2015-01-01: value: 76200 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2015 vom 1. Dezember 2014 BGBl. I S. 1957 2016-01-01: value: 79800 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2016 vom 30. November 2015 BGBl. I S. 2137 2017-01-01: value: 84000 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2017 vom 28. November 2016 BGBl. I S. 2665 2018-01-01: value: 85800 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2018 vom 16. November 2017 BGBl. I S. 3778 2019-01-01: value: 91200 - unit: EUR_PER_YEAR reference: >- Sozialversicherungs-Rechengrößenverordnung 2019 vom 27. November 2018 BGBl. I S. 2024 2020-01-01: value: 94800 - unit: EUR_PER_YEAR reference: V. v. 17.12.2019 BGBl. I S. 2848 2021-01-01: value: 99000 - unit: EUR_PER_YEAR reference: V. v. 30.11.2020 BGBl. I S. 2612 2022-01-01: value: 100200 - unit: EUR_PER_YEAR reference: V. v. 30.11.2021 BGBl. I S. 5044 2023-01-01: value: 104400 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2023 vom 28. November 2022 BGBl. I S. 2128 2024-01-01: value: 110400 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2024 vom 24. November 2023 BGBl. 2023 I Nr. 322 diff --git a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml index 46207db341..4ccad1f14e 100644 --- a/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/beitrag/rentenanpassungsformel.yaml @@ -53,15 +53,10 @@ beitragsvolumen: en: >- Sum of contributions to the pension insurance of all employees subject to pension insurance, marginally employed and recipients of ALG. - unit: EUR_PER_YEAR type: scalar 1991-01-01: unit: DM_PER_YEAR value: 212575251 - note: >- - Statistik der Deutschen Rentenversicherung, kein gesetzlicher Betrag; sie steht - nicht im Bundesgesetzblatt. Die Statistik weist die Reihe durchgängig in Euro aus; - die Werte bis 2001 sind mit dem amtlichen Kurs umgerechnet. 1992-01-01: value: 229534253 1993-01-01: @@ -164,10 +159,6 @@ gesamtes_rentenvolumen: 1991-01-01: unit: DM_PER_YEAR value: 230615827 - note: >- - Statistik der Deutschen Rentenversicherung, kein gesetzlicher Betrag; sie steht - nicht im Bundesgesetzblatt. Die Statistik weist die Reihe durchgängig in Euro aus; - die Werte bis 2001 sind mit dem amtlichen Kurs umgerechnet. 1992-01-01: value: 256020103 1993-01-01: 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/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 From bd8a59e42402e62893fec79cc2f55ad389f731bd Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Sat, 18 Jul 2026 09:07:11 +0200 Subject: [PATCH 65/65] Review finished. --- src/gettsim/germany/__init__.py | 10 +-- src/gettsim/germany/inputs.py | 6 +- .../beitrag/selbstst\303\244ndige.yaml" | 2 - .../germany/sozialversicherung/midijob.py | 7 +- .../germany/sozialversicherung/minijob.yaml | 4 +- .../rente/alter_bei_renteneintritt.py | 9 ++- .../rente/entgeltpunkte.yaml | 77 ------------------ .../erwerbsminderung/erwerbsminderung.py | 79 +++++++------------ .../rente/grundrente/grundrente.py | 9 +-- .../rente/grundrente/rentenformel.yaml | 4 +- .../rente/rentenformel.yaml | 9 +-- .../unterhaltsvorschuss.py | 19 +---- .../unterhaltsvorschuss.yaml | 17 +++- .../vorrangpr\303\274fungen.py" | 12 +-- src/gettsim/germany/wohnen/inputs.py | 4 +- src/gettsim/germany/wohngeld/einkommen.py | 21 ++--- src/gettsim/germany/wohngeld/einkommen.yaml | 7 +- src/gettsim/germany/wohngeld/inputs.py | 2 +- src/gettsim/germany/wohngeld/miete.py | 44 +++-------- src/gettsim/germany/wohngeld/miete.yaml | 32 ++------ .../germany/wohngeld/voraussetzungen.py | 36 ++++----- src/gettsim/germany/wohngeld/wohngeld.py | 19 ++--- src/gettsim/germany/wohngeld/wohngeld.yaml | 5 +- 23 files changed, 124 insertions(+), 310 deletions(-) diff --git a/src/gettsim/germany/__init__.py b/src/gettsim/germany/__init__.py index e528253665..a8f3834926 100644 --- a/src/gettsim/germany/__init__.py +++ b/src/gettsim/germany/__init__.py @@ -6,15 +6,7 @@ ROOT_PATH = Path(__file__).parent -# Germany's unit system, built on import so the [currency] dimension has concrete -# currencies and the fluent builder offers `TTSIMUnit.X.PER_HH` / `per_bg` / … before -# the policy modules (whose decorators use them) are loaded (GEP 10). The euro is -# the base currency; the Deutsche Mark is worth 1/1.95583 euro, the rate fixed by -# the Euro-Einführungsgesetz. The statutory-currency mapping tells the engine -# which currency each policy date computes in: the Deutsche Mark through 2001 and -# the euro from 2002, when the euro became legal tender. Parameters are never -# converted (GEP 10) — every pre-2002 currency value carries its statutory DM -# amount, every value from 2002 its statutory euro amount. + UNIT_SYSTEM = UnitSystem( base_currency="EUR", other_currencies={"DM": "EUR / 1.95583"}, diff --git a/src/gettsim/germany/inputs.py b/src/gettsim/germany/inputs.py index 8faaf185b0..dc2fc0a9b1 100644 --- a/src/gettsim/germany/inputs.py +++ b/src/gettsim/germany/inputs.py @@ -32,12 +32,12 @@ def geburtsjahr() -> int: """Birth year.""" -@policy_input(unit=TTSIMUnit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.CALENDAR_MONTH) def geburtsmonat() -> int: """Month of birth (within year).""" -@policy_input(unit=TTSIMUnit.DIMENSIONLESS) +@policy_input(unit=TTSIMUnit.CALENDAR_DAY) def geburtstag() -> int: """Day of birth (within month).""" @@ -57,6 +57,6 @@ def weiblich() -> bool: """Female.""" -@policy_input(end_date="2024-12-31", unit=TTSIMUnit.DIMENSIONLESS) +@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/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" "b/src/gettsim/germany/sozialversicherung/kranken/beitrag/selbstst\303\244ndige.yaml" index 9458bdcd04..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,7 +6,6 @@ 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: EUR_PER_MONTH type: scalar 1984-01-01: unit: DM_PER_MONTH @@ -41,7 +40,6 @@ 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: EUR_PER_MONTH type: dict add_jahresanfang: true 1990-01-01: diff --git a/src/gettsim/germany/sozialversicherung/midijob.py b/src/gettsim/germany/sozialversicherung/midijob.py index d6eaf8d02a..256424d325 100644 --- a/src/gettsim/germany/sozialversicherung/midijob.py +++ b/src/gettsim/germany/sozialversicherung/midijob.py @@ -24,7 +24,7 @@ def in_gleitzone( ) -@policy_function(verify_units=False, unit=TTSIMUnit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH) def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( einnahmen__bruttolohn_m: float, minijobgrenze_m: float, @@ -42,7 +42,6 @@ def beitragspflichtige_einnahmen_aus_midijob_arbeitnehmer_m( @param_function( - verify_units=False, start_date="2003-04-01", end_date="2004-12-31", leaf_name="midijob_faktor_f", @@ -86,7 +85,6 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_bis_2004( @param_function( - verify_units=False, start_date="2005-01-01", end_date="2022-09-30", leaf_name="midijob_faktor_f", @@ -130,7 +128,6 @@ def midijob_faktor_f_mit_minijob_steuerpauschale_ab_2005_bis_2022_09( @param_function( - verify_units=False, start_date="2022-10-01", leaf_name="midijob_faktor_f", unit=TTSIMUnit.DIMENSIONLESS, @@ -176,7 +173,6 @@ def midijob_faktor_f_ohne_minijob_steuerpauschale( @policy_function( - verify_units=False, start_date="2003-04-01", end_date="2022-09-30", leaf_name="midijob_bemessungsentgelt_m", @@ -208,7 +204,6 @@ def midijob_bemessungsentgelt_m_bis_09_2022( @policy_function( - verify_units=False, start_date="2022-10-01", leaf_name="midijob_bemessungsentgelt_m", unit=TTSIMUnit.CURRENCY.PER_MONTH, diff --git a/src/gettsim/germany/sozialversicherung/minijob.yaml b/src/gettsim/germany/sozialversicherung/minijob.yaml index 926be02415..c6b9ed0a14 100644 --- a/src/gettsim/germany/sozialversicherung/minijob.yaml +++ b/src/gettsim/germany/sozialversicherung/minijob.yaml @@ -6,7 +6,6 @@ minijobgrenze_m: description: de: Minijob § 8 (1) Nr. 1 SGB IV en: Minijob § 8 (1) Nr. 1 SGB IV - unit: EUR_PER_MONTH type: scalar 1984-01-01: unit: DM_PER_MONTH @@ -44,10 +43,9 @@ parameter_minijobgrenze_ost_west_unterschied: description: de: Minijob § 8 (1) Nr. 1 SGB IV en: Minijob § 8 (1) Nr. 1 SGB IV - unit: EUR_PER_MONTH + unit: DM_PER_MONTH type: dict 1990-01-01: - unit: DM_PER_MONTH west: 470 ost: 200 1991-01-01: diff --git a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py index 89270eaa58..a63f4b1568 100644 --- a/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py +++ b/src/gettsim/germany/sozialversicherung/rente/alter_bei_renteneintritt.py @@ -4,7 +4,7 @@ from ttsim.unit_converters import m_to_y -from gettsim.tt import TTSIMUnit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function(unit=TTSIMUnit.YEARS) @@ -22,7 +22,8 @@ def alter_bei_renteneintritt( month will be considered a month too young. Hence, subtract 1 additional month from monat_renteneintritt. """ - return (jahr_renteneintritt - geburtsjahr) + cast_unit( - m_to_y(monat_renteneintritt - geburtsmonat - 1), - TTSIMUnit.YEARS, + return ( + jahr_renteneintritt + - geburtsjahr + + m_to_y(monat_renteneintritt - geburtsmonat - 1) ) diff --git a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml index 7b3e3e2407..11c4723859 100644 --- a/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/entgeltpunkte.yaml @@ -10,7 +10,6 @@ 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: EUR_PER_YEAR type: scalar 1949-01-01: value: 2838 @@ -18,159 +17,120 @@ beitragspflichtiges_durchschnittsentgelt_y: reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1950-01-01: value: 3161 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1951-01-01: value: 3579 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1952-01-01: value: 3852 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1953-01-01: value: 4061 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1954-01-01: value: 4234 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1955-01-01: value: 4548 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1956-01-01: value: 4844 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1957-01-01: value: 5043 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1958-01-01: value: 5330 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1959-01-01: value: 5602 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1960-01-01: value: 6101 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1961-01-01: value: 6723 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1962-01-01: value: 7328 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1963-01-01: value: 7775 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1964-01-01: value: 8467 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1965-01-01: value: 9229 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1966-01-01: value: 9893 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1967-01-01: value: 10219 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1968-01-01: value: 10842 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1969-01-01: value: 11839 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1970-01-01: value: 13343 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1971-01-01: value: 14931 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1972-01-01: value: 16335 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1973-01-01: value: 18295 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1974-01-01: value: 20381 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1975-01-01: value: 21808 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1976-01-01: value: 23335 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1977-01-01: value: 24945 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1978-01-01: value: 26242 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1979-01-01: value: 27685 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1980-01-01: value: 29485 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1981-01-01: value: 30900 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1982-01-01: value: 32198 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1983-01-01: value: 33293 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1984-01-01: value: 34292 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1985-01-01: value: 35286 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1986-01-01: value: 36627 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1987-01-01: value: 37726 - unit: DM_PER_YEAR reference: Art. 1 G. v. 18.12.1989 BGBl. I S. 2261 1988-01-01: value: 38896 - unit: DM_PER_YEAR 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 @@ -178,55 +138,42 @@ beitragspflichtiges_durchschnittsentgelt_y: Sozialversicherungs-Rechengrößenverordnung 1992 ergänzt. 1989-01-01: value: 40063 - unit: DM_PER_YEAR reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 1990-01-01: value: 41946 - unit: DM_PER_YEAR reference: § 1 V. v. 18.12.1991 BGBl. I S. 2331 1991-01-01: value: 44421 - unit: DM_PER_YEAR reference: V. v. 22.12.1992 BGBl. I S. 2474 1992-01-01: value: 46820 - unit: DM_PER_YEAR reference: V. v. 01.12.1993 BGBl. I S. 1987 1993-01-01: value: 48178 - unit: DM_PER_YEAR reference: V. v. 12.12.1994 BGBl. I S. 3806 1994-01-01: value: 49142 - unit: DM_PER_YEAR reference: V. v. 04.12.1995 BGBl. I S. 1577 1995-01-01: value: 50665 - unit: DM_PER_YEAR reference: V. v. 11.12.1996 BGBl. I S. 1870 1996-01-01: value: 51678 - unit: DM_PER_YEAR reference: V. v. 02.12.1997 BGBl. I S. 2782 1997-01-01: value: 52143 - unit: DM_PER_YEAR reference: V. v. 18.12.1998 BGBl. I S. 3823 1998-01-01: value: 52925 - unit: DM_PER_YEAR reference: V. v. 29.11.1999 BGBl. I S. 2375 1999-01-01: value: 53507 - unit: DM_PER_YEAR reference: V. v. 13.12.2000 BGBl. I S. 1710 2000-01-01: value: 54256 - unit: DM_PER_YEAR reference: V. v. 03.12.2001 BGBl. I S. 3302 2001-01-01: value: 55216 - unit: DM_PER_YEAR reference: V. v. 17.12.2002 BGBl. I S. 4561 2002-01-01: value: 28626 @@ -234,89 +181,65 @@ beitragspflichtiges_durchschnittsentgelt_y: reference: V. v. 09.12.2003 BGBl. I S. 2497 2003-01-01: value: 28938 - unit: EUR_PER_YEAR reference: V. v. 29.11.2004 BGBl. I S. 3098 2004-01-01: value: 29060 - unit: EUR_PER_YEAR reference: V. v. 21.12.2005 BGBl. I S. 3627 2005-01-01: value: 29202 - unit: EUR_PER_YEAR 2006-01-01: value: 29494 - unit: EUR_PER_YEAR 2007-01-01: value: 29951 - unit: EUR_PER_YEAR 2008-01-01: value: 30625 - unit: EUR_PER_YEAR 2009-01-01: value: 30506 - unit: EUR_PER_YEAR 2010-01-01: value: 31144 - unit: EUR_PER_YEAR 2011-01-01: value: 32100 - unit: EUR_PER_YEAR 2012-01-01: value: 33002 - unit: EUR_PER_YEAR 2013-01-01: value: 33659 - unit: EUR_PER_YEAR 2014-01-01: value: 34514 - unit: EUR_PER_YEAR 2015-01-01: value: 35363 - unit: EUR_PER_YEAR 2016-01-01: value: 36187 - unit: EUR_PER_YEAR 2017-01-01: value: 37077 - unit: EUR_PER_YEAR 2018-01-01: value: 38212 - unit: EUR_PER_YEAR reference: V. v. 17.12.2019 BGBl. I S. 2848. 2019-01-01: value: 39301 - unit: EUR_PER_YEAR reference: V. v. 30.11.2020 BGBl. I S. 2612. 2020-01-01: value: 39167 - unit: EUR_PER_YEAR reference: §1 V. v. 30.11.2021, BGBl. I S. 5044. 2021-01-01: value: 40463 - unit: EUR_PER_YEAR reference: §3 V. v. 28.11.2022 BGBl. I S. 2128 (Nr. 47). 2022-01-01: value: 42053 - unit: EUR_PER_YEAR reference: §3 V. v. 24.11.2023 BGBl. 2023 I Nr. 322 2023-01-01: value: 44732 - unit: EUR_PER_YEAR reference: §3 V. v. 25.11.2024 BGBl. 2024 I Nr. 365. 2024-01-01: value: 47085 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 2025-01-01: value: 50493 - unit: EUR_PER_YEAR reference: §3 V. v. 25.11.2024 BGBl. 2024 I Nr. 365. note: Vorläufiges Durchschnittsentgelt 2026-01-01: value: 51944 - unit: EUR_PER_YEAR reference: >- Sozialversicherungsrechengrößen-Verordnung 2026 vom 24. November 2025 BGBl. 2025 I Nr. 278 diff --git a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py index 84c3d5b767..56e89bfa50 100644 --- a/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py +++ b/src/gettsim/germany/sozialversicherung/rente/erwerbsminderung/erwerbsminderung.py @@ -176,24 +176,17 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren additional earning points. They receive their average earned income points for each year between their age of retirement and the "Zurechnungszeitgrenze". """ - claiming_month_since_ad = cast_unit( - y_to_m( - cast_unit(sozialversicherung__rente__jahr_renteneintritt, TTSIMUnit.YEARS) - ) - + cast_unit(sozialversicherung__rente__monat_renteneintritt, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, + claiming_month_since_ad = ( + y_to_m(sozialversicherung__rente__jahr_renteneintritt) + + sozialversicherung__rente__monat_renteneintritt ) altersgrenze_zurechnungszeit = zurechnungszeitgrenze_gestaffelt.look_up( claiming_month_since_ad ) return ( - cast_unit( - altersgrenze_zurechnungszeit - - sozialversicherung__rente__alter_bei_renteneintritt, - TTSIMUnit.DIMENSIONLESS, - ) - * mean_entgeltpunkte_pro_bewertungsmonat - ) + altersgrenze_zurechnungszeit + - sozialversicherung__rente__alter_bei_renteneintritt + ) * mean_entgeltpunkte_pro_bewertungsmonat @policy_function( @@ -216,12 +209,8 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_einheitlicher_altersgre year between their age of retirement and the "Zurechnungszeitgrenze". """ return ( - cast_unit( - zurechnungszeitgrenze - sozialversicherung__rente__alter_bei_renteneintritt, - TTSIMUnit.DIMENSIONLESS, - ) - * mean_entgeltpunkte_pro_bewertungsmonat - ) + zurechnungszeitgrenze - (sozialversicherung__rente__alter_bei_renteneintritt) + ) * mean_entgeltpunkte_pro_bewertungsmonat @policy_function( @@ -244,24 +233,17 @@ def zusätzliche_entgeltpunkte_durch_zurechnungszeit_mit_gestaffelter_altersgren additional earning points. They receive their average earned income points for each year between their age of retirement and the "Zurechnungszeitgrenze". """ - claiming_month_since_ad = cast_unit( - y_to_m( - cast_unit(sozialversicherung__rente__jahr_renteneintritt, TTSIMUnit.YEARS) - ) - + cast_unit(sozialversicherung__rente__monat_renteneintritt, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, + claiming_month_since_ad = ( + y_to_m(sozialversicherung__rente__jahr_renteneintritt) + + sozialversicherung__rente__monat_renteneintritt ) altersgrenze_zurechnungszeit = zurechnungszeitgrenze_gestaffelt.look_up( claiming_month_since_ad ) return ( - cast_unit( - altersgrenze_zurechnungszeit - - sozialversicherung__rente__alter_bei_renteneintritt, - TTSIMUnit.DIMENSIONLESS, - ) - * mean_entgeltpunkte_pro_bewertungsmonat - ) + altersgrenze_zurechnungszeit + - (sozialversicherung__rente__alter_bei_renteneintritt) + ) * mean_entgeltpunkte_pro_bewertungsmonat @policy_function(start_date="2001-01-01", unit=TTSIMUnit.DIMENSIONLESS) @@ -339,12 +321,9 @@ def zugangsfaktor_mit_gestaffelter_altersgrenze( 63 without deductions if they can prove 40 years of (Pflichtbeiträge, Berücksichtigungszeiten and certain Anrechnungszeiten or Ersatzzeiten). """ - claiming_month_since_ad = cast_unit( - y_to_m( - cast_unit(sozialversicherung__rente__jahr_renteneintritt, TTSIMUnit.YEARS) - ) - + cast_unit(sozialversicherung__rente__monat_renteneintritt, TTSIMUnit.MONTHS), - TTSIMUnit.CALENDAR_MONTH, + claiming_month_since_ad = ( + y_to_m(sozialversicherung__rente__jahr_renteneintritt) + + sozialversicherung__rente__monat_renteneintritt ) if wartezeit_langjährig_versichert_erfüllt: @@ -447,18 +426,18 @@ def mean_entgeltpunkte_pro_bewertungsmonat_nach_wohnort( Legal reference: SGB VI § 72: Grundbewertung """ - # The valuation span is a plain count of Bewertungseinheiten, so the average - # earning points come out dimensionless. - belegungsfähiger_gesamtzeitraum = cast_unit( + belegungsfähiger_gesamtzeitraum = ( sozialversicherung__rente__alter_bei_renteneintritt - - altersgrenze_grundbewertung, - TTSIMUnit.DIMENSIONLESS, + - altersgrenze_grundbewertung ) return ( sozialversicherung__rente__entgeltpunkte_west + sozialversicherung__rente__entgeltpunkte_ost - ) / belegungsfähiger_gesamtzeitraum + ) / cast_unit( + belegungsfähiger_gesamtzeitraum, + TTSIMUnit.DIMENSIONLESS, + ) @policy_function( @@ -478,12 +457,12 @@ def mean_entgeltpunkte_pro_bewertungsmonat_einheitlich( Legal reference: SGB VI § 72: Grundbewertung """ - # The valuation span is a plain count of Bewertungseinheiten, so the average - # earning points come out dimensionless. - belegungsfähiger_gesamtzeitraum = cast_unit( + belegungsfähiger_gesamtzeitraum = ( sozialversicherung__rente__alter_bei_renteneintritt - - altersgrenze_grundbewertung, - TTSIMUnit.DIMENSIONLESS, + - 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/grundrente/grundrente.py b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py index d2e71c4d64..68cfbe5cc1 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/grundrente.py @@ -6,7 +6,6 @@ PiecewisePolynomialParamValue, RoundingSpec, TTSIMUnit, - cast_unit, piecewise_polynomial, policy_function, ) @@ -208,13 +207,9 @@ def höchstbetrag_m( - berücksichtigte_wartezeit_monate["min"] ) - # `increment` is a per-additional-month effect on the (monthly) Höchstwert, so the - # month count enters as a plain multiplier; the sum is the monthly Höchstwert. - return cast_unit( + return ( höchstwert_der_entgeltpunkte["base"] - + höchstwert_der_entgeltpunkte["increment"] - * cast_unit(months_above_thresh, TTSIMUnit.DIMENSIONLESS), - TTSIMUnit.DIMENSIONLESS.PER_MONTH, + + höchstwert_der_entgeltpunkte["increment"] * months_above_thresh ) diff --git a/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml b/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml index 4bff409aee..de06fb8c7c 100644 --- a/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/grundrente/rentenformel.yaml @@ -12,7 +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: DIMENSIONLESS + unit: + base: DIMENSIONLESS + increment: DIMENSIONLESS_PER_MONTH type: dict 2021-01-01: base: 0.0334 diff --git a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml index cd957cee73..de4e8cd7e5 100644 --- a/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml +++ b/src/gettsim/germany/sozialversicherung/rente/rentenformel.yaml @@ -14,7 +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: DIMENSIONLESS_PER_YEAR + unit: + vorzeitiger_renteneintritt: DIMENSIONLESS_PER_YEAR + späterer_renteneintritt: DIMENSIONLESS_PER_YEAR type: dict 2001-01-01: vorzeitiger_renteneintritt: 0.036 @@ -32,17 +34,12 @@ 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: EUR_PER_MONTH type: dict 1992-01-01: 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). - note: >- - § 68 Abs. 1 SGB VI bestimmt den aktuellen Rentenwert bis zum 30. Juni 1992 nicht - als Betrag, sondern als die Rente für einen Entgeltpunkt im Dezember 1991; der - West-Wert ist daher nicht im Bundesgesetzblatt beziffert. 1992-07-01: west: 42.63 ost: 26.57 diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py index 92929aedac..7ec4c509d9 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.py @@ -14,7 +14,6 @@ RoundingSpec, TTSIMUnit, agg_by_p_id_function, - cast_unit, join, param_function, policy_function, @@ -133,9 +132,7 @@ def kindergeld_erstes_kind_gestaffelt_m( kindergeld__satz_nach_anzahl_kinder: ConsecutiveIntLookupTableParamValue, ) -> float: """Kindergeld for first child when Kindergeld depends on number of children.""" - return cast_unit( - kindergeld__satz_nach_anzahl_kinder.look_up(1), TTSIMUnit.CURRENCY.PER_MONTH - ) + return kindergeld__satz_nach_anzahl_kinder.look_up(1) @policy_function( @@ -143,8 +140,6 @@ def kindergeld_erstes_kind_gestaffelt_m( end_date="2014-12-31", leaf_name="anspruchshöhe_m", unit=TTSIMUnit.CURRENCY.PER_MONTH, - # Plucks age bounds off a dict-of-dataclass parameter the dry-run cannot follow. - verify_units=False, ) def unterhaltsvorschuss_anspruch_m_2009_bis_2014( alter: int, @@ -195,8 +190,6 @@ def unterhaltsvorschuss_anspruch_m_2009_bis_2014( end_date="2015-12-31", leaf_name="anspruchshöhe_m", unit=TTSIMUnit.CURRENCY.PER_MONTH, - # Plucks age bounds off a dict-of-dataclass parameter the dry-run cannot follow. - verify_units=False, ) def anspruchshöhe_m_anwendungsvors( alter: int, @@ -230,9 +223,6 @@ def anspruchshöhe_m_anwendungsvors( end_date="2017-06-30", leaf_name="anspruchshöhe_m", unit=TTSIMUnit.CURRENCY.PER_MONTH, - # Plucks age bounds and Satz off a dict-of-dataclass parameter the dry-run - # cannot follow through the dict subscript. - verify_units=False, ) def anspruchshöhe_m_2016_bis_2017_06( alter: int, @@ -267,9 +257,6 @@ def anspruchshöhe_m_2016_bis_2017_06( start_date="2017-07-01", leaf_name="anspruchshöhe_m", unit=TTSIMUnit.CURRENCY.PER_MONTH, - # Plucks age bounds and Satz off a dict-of-dataclass parameter, which the - # dry-run cannot follow through the dict subscript. - verify_units=False, ) def anspruchshöhe_m_ab_2017_07( alter: int, @@ -330,10 +317,10 @@ def elternteil_mindesteinkommen_erreicht( @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", unit=TTSIMUnit.CURRENCY.PER_MONTH) diff --git a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml index e5d213888d..733d450590 100644 --- a/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml +++ b/src/gettsim/germany/unterhaltsvorschuss/unterhaltsvorschuss.yaml @@ -11,9 +11,18 @@ raw_mindestunterhalt: Minimum Child Alimony depending on age of child (0 - 5 years, 6 - 11 years, 12 - 17 years). 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} + 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: @@ -119,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 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 99697f96a6..c395db2f6b 100644 --- "a/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" +++ "b/src/gettsim/germany/vorrangpr\303\274fungen/vorrangpr\303\274fungen.py" @@ -26,13 +26,11 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_bis_2022( """ # TODO (@MImmesberger): Vorrangprüfung probably not precise for SGB XII households. # https://github.com/ttsim-dev/gettsim/issues/1165 - # The check assumes WTHH = BG, so compare BG-level resources against the BG need. - return cast_unit( + return ( arbeitslosengeld_2__anzurechnendes_einkommen_m_bg + cast_unit(wohngeld__anspruchshöhe_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg - >= arbeitslosengeld_2__regelbedarf_m_bg, - TTSIMUnit.DIMENSIONLESS, + >= arbeitslosengeld_2__regelbedarf_m_bg ) @@ -56,11 +54,9 @@ def wohngeld_kinderzuschlag_vorrangig_oder_günstiger_ab_2023( """ # TODO (@MImmesberger): Vorrangprüfung probably not precise for SGB XII households. # https://github.com/ttsim-dev/gettsim/issues/1165 - # The check assumes WTHH = BG, so compare BG-level resources against the BG need. - return cast_unit( + return ( bürgergeld__anzurechnendes_einkommen_m_bg + cast_unit(wohngeld__anspruchshöhe_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH.PER_BG) + kinderzuschlag__anspruchshöhe_m_bg - >= bürgergeld__regelbedarf_m_bg, - TTSIMUnit.DIMENSIONLESS, + >= bürgergeld__regelbedarf_m_bg ) diff --git a/src/gettsim/germany/wohnen/inputs.py b/src/gettsim/germany/wohnen/inputs.py index 0c3888f15c..f4ce7cf48a 100644 --- a/src/gettsim/germany/wohnen/inputs.py +++ b/src/gettsim/germany/wohnen/inputs.py @@ -5,12 +5,12 @@ from gettsim.tt import TTSIMUnit, policy_input -@policy_input(end_date="2008-12-31", unit=TTSIMUnit.CALENDAR_YEAR) +@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", unit=TTSIMUnit.DIMENSIONLESS) +@policy_input(start_date="2005-01-01", unit=TTSIMUnit.DIMENSIONLESS.PER_HH) def bewohnt_eigentum_hh() -> bool: """Owner-occupied housing.""" diff --git a/src/gettsim/germany/wohngeld/einkommen.py b/src/gettsim/germany/wohngeld/einkommen.py index de54874e04..425a2c035a 100644 --- a/src/gettsim/germany/wohngeld/einkommen.py +++ b/src/gettsim/germany/wohngeld/einkommen.py @@ -37,25 +37,24 @@ def alleinerziehendenbonus( @param_function(unit=UNSET_UNIT) -def min_einkommen_lookup_table( - min_einkommen: dict[int, float], +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( - unit=TTSIMUnit.CURRENCY.PER_MONTH, - # Clamps the look-up index with a raw `xnp` op reading the table's `.shape`, - # which the dry-run cannot evaluate symbolically. - verify_units=False, + 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. @@ -63,10 +62,12 @@ 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 + ], ) ) diff --git a/src/gettsim/germany/wohngeld/einkommen.yaml b/src/gettsim/germany/wohngeld/einkommen.yaml index a9277c4c97..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: EUR_PER_MONTH type: dict 1984-01-01: - unit: DM_PER_MONTH + unit: DM_PER_MONTH_PER_WTHH 1: 0 2: 0 3: 0 @@ -50,7 +49,7 @@ min_einkommen: Deutsche Mark ermitteltes Einkommen zuvor durch 1,95583 zu teilen; hier in Deutsche Mark umgerechnet. 2002-01-01: - unit: EUR_PER_MONTH + unit: EUR_PER_MONTH_PER_WTHH 1: 120 2: 150 3: 200 diff --git a/src/gettsim/germany/wohngeld/inputs.py b/src/gettsim/germany/wohngeld/inputs.py index 12ee6848e1..14a2fc8f71 100644 --- a/src/gettsim/germany/wohngeld/inputs.py +++ b/src/gettsim/germany/wohngeld/inputs.py @@ -5,6 +5,6 @@ from gettsim.tt import TTSIMUnit, policy_input -@policy_input(unit=TTSIMUnit.DIMENSIONLESS) +@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 2c2a6e0e79..3dad4f7801 100644 --- a/src/gettsim/germany/wohngeld/miete.py +++ b/src/gettsim/germany/wohngeld/miete.py @@ -9,7 +9,6 @@ UNSET_UNIT, ConsecutiveIntLookupTableParamValue, TTSIMUnit, - cast_unit, get_consecutive_int_lookup_table_param_value, param_function, policy_function, @@ -166,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(unit=TTSIMUnit.CURRENCY.PER_MONTH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def miete_m_wthh( miete_m_hh: float, anzahl_personen_wthh: int, @@ -175,22 +174,16 @@ def miete_m_wthh( """Rent considered in housing benefit calculation on wohngeldrechtlicher Teilhaushalt level. """ - return cast_unit( - miete_m_hh * (anzahl_personen_wthh / anzahl_personen_hh), - TTSIMUnit.CURRENCY.PER_MONTH, - ) + return miete_m_hh * (anzahl_personen_wthh / anzahl_personen_hh) -@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH) +@policy_function(unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH) def min_miete_m_hh( anzahl_personen_hh: int, min_miete_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Minimum rent considered in Wohngeld calculation.""" - return cast_unit( - min_miete_lookup.look_up(anzahl_personen_hh), - TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, - ) + return min_miete_lookup.look_up(anzahl_personen_hh) @policy_function( @@ -198,9 +191,6 @@ def min_miete_m_hh( end_date="2008-12-31", leaf_name="miete_m_hh", unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, - # Three input axes with different units resolved via `xnp.searchsorted`, which - # the dry-run cannot evaluate symbolically. - verify_units=False, ) def miete_m_hh_mit_baujahr( mietstufe_hh: int, @@ -237,11 +227,7 @@ def miete_m_hh_ohne_baujahr_ohne_heizkostenentlastung( max_miete_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - anzahl_personen = cast_unit(anzahl_personen_hh, TTSIMUnit.DIMENSIONLESS) - max_miete_m = cast_unit( - max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh), - TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, - ) + max_miete_m = max_miete_m_lookup.look_up(anzahl_personen_hh, mietstufe_hh) return max(min(wohnen__bruttokaltmiete_m_hh, max_miete_m), min_miete_m_hh) @@ -261,13 +247,9 @@ def miete_m_hh_mit_heizkostenentlastung( heizkostenentlastung_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - anzahl_personen = cast_unit(anzahl_personen_hh, TTSIMUnit.DIMENSIONLESS) - max_miete_m = cast_unit( - max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh), - TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, - ) + max_miete_m = max_miete_m_lookup.look_up(anzahl_personen_hh, mietstufe_hh) - heating_allowance_m = heizkostenentlastung_m_lookup.look_up(anzahl_personen) + heating_allowance_m = heizkostenentlastung_m_lookup.look_up(anzahl_personen_hh) return ( max(min(wohnen__bruttokaltmiete_m_hh, max_miete_m), min_miete_m_hh) @@ -291,17 +273,13 @@ def miete_m_hh_mit_heizkostenentlastung_dauerhafte_heizkostenkomponente_klimakom klimakomponente_m_lookup: ConsecutiveIntLookupTableParamValue, ) -> float: """Rent considered in housing benefit since 2009.""" - anzahl_personen = cast_unit(anzahl_personen_hh, TTSIMUnit.DIMENSIONLESS) - max_miete_m = cast_unit( - max_miete_m_lookup.look_up(anzahl_personen, mietstufe_hh), - TTSIMUnit.CURRENCY.PER_MONTH.PER_HH, - ) + max_miete_m = max_miete_m_lookup.look_up(anzahl_personen_hh, mietstufe_hh) - heizkostenentlastung = heizkostenentlastung_m_lookup.look_up(anzahl_personen) + heizkostenentlastung = heizkostenentlastung_m_lookup.look_up(anzahl_personen_hh) dauerhafte_heizkostenkomponente = dauerhafte_heizkostenkomponente_m_lookup.look_up( - anzahl_personen + anzahl_personen_hh ) - klimakomponente = klimakomponente_m_lookup.look_up(anzahl_personen) + klimakomponente = klimakomponente_m_lookup.look_up(anzahl_personen_hh) return ( max( min(wohnen__bruttokaltmiete_m_hh, max_miete_m + klimakomponente), diff --git a/src/gettsim/germany/wohngeld/miete.yaml b/src/gettsim/germany/wohngeld/miete.yaml index 5ca35c2537..f9105ac7ab 100644 --- a/src/gettsim/germany/wohngeld/miete.yaml +++ b/src/gettsim/germany/wohngeld/miete.yaml @@ -14,23 +14,9 @@ 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: EUR_PER_MONTH type: dict - 1984-01-01: - unit: DM_PER_MONTH - 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 @@ -46,7 +32,7 @@ raw_min_miete_m: 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; hier in + Deutsche Mark angegebene Miete zuvor durch 1,95583 zu teilen; daher hier in Deutsche Mark umgerechnet. 2002-01-01: unit: EUR_PER_MONTH @@ -130,7 +116,6 @@ raw_max_miete_m_nach_baujahr: - maximales Baujahr des Hauses - Mietstufe en: null - unit: EUR_PER_MONTH type: require_converter 1981-01-01: unit: DM_PER_MONTH @@ -241,7 +226,6 @@ raw_max_miete_m_nach_baujahr: 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: - unit: DM_PER_MONTH 1: 1965: 1: 285 @@ -397,7 +381,6 @@ raw_max_miete_m_nach_baujahr: Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. 1990-01-01: - unit: DM_PER_MONTH 1: 1965: 1: 285 @@ -577,7 +560,6 @@ raw_max_miete_m_nach_baujahr: Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. 1990-10-01: - unit: DM_PER_MONTH 1: 1965: 1: 310 @@ -715,7 +697,6 @@ raw_max_miete_m_nach_baujahr: Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. 1993-01-01: - unit: DM_PER_MONTH 1: 1965: 1: 310 @@ -895,7 +876,6 @@ raw_max_miete_m_nach_baujahr: Es wird eine Wohnung mit "Sammelheizung und mit Bad oder Duschraum" angenommen. 2001-01-01: - unit: DM_PER_MONTH 1: 1965: 1: 391.17 @@ -1030,7 +1010,7 @@ raw_max_miete_m_nach_baujahr: 6: 176.02 reference: Art. 5 G. v. 22.12.1999, BGBl I S. 2671. 2002-01-01: - unit: EUR_PER_MONTH + unit: EUR_PER_MONTH_PER_WTHH 1: 1965: 1: 200 @@ -1430,7 +1410,7 @@ raw_heizkostenentlastung_m: Amount of relief in heating costs due to CO2 pricing in Euro depending on household size input_unit: DIMENSIONLESS - output_unit: EUR_PER_MONTH_PER_HH + 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. @@ -1452,7 +1432,7 @@ raw_dauerhafte_heizkostenkomponente_m: Permanent heating cost component depending on household size introduced with the housing subsidy reform 2023 input_unit: DIMENSIONLESS - output_unit: EUR_PER_MONTH_PER_HH + 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 @@ -1476,7 +1456,7 @@ raw_klimakomponente_m: amounts pursuant to § 12 (1) in Euro depending on the size of the household; introduced with the housing subsidy reform 2023 input_unit: DIMENSIONLESS - output_unit: EUR_PER_MONTH_PER_HH + 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 25c908d5c5..180ac599f0 100644 --- a/src/gettsim/germany/wohngeld/voraussetzungen.py +++ b/src/gettsim/germany/wohngeld/voraussetzungen.py @@ -2,7 +2,7 @@ from __future__ import annotations -from gettsim.tt import TTSIMUnit, cast_unit, policy_function +from gettsim.tt import TTSIMUnit, policy_function @policy_function( @@ -31,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", unit=TTSIMUnit.DIMENSIONLESS) +@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, @@ -40,18 +40,16 @@ def vermögensgrenze_unterschritten_wthh( """Wealth is below the eligibility threshold for housing benefits.""" vermögensfreibetrag = parameter_vermögensfreibetrag[ "grundfreibetrag" - ] + parameter_vermögensfreibetrag["je_weitere_person"] * ( - cast_unit(anzahl_personen_wthh, TTSIMUnit.DIMENSIONLESS) - 1 - ) + ] + parameter_vermögensfreibetrag["je_weitere_person"] * (anzahl_personen_wthh - 1) - return cast_unit(vermögen_wthh, TTSIMUnit.CURRENCY) <= vermögensfreibetrag + return vermögen_wthh <= vermögensfreibetrag @policy_function( leaf_name="mindesteinkommen_erreicht_wthh", start_date="2005-01-01", end_date="2022-12-31", - unit=TTSIMUnit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS.PER_WTHH, ) def mindesteinkommen_erreicht_wthh_bis_2022( arbeitslosengeld_2__regelbedarf_m_wthh: float, @@ -69,15 +67,15 @@ def mindesteinkommen_erreicht_wthh_bis_2022( The allowance for discretionary judgment is ignored here. """ - return einkommen_für_mindesteinkommen_m_wthh >= cast_unit( - arbeitslosengeld_2__regelbedarf_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH + return ( + einkommen_für_mindesteinkommen_m_wthh >= arbeitslosengeld_2__regelbedarf_m_wthh ) @policy_function( leaf_name="mindesteinkommen_erreicht_wthh", start_date="2023-01-01", - unit=TTSIMUnit.DIMENSIONLESS, + unit=TTSIMUnit.DIMENSIONLESS.PER_WTHH, ) def mindesteinkommen_erreicht_wthh_ab_2023( bürgergeld__regelbedarf_m_wthh: float, @@ -95,16 +93,14 @@ def mindesteinkommen_erreicht_wthh_ab_2023( The allowance for discretionary judgment is ignored here. """ - return einkommen_für_mindesteinkommen_m_wthh >= cast_unit( - bürgergeld__regelbedarf_m_wthh, TTSIMUnit.CURRENCY.PER_MONTH - ) + return einkommen_für_mindesteinkommen_m_wthh >= bürgergeld__regelbedarf_m_wthh @policy_function( leaf_name="einkommen_für_mindesteinkommen_m_wthh", start_date="2005-01-01", end_date="2022-12-31", - unit=TTSIMUnit.CURRENCY.PER_MONTH, + 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, @@ -124,21 +120,20 @@ def einkommen_für_mindesteinkommen_m_wthh_bis_2022( Kindergeld count as income for this check. """ - return cast_unit( + return ( arbeitslosengeld_2__nettoeinkommen_vor_abzug_freibetrag_m_wthh + unterhalt__tatsächlich_erhaltener_betrag_m_wthh + unterhaltsvorschuss__betrag_m_wthh + kindergeld__betrag_m_wthh + kinderzuschlag__anspruchshöhe_m_wthh - + basisbetrag_m_wthh, - TTSIMUnit.CURRENCY.PER_MONTH, + + basisbetrag_m_wthh ) @policy_function( leaf_name="einkommen_für_mindesteinkommen_m_wthh", start_date="2023-01-01", - unit=TTSIMUnit.CURRENCY.PER_MONTH, + 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, @@ -158,12 +153,11 @@ def einkommen_für_mindesteinkommen_m_wthh_ab_2023( Kindergeld count as income for this check. """ - return cast_unit( + return ( bürgergeld__nettoeinkommen_vor_abzug_freibetrag_m_wthh + unterhalt__tatsächlich_erhaltener_betrag_m_wthh + unterhaltsvorschuss__betrag_m_wthh + kindergeld__betrag_m_wthh + kinderzuschlag__anspruchshöhe_m_wthh - + basisbetrag_m_wthh, - TTSIMUnit.CURRENCY.PER_MONTH, + + basisbetrag_m_wthh ) diff --git a/src/gettsim/germany/wohngeld/wohngeld.py b/src/gettsim/germany/wohngeld/wohngeld.py index 41f53a94cf..a1a00b781f 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.py +++ b/src/gettsim/germany/wohngeld/wohngeld.py @@ -65,9 +65,6 @@ def anspruchshöhe_m_wthh( reference="§ 19 WoGG Abs.2 Anlage 3", ), unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, - # Quadratic in (Miete, Einkommen); its per-currency coefficients are not - # spellable in the unit grammar (GEP 10 D1). - verify_units=False, ) def basisbetrag_m_wthh_bis_2000( anzahl_personen_wthh: int, @@ -102,9 +99,6 @@ def basisbetrag_m_wthh_bis_2000( reference="§ 19 WoGG Abs.2 Anlage 3", ), unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, - # Quadratic in (Miete, Einkommen); its per-currency coefficients are not - # spellable in the unit grammar (GEP 10 D1). - verify_units=False, ) def basisbetrag_m_wthh_2001( anzahl_personen_wthh: int, @@ -143,9 +137,6 @@ def basisbetrag_m_wthh_2001( reference="§ 19 WoGG Abs.2 Anlage 3", ), unit=TTSIMUnit.CURRENCY.PER_MONTH.PER_WTHH, - # Quadratic in (Miete, Einkommen); its per-currency coefficients are not - # spellable in the unit grammar (GEP 10 D1). - verify_units=False, ) def basisbetrag_m_wthh_ab_2002( anzahl_personen_wthh: int, @@ -192,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()} @@ -229,7 +220,7 @@ 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 @@ -252,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 dd619a182b..e24c79ea94 100644 --- a/src/gettsim/germany/wohngeld/wohngeld.yaml +++ b/src/gettsim/germany/wohngeld/wohngeld.yaml @@ -18,7 +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: DIMENSIONLESS + unit: PERSON_COUNT_PER_HH type: dict 1984-01-01: normale_berechnung: 12 @@ -547,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 @@ -566,7 +566,6 @@ 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: EUR_PER_MONTH type: scalar 2001-01-01: unit: DM_PER_MONTH