/
pyproject.toml
219 lines (189 loc) · 6.47 KB
/
pyproject.toml
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# Reference: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#static-vs-dynamic-metadata
[project]
# Basic information
name = "gettsim"
dynamic = ["version"]
# About the project
authors = [
{ name = "The GETTSIM team", email = "gaudecker@iza.org" },
]
description = "The German Taxes and Transfers SIMulator"
readme = { file = "README.md", content-type = "text/markdown" }
license = { file = "LICENSE" }
keywords = [
"Economics",
"Taxes",
"Benefits",
"Transfers",
"Pensions",
"Germany",
]
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",
"Programming Language :: Python :: 3 :: Only",
]
# Dependencies and requirements
requires-python = ">=3.11"
dependencies = [
"astor",
"dags",
"ipywidgets",
"networkx",
"numpy",
"numpy-groupies",
"pandas",
"plotly",
"pygments",
"pygraphviz",
"pytest",
"pyyaml",
]
[project.urls]
Repository = "https://github.com/iza-institute-of-labor-economics/gettsim"
Changelog = "https://gettsim.readthedocs.io/en/stable/changes.html"
Documentation = "https://gettsim.readthedocs.io"
Github = "https://github.com/iza-institute-of-labor-economics/gettsim"
Tracker = "https://github.com/iza-institute-of-labor-economics/gettsim/issues"
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "src/_gettsim/_version.py"
[tool.ruff]
target-version = "py311" # Replace by [project] requires-python = ">=3.11" above
fix = true
unsafe-fixes = false
[tool.ruff.lint]
select = ["ALL"]
extend-ignore = [
"ICN001", # numpy should be np, but different convention here.
# Docstrings
"D103", # missing docstring in public function
"D107",
"D203",
"D212",
"D213",
"D402",
"D413",
"D415",
"D416",
"D417",
# Others.
"D404", # Do not start module docstring with "This".
"RET504", # unnecessary variable assignment before return.
"S101", # raise errors for asserts.
"B905", # strict parameter for zip that was implemented in py310.
"ANN101", # type annotating self
"ANN102", # type annotating cls
"FBT", # flake8-boolean-trap
"EM", # flake8-errmsg
"ANN401", # flake8-annotate typing.Any
"PD", # pandas-vet
"E731", # do not assign a lambda expression, use a def
"RET", # unnecessary elif or else statements after return, rais, continue, ...
"S324", # Probable use of insecure hash function.
"COM812", # trailing comma missing, but black takes care of that
"PT007", # wrong type in parametrize, gave false positives
"DTZ001", # use of `datetime.datetime()` without `tzinfo` argument is not allowed
"DTZ002", # use of `datetime.datetime.today()` is not allowed
"PT012", # `pytest.raises()` block should contain a single simple statement
"PLR5501", # elif not supported by Jax converter
"TRY003", # Avoid specifying long messages outside the exception class
"FIX002", # Line contains TODO -- Use stuff from TD area.
# Things we are not sure we want
# ==============================
"SIM102", # Use single if statement instead of nested if statements
"SIM108", # Use ternary operator instead of if-else block
"SIM117", # do not use nested with statements
"BLE001", # Do not catch blind exceptions (even after handling some specific ones)
"PLR2004", # Magic values used in comparison
"PT006", # Allows only lists of tuples in parametrize, even if single argument
# Things ignored during transition phase
# ======================================
"D", # docstrings
"ANN", # missing annotations
"C901", # function too complex
"PT011", # pytest raises without match statement
"INP001", # implicit namespace packages without init.
]
exclude = []
[tool.ruff.lint.per-file-ignores]
"src/_gettsim_tests/test_rounding.py" = ["PT019"]
"src/_gettsim/benefits/elterngeld.py" = ["E501"]
"src/_gettsim/benefits/kinderzuschl.py" = ["ARG001"]
"src/_gettsim/benefits/unterhalt.py" = ["E501"]
"src/_gettsim/benefits/wohngeld.py" = ["ARG001"]
"src/_gettsim/functions.py" = ["F401"]
"src/_gettsim/gettsim_typing.py" = ["PGH", "PLR", "SIM114"]
"src/_gettsim/piecewise_functions.py" = ["PLR"]
"src/_gettsim/policy_environment.py" = ["S506", "PLR"]
"src/_gettsim/rente.py" = ["N806", "ARG001"]
"src/_gettsim/social_insurance_contributions/ges_krankenv.py" = ["SIM401"]
"src/_gettsim/tax_transfer.py" = ["ARG001"]
"src/_gettsim/taxes/zu_versteuerndes_eink.py" = ["E501", "ARG001"]
"src/_gettsim/tests/test_tax_transfer.py" = ["E501"]
"src/_gettsim/visualization.py" = ["PLR"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.mypy]
files = ["src"]
check_untyped_defs = true
disallow_any_generics = false
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "_gettsim_tests.*"
disallow_untyped_defs = false
ignore_errors = true
[[tool.mypy.overrides]]
module = "gettsim"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "_gettsim.*"
ignore_errors = true
[tool.check-manifest]
ignore = ["src/_gettsim/_version.py"]
[tool.doc8]
max-line-length = 88
ignore = [
"D002",
"D004"
]
[tool.nbqa.config]
black = "pyproject.toml"
[tool.nbqa.mutate]
black = 1
[tool.pytest.ini_options]
filterwarnings = [
"ignore:.*XMLParser*:DeprecationWarning",
"ignore:.*'tree.iter()'*:PendingDeprecationWarning",
"ignore:.*Sorting*:FutureWarning",
"ignore:The TerminalReporter.writer attribute is",
"ignore:Repeated execution of the test suite",
"ignore:Using or importing the ABCs from 'collections'",
"ignore::_gettsim.interface.FunctionsAndColumnsOverlapWarning"
]
markers = [
"wip: Tests that are work-in-progress.",
"unit: Flag for unit tests which target mainly a single function.",
"integration: Flag for integration tests which may comprise of multiple unit tests.",
"end_to_end: Flag for tests that cover the whole program.",
]
norecursedirs = ["docs"]
testpaths = [
"src/_gettsim_tests",
]
[tool.yamlfix]
line_length = 88
sequence_style = "block_style"
none_representation = "null"