Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: check-useless-excludes
# - id: identity # Prints all files passed to pre-commits. Debugging.
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.29.4
rev: v2.31.2
hooks:
- id: pyproject-fmt
- repo: https://github.com/lyz-code/yamlfix
Expand Down Expand Up @@ -45,7 +45,7 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.8
rev: v0.17.6
hooks:
- id: ruff-check
args:
Expand All @@ -60,15 +60,15 @@ repos:
- pyi
- python
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.83
rev: v0.0.109
hooks:
- id: ty
name: ty (numpy backend)
# Run ty directly so import resolution uses `[tool.ty] environment.python`.
# Keep this dependency pin aligned with the hook revision above.
entry: ty check
additional_dependencies:
- ty==0.0.83
- ty==0.0.109
- repo: local
hooks:
- id: ty-jax
Expand All @@ -78,7 +78,7 @@ repos:
# sync with the `ty-pre-commit` rev above.
language: python
additional_dependencies:
- ty==0.0.83
- ty==0.0.109
entry: ty check --python .pixi/envs/py314-jax
pass_filenames: false
always_run: true
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ prek run ty-jax --all-files
# Quality checks (linting, formatting, type checking)
prek run --all-files

# Available environments: py314, py314-jax, py314-cuda, py314-metal
# Available environments: py314, py314-jax, py314-cuda
```

## Command Rules
Expand Down Expand Up @@ -84,8 +84,8 @@ order:

## Python Version

The root workspace sets `requires-python = ">=3.11"` to match the most permissive
sub-project (ttsim, gettsim, gettsim-personas all require `>=3.11`; soep-preparation
The root workspace sets `requires-python = ">=3.12"` to match the most permissive
sub-project (ttsim, gettsim, gettsim-personas all require `>=3.12`; soep-preparation
requires `>=3.14`). The `ty` type checker uses this to determine what's valid at
runtime, so it must stay consistent with the individual projects' constraints.

Expand Down
2 changes: 1 addition & 1 deletion gettsim
Submodule gettsim updated 831 files
2 changes: 1 addition & 1 deletion gettsim-personas
Submodule gettsim-personas updated 31 files
+1 −1 .ai-instructions
+10 −4 .github/workflows/main.yml
+15 −5 .pre-commit-config.yaml
+15 −7 AGENTS.md
+464 −3,107 pixi.lock
+25 −6 pyproject.toml
+5 −2 src/_gettsim_personas/de/einkommensteuer_sozialabgaben/__init__.py
+35 −0 src/_gettsim_personas/de/einkommensteuer_sozialabgaben/couple_1_child.py
+10 −5 src/_gettsim_personas/de/gesetzliche_altersrente/__init__.py
+25 −0 src/_gettsim_personas/de/gesetzliche_altersrente/couple_with_fixed_public_pension.py
+25 −0 src/_gettsim_personas/de/gesetzliche_altersrente/single_with_fixed_public_pension.py
+12 −7 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/__init__.py
+49 −32 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/couple_1_child.py
+47 −30 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/couple_1_child_in_karenzzeit.py
+49 −32 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/couple_2_children.py
+49 −32 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/couple_no_children.py
+49 −32 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/single_1_child.py
+50 −33 src/_gettsim_personas/de/grundsicherung_für_erwerbsfähige/single_adult.py
+8 −5 src/_gettsim_personas/de/grundsicherung_im_alter/__init__.py
+47 −2 src/_gettsim_personas/de/grundsicherung_im_alter/couple_1_child.py
+47 −2 src/_gettsim_personas/de/grundsicherung_im_alter/couple_no_child.py
+47 −2 src/_gettsim_personas/de/grundsicherung_im_alter/single_1_child.py
+47 −2 src/_gettsim_personas/de/grundsicherung_im_alter/single_no_child.py
+1 −3 src/_gettsim_personas/persona_elements.py
+103 −70 src/_gettsim_personas/persona_objects.py
+6 −2 src/_gettsim_personas/typing.py
+13 −0 src/gettsim_personas/__init__.py
+1 −0 tests/infrastructure/test_persona_elements.py
+186 −11 tests/infrastructure/test_persona_objects.py
+12 −7 tests/personas_for_testing/__init__.py
+25 −1 tests/test_end_to_end.py
261 changes: 30 additions & 231 deletions pixi.lock

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ version = "0.1.0"
description = """\
Pixi workspace for ttsim, gettsim, gettsim-personas, and soep-preparation.\
"""
requires-python = ">=3.11"
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
Expand All @@ -36,7 +35,7 @@ scikit-learn = ">=1.9.0,<2"
[tool.pixi.pypi-dependencies]
# jax-datetime = { git = "https://github.com/google/jax-datetime.git" }
jaxtyping = "*"
dags = { git = "https://github.com/OpenSourceEconomics/dags.git", branch = "main" }
dags = ">=0.7.0"
ttsim-backend = { path = "ttsim", editable = true }
mettsim = { path = "ttsim/src_mettsim", editable = true }
gettsim = { path = "gettsim", editable = true }
Expand All @@ -61,11 +60,6 @@ tests-jax = "python run_tests.py --backend=jax"
tests-jax = "dot -c && python run_tests.py --backend=jax"
[tool.pixi.feature.jax.target.win-64.tasks]
tests-jax = "python run_tests.py --backend=jax"
[tool.pixi.feature.metal]
platforms = [ "osx-arm64" ]
[tool.pixi.feature.metal.target.osx-arm64.pypi-dependencies]
jax = ">=0.8"
jax-metal = ">=0.1.1"
[tool.pixi.feature.py314.dependencies]
python = "~=3.14.0"
[tool.pixi.feature.tests.activation.env]
Expand All @@ -92,7 +86,6 @@ tests = "python run_tests.py"
py314 = [ "tests", "py314" ]
py314-jax = [ "py314", "tests", "jax" ]
py314-cuda = [ "py314", "tests", "cuda" ]
py314-metal = [ "py314", "tests", "metal" ]

[tool.ruff]
fix = true
Expand Down Expand Up @@ -148,30 +141,38 @@ collapse_tables = [ "tool.hatch", "tool.pytask", "tool.pytest", "tool.ty" ]

[tool.ty]
src.respect-ignore-files = false
# `dags/` may be a local clone of the dags dependency (pulled from git, not the
# local path); it is not a workspace member, so keep it out of the ty scan.
src.exclude = [ "**/.claude/", "**/.pixi/", "dags/" ]
# `dags/` and `workshop-2026/` may be local clones of other repositories; they are
# not workspace members (dags is installed from PyPI), so keep them out of the ty
# scan. The `.ai-instructions` hook scripts import tools that exist only in their
# pre-commit environments.
src.exclude = [
"**/.ai-instructions/",
"**/.claude/",
"**/.pixi/",
"dags/",
"workshop-2026/",
]
# Resolve third-party imports from the py314 pixi env (run `pixi install` once).
# The ty-jax pre-commit hook overrides this on the command line for the jax env.
environment.python = ".pixi/envs/py314"
environment.root = [ "." ]
rules.ambiguous-protocol-member = "error"
rules.deprecated = "error"
rules.division-by-zero = "error"
rules.ignore-comment-unknown-rule = "error"
rules.ineffective-final = "error"
rules.invalid-argument-type = "error"
rules.invalid-enum-member-annotation = "error"
rules.invalid-explicit-return = "error"
rules.invalid-ignore-comment = "error"
rules.invalid-legacy-positional-parameter = "error"
rules.invalid-return-type = "error"
rules.possibly-missing-attribute = "error"
rules.possibly-missing-implicit-call = "error"
rules.possibly-missing-import = "error"
rules.possibly-missing-submodule = "error"
rules.possibly-unresolved-reference = "error"
rules.redundant-cast = "error"
rules.undefined-reveal = "error"
rules.unknown-rule-in-ignore-comment = "error"
rules.unresolved-global = "error"
rules.unsupported-base = "error"
rules.unused-awaitable = "error"
Expand All @@ -180,8 +181,8 @@ rules.useless-overload-body = "error"
[[tool.ty.overrides]]
include = [ "ttsim/**" ]
analysis.allowed-unresolved-imports = [ "jax", "jax.numpy", "jax.ops" ]
rules.empty-body = "ignore"
rules.invalid-return-type = "ignore"
rules.invalid-implicit-return-in-function-with-stub-body = "ignore"
rules.invalid-explicit-return = "ignore"
rules.invalid-type-form = "ignore"

# Mirrors ttsim's own override: these monkey-patch suppressions are needed
Expand All @@ -192,13 +193,13 @@ rules.unused-ignore-comment = "ignore"

[[tool.ty.overrides]]
include = [ "gettsim/**" ]
rules.empty-body = "ignore"
rules.invalid-return-type = "ignore"
rules.invalid-implicit-return-in-function-with-stub-body = "ignore"
rules.invalid-explicit-return = "ignore"

[[tool.ty.overrides]]
include = [ "gettsim/docs/**" ]
rules.invalid-argument-type = "ignore"
rules.unresolved-attribute = "ignore"
rules.missing-attribute = "ignore"

[tool.pytest]
ini_options.testpaths = [
Expand Down