-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
184 lines (176 loc) · 5.89 KB
/
Copy pathpyproject.toml
File metadata and controls
184 lines (176 loc) · 5.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]
[project]
name = "gettsim-personas"
description = "Personas to use as example inputs for GETTSIM."
keywords = [
"Benefits",
"Economics",
"Germany",
"GETTSIM",
"Pensions",
"Taxes",
"Transfers",
]
requires-python = ">=3.11"
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"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",
]
dynamic = [ "version" ]
dependencies = [ "dags>=0.6", "gettsim>=1.1" ]
[[project.authors]]
name = "Hans-Martin von Gaudecker"
email = "hmgaudecker@uni-bonn.de"
[[project.authors]]
name = "Marvin Immesberger"
email = "immesberger@uni-bonn.de"
[project.license]
text = "GNU Affero General Public License v3"
[[project.maintainers]]
name = "Hans-Martin von Gaudecker"
email = "hmgaudecker@uni-bonn.de"
[[project.maintainers]]
name = "Marvin Immesberger"
email = "immesberger@uni-bonn.de"
[project.readme]
content-type = "text/markdown"
file = "README.md"
[project.urls]
Changelog = "https://github.com/ttsim-dev/gettsim-personas"
Documentation = "https://github.com/ttsim-dev/gettsim-personas"
Github = "https://github.com/ttsim-dev/gettsim-personas"
Tracker = "https://github.com/ttsim-dev/gettsim-personas/issues"
[tool.hatch]
version.source = "vcs"
metadata.allow-direct-references = true
build.hooks.vcs.version-file = "src/gettsim_personas/_version.py"
build.targets.sdist.exclude = [ "tests" ]
build.targets.sdist.only-packages = true
build.targets.wheel.only-include = [ "src" ]
build.targets.wheel.sources = [ "src" ]
[tool.pixi.dependencies]
jupyterlab = "*"
prek = "*"
pygraphviz = "*"
[tool.pixi.environments]
py311 = [ "tests", "py311" ]
py312 = [ "tests", "py312" ]
py313 = [ "tests", "py313" ]
py314 = [ "tests", "py314" ]
[tool.pixi.feature.py311.dependencies]
python = "~=3.11.0"
[tool.pixi.feature.py312.dependencies]
python = "~=3.12.0"
[tool.pixi.feature.py313.dependencies]
python = "~=3.13.0"
[tool.pixi.feature.py314.dependencies]
python = "~=3.14.0"
[tool.pixi.feature.tests.activation.env]
# Activate the package-wide beartype claws whenever the tests env is in use,
# matching CI. personas reuses `GETTSIM_BEARTYPE_CLAW` (no dedicated switch),
# so the two vars together cover personas' claw and the perimeter decorators.
GETTSIM_BEARTYPE_CLAW = "1"
TTSIM_BEARTYPE_CLAW = "1"
[tool.pixi.feature.tests.pypi-dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
types-PyYAML = "*"
types-pytz = "*"
[tool.pixi.feature.tests.tasks]
tests = "pytest"
tests-with-cov = "pytest --cov-report=xml --cov=./"
[tool.pixi.pypi-dependencies]
gettsim_personas = { path = ".", editable = true }
ttsim-backend = { git = "https://github.com/ttsim-dev/ttsim.git", branch = "main" }
gettsim = { git = "https://github.com/ttsim-dev/gettsim.git", branch = "main" }
kaleido = ">=1.0.0"
pdbp = "*"
[tool.pixi.workspace]
channels = [ "conda-forge" ]
platforms = [ "linux-64", "osx-64", "osx-arm64", "win-64" ]
[tool.ruff]
fix = true
unsafe-fixes = false
[tool.ruff.lint]
select = [ "ALL" ]
extend-ignore = [
"ANN", # Missing type annotations
"COM812", # Conflict with ruff-format
"D10", # Missing docstrings
"EM101", # Exception must not use a string literal
"EM102", # Exception must not use an f-string literal
"FIX002", # Line contains TODO
"ISC001", # Conflict with ruff-format
"PLC2403", # Modules may contain non-ASCII characters
"PLR0913", # Too many arguments in function definition
"RET504", # Don't force to calculate upon return
"S101", # Use of `assert` detected.
"S301", # pickle module is unsafe
"TC001", # Move application import into a type-checking block
"TC002", # Move third-party import into a type-checking block
"TC003", # Move standard library import into a type-checking block
"TRY003", # Long messages outside exception class
]
per-file-ignores."src/_gettsim_personas/de/*" = [
"E501", # Line too long
"PLC2401", # Non-ASCII variable name
]
per-file-ignores."tests/*" = [
"C408", # Unnecessary dict/list/tuple call
"D", # Missing docstrings
"INP001", # Implicit namespace packages
"PD011", # Use .to_numpy() instead of .values
"PLR2004", # Magic value used in comparison
]
pydocstyle.convention = "google"
[tool.pyproject-fmt]
column_width = 88
max_supported_python = "3.14"
table_format = "long"
collapse_tables = [ "tool.hatch", "tool.pytest", "tool.pytask", "tool.ty" ]
expand_tables = [
"tool.pixi.dependencies",
"tool.pixi.environments",
"tool.pixi.feature.tests.activation.env",
"tool.pixi.feature.tests.pypi-dependencies",
"tool.pixi.feature.tests.tasks",
"tool.pixi.pypi-dependencies",
"tool.pixi.tasks",
"tool.pixi.workspace",
]
[tool.ty]
# ty resolves third-party imports from this pixi env (the ty-pre-commit hook runs
# `uv check --no-project`, so uv neither creates a `.venv` nor resolves deps). Run
# `pixi install` once.
environment.python = ".pixi/envs/py314"
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-enum-member-annotation = "error"
rules.invalid-ignore-comment = "error"
rules.invalid-legacy-positional-parameter = "error"
rules.possibly-missing-submodule = "error"
rules.redundant-cast = "error"
rules.unused-awaitable = "error"
rules.unused-ignore-comment = "error"
[tool.pytest]
ini_options.addopts = [ "--pdbcls=pdbp:Pdb" ]
[tool.yamlfix]
line_length = 88
sequence_style = "block_style"
none_representation = "null"