Skip to content

Conversation

@hmgaudecker
Copy link
Collaborator

What problem do you want to solve?

Fix #870 and related things. In particular, defer some checks so that they are only done for variables that are present / set start/end dates of explicit aggregation functions so they are derived from source object.

@hmgaudecker hmgaudecker changed the base branch from main to collect-components-of-namespaces April 14, 2025 11:38
hmgaudecker and others added 8 commits April 14, 2025 13:49
### What problem do you want to solve?

Add policy test data for METTSIM.

Todo
- [x] Introduce `resource_dir` arg for parameters in
`set_up_policy_environment`, it currently reads in GETTSIM parameters.
- [x] Fix testing infrastructure such that a merged df is used for
testing. Currently, we only test the first expected output column in
each testing yaml.

---------

Co-authored-by: Hans-Martin von Gaudecker <[email protected]>
@codecov
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 80.47945% with 57 lines in your changes missing coverage. Please review.

Please upload report for BASE (collect-components-of-namespaces@12170b2). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/_gettsim/arbeitslosengeld_2/aggregations.py 67.56% 12 Missing ⚠️
src/_gettsim/arbeitslosengeld_2/regelbedarf.py 63.15% 7 Missing ⚠️
src/_gettsim/elterngeld/elterngeld.py 66.66% 7 Missing ⚠️
src/_gettsim/einkommensteuer/einkommensteuer.py 71.42% 4 Missing ⚠️
src/_gettsim/household_characteristics.py 72.72% 3 Missing ⚠️
src/_gettsim/synthetic.py 66.66% 3 Missing ⚠️
src/_gettsim/einkommensteuer/kinderfreibetrag.py 77.77% 2 Missing ⚠️
src/_gettsim/erziehungsgeld/erziehungsgeld.py 66.66% 2 Missing ⚠️
src/_gettsim/ids.py 96.92% 2 Missing ⚠️
src/_gettsim/kinderzuschlag/einkommen.py 75.00% 2 Missing ⚠️
... and 9 more
Additional details and impacted files
@@                         Coverage Diff                         @@
##             collect-components-of-namespaces     #873   +/-   ##
===================================================================
  Coverage                                    ?   83.08%           
===================================================================
  Files                                       ?      145           
  Lines                                       ?     5710           
  Branches                                    ?        0           
===================================================================
  Hits                                        ?     4744           
  Misses                                      ?      966           
  Partials                                    ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

### What problem do you want to solve?

`join_numpy` is not jit compatible, I replaced it with a generic join
function that uses either Jax or Numpy depending on the Flag in
config.py. The Input checks are now the responsibility of the user of the
function. If there are duplicate Private Keys the first encountered
value will be used. If a foreign key is missing the user-supplied
default value will be used.


### Todo

- [x] Write `join` thet supports both Jax and Numpy
- [x] Add test

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hans-Martin von Gaudecker <[email protected]>
@hmgaudecker hmgaudecker merged commit 46af123 into collect-components-of-namespaces Apr 17, 2025
5 of 7 checks passed
@hmgaudecker hmgaudecker deleted the agg-decorator branch April 17, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Create aggregations via decorators

4 participants