Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f911fe4
Implement PolicyInput class and policy_input decorator
timmens Apr 7, 2025
82af1f4
Rename test_policy_function -> test_function_types; add tests for pol…
timmens Apr 7, 2025
ac76af0
Implement TTSIMFunction as ABC and replace type unions by TTSIMFunction
timmens Apr 7, 2025
a1444d9
Incorporate comments from review
timmens Apr 8, 2025
2250810
Implement TTSIMObject and TTSIMFunction ABC classes
timmens Apr 8, 2025
992fe20
Use start and end date for aggregator classes
timmens Apr 8, 2025
a96a85c
Remove ABC classes and add more methods to parent class
timmens Apr 8, 2025
03c0e0e
Add test_bug.py for debugging
timmens Apr 8, 2025
977813d
Fix small bug
timmens Apr 8, 2025
10e035d
Move TYPES_INPUT_VARIABLES to policy_inputs.
hmgaudecker Apr 8, 2025
b72a6a9
Some renamings, but not there yet.
hmgaudecker Apr 8, 2025
b81925f
Add policy_input to ttsim namespace.
MImmesberger Apr 8, 2025
f03f488
Remove one TYPES_INPUT_VARIABLES.
MImmesberger Apr 8, 2025
b5ce828
Fix loader.
MImmesberger Apr 8, 2025
af66d73
Fix upserting functions in policy env.
MImmesberger Apr 8, 2025
58dcdc6
Restructure hierarchy. Will need to traverse the tree another time to…
hmgaudecker Apr 9, 2025
5e36858
Typing.
hmgaudecker Apr 9, 2025
45f9a2f
Remove documentation of input variables.
hmgaudecker Apr 9, 2025
891d503
pass in policy_input functions.
hmgaudecker Apr 9, 2025
b3f4e1e
Merge remote-tracking branch 'origin/collect-components-of-namespaces…
hmgaudecker Apr 9, 2025
b0d49b3
Get started on objects tree.
hmgaudecker Apr 9, 2025
37c800d
Merge branch 'collect-components-of-namespaces' into fix-833
hmgaudecker Apr 9, 2025
f9ab966
Fix some obvious errors.
hmgaudecker Apr 9, 2025
56f53a5
Move on a little bit.
hmgaudecker Apr 9, 2025
9d9d997
Fix ordering.
hmgaudecker Apr 9, 2025
79093f4
Remove the 'functions' layer in METTSIM.
hmgaudecker Apr 9, 2025
3866514
Dont try to convert policy inputs into policy functions.
MImmesberger Apr 9, 2025
4eefe1a
Fix import and add leaf name to DerivedAggregationFunction.
MImmesberger Apr 9, 2025
29167a6
Typo in typing.
MImmesberger Apr 9, 2025
7909043
Add resource_dir to helper function.
MImmesberger Apr 9, 2025
4f41ec4
Fix vectorization test.
MImmesberger Apr 9, 2025
fb0ecc0
Fix initialisation of derived functions.
hmgaudecker Apr 9, 2025
c6ef863
Merge branch 'fix-833' of https://github.com/iza-institute-of-labor-e…
MImmesberger Apr 9, 2025
0a9f671
Same same for derived time conversion.
hmgaudecker Apr 9, 2025
b81b5bd
Fix #842 and #837 (#862)
MImmesberger Apr 9, 2025
bbeeccf
Remove aggregation_target from test.
MImmesberger Apr 9, 2025
452403a
Add resource_dir to helper function.
MImmesberger Apr 9, 2025
23092a3
Moving on.
hmgaudecker Apr 9, 2025
e5cd016
Merge branch 'fix-833' of github.com:iza-institute-of-labor-economics…
hmgaudecker Apr 9, 2025
2c9cfc2
Almost there.
hmgaudecker Apr 9, 2025
0e48f98
Add Policyinputs to test.
MImmesberger Apr 9, 2025
3468be9
Merge branch 'fix-833' of https://github.com/iza-institute-of-labor-e…
MImmesberger Apr 9, 2025
fa84709
Make top-level namespace include potential derived functions (#865)
MImmesberger Apr 10, 2025
c8eab7f
Be a bit more specific about functions vs objects. Fix signatures of …
hmgaudecker Apr 10, 2025
f05a304
Update typing, some search & replace probably went wrong somewhere...
hmgaudecker Apr 10, 2025
ce7676a
Fix test_dates_active
hmgaudecker Apr 10, 2025
52d31b1
Fix date conversion checker.
hmgaudecker Apr 10, 2025
1e441ef
Split up functions and inputs in compute_taxes_and_transfers.
hmgaudecker Apr 10, 2025
8b1a07d
Replace RoundingDirection Enum by Literal, much easier to type.
hmgaudecker Apr 11, 2025
c1afaea
Merge branch 'fix-833' of github.com:iza-institute-of-labor-economics…
hmgaudecker Apr 11, 2025
106a074
Temp commit in the middle of changing aggregation spec.
hmgaudecker Apr 11, 2025
b75ad4e
Add tests for aggregations and infrastructure for METTSIM testing (#866)
MImmesberger Apr 11, 2025
5bf0048
Merge branch 'fix-833' of github.com:iza-institute-of-labor-economics…
hmgaudecker Apr 11, 2025
9f4d77e
Aggregation is getting there, we are missing the correct namespace fo…
hmgaudecker Apr 11, 2025
f9311d7
Fix interfaces of some tests.
hmgaudecker Apr 11, 2025
bc2724a
Clean up.
hmgaudecker Apr 11, 2025
343a780
Backup.
hmgaudecker Apr 11, 2025
3f4a39a
Consistent naming.
hmgaudecker Apr 11, 2025
210f3cb
Stop at a point where we need the common-basename foo.
hmgaudecker Apr 11, 2025
6af5133
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2025
e24efdf
Look for aggregation source via base name.
MImmesberger Apr 11, 2025
ecd4be9
Revert "Look for aggregation source via base name."
MImmesberger Apr 11, 2025
eff2810
Fix some more tests.
hmgaudecker Apr 11, 2025
7d8c8e5
Remove print and throw error.
MImmesberger Apr 11, 2025
037ae15
Fix one more test.
hmgaudecker Apr 11, 2025
1fbc486
Merge branch 'fix-833' of github.com:iza-institute-of-labor-economics…
hmgaudecker Apr 11, 2025
cac3d2f
Fix combine_functios tests.
MImmesberger Apr 11, 2025
db40873
Largely remove global SUPPORTED_GROUOPINGS and FOREIGN_KEYS.
hmgaudecker Apr 11, 2025
ec0676f
Add hh_id to mettsim. Also clean up test file a bit.
MImmesberger Apr 11, 2025
e57b888
Dont throw error if source col is not found in objects tree. Delegate…
MImmesberger Apr 11, 2025
392a239
Import groupings and foreign keys in aggregate by p id test.
MImmesberger Apr 11, 2025
340b1bd
Fix aggregation test.
MImmesberger Apr 11, 2025
4cfa73a
Call super.__post_init__ also for aggregation by p_id.
hmgaudecker Apr 12, 2025
e447f4c
Vectorization tests run again (Literal instead of RoundingDirection E…
hmgaudecker Apr 12, 2025
09e7645
Rename 'test_aggregate_by_p_id' to 'test_household_links' and move ba…
hmgaudecker Apr 12, 2025
7522973
Fix Lohnsteuer test, actually run the grundrente_proxy_rente test (no…
hmgaudecker Apr 12, 2025
f3c14cd
Nicer formatting of missing nodes.
hmgaudecker Apr 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/geps/gep-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,16 @@ functions of the taxes and transfer system should define a dictionary
`aggregation_specs` at the module level. This dictionary must specify the aggregated
columns as keys and the AggregateByGroupSpec data class as values. The data class
specifies the `source` (i.e. the column which is being aggregated) and the aggregation
method `aggr`.
method `agg`.

For example, in `household_characteristics.py`, we could have:

```
from ttsim.aggregation import AggregateByGroupSpec

aggregation_specs = {
"anzahl_kinder_hh": AggregateByGroupSpec(source="familie__kind", aggr="sum"),
"anzahl_personen_hh": AggregateByGroupSpec(aggr="count"),
"anzahl_kinder_hh": AggregateByGroupSpec(source="familie__kind", agg="sum"),
"anzahl_personen_hh": AggregateByGroupSpec(agg="count"),
}
```

Expand Down Expand Up @@ -293,7 +293,7 @@ from ttsim.aggregation import AggregateByGroupSpec
aggregation_specs = {
"kindergeld__betrag_m_bg": AggregateByGroupSpec(
source="kindergeld__betrag_m",
aggr="sum"
agg="sum"
)
}
```
Expand All @@ -312,12 +312,12 @@ The implementation is similar to aggregations to the level of groupings: In orde
specify new aggregation functions, scripts with functions of the taxes and transfer
system should define a dictionary `aggregation_specs` at the module level. This
dictionary must specify the aggregated columns as keys and the `AggregateByPIDSpec` data
class as values. The class specifies the `source`, `p_id_to_aggregate_by`, and `aggr`.
If `aggr` is `count`, `source` is not needed.
class as values. The class specifies the `source`, `p_id_to_aggregate_by`, and `agg`. If
`agg` is `count`, `source` is not needed.

The key `source` specifies which column is the source of the aggregation operation. The
key `p_id_to_aggregate_by` specifies the column that indicates to which `p_id` the
values in `source` should be ascribed to. The key `aggr` gives the aggregation method.
values in `source` should be ascribed to. The key `agg` gives the aggregation method.

For example, in `kindergeld.py`, we could have:

Expand All @@ -326,7 +326,7 @@ aggregation_specs = {
"kindergeld__anzahl_ansprüche": AggregateByPIDSpec(
p_id_to_aggregate_by="kindergeld__p_id_empfänger",
source="kindergeld__grundsätzlich_anspruchsberechtigt",
aggr="sum",
agg="sum",
),
}
```
Expand Down
Loading
Loading