-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
225 lines (217 loc) · 7.28 KB
/
pyproject.toml
File metadata and controls
225 lines (217 loc) · 7.28 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
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
220
221
222
223
224
225
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]
[project]
name = "skillmodels"
description = "Estimators for skill formation models"
readme = { file = "README.md", content-type = "text/markdown" }
keywords = [
"Econometrics",
"Economics",
"Estimation",
"Skill formation",
"Statistics",
]
license = { file = "LICENSE" }
requires-python = ">=3.14,<3.15"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
]
dynamic = [ "version" ]
dependencies = [
"dags>=0.5.1",
"jax>=0.9",
"jupyter-book>=2",
"kaleido>=1.2",
"numpy>=2.4",
"optimagic>=0.5.3",
"pandas>=3",
"plotly>=6.6",
"pytask>=0.5.8",
"pytask-parallel>=0.5.2",
]
[[project.authors]]
name = "Janoś Gabler"
email = "janos.gabler@gmail.com"
[[project.maintainers]]
name = "Janoś Gabler"
email = "janos.gabler@gmail.com"
[[project.maintainers]]
name = "Hans-Martin von Gaudecker"
email = "hmgaudecker@uni-bonn.de"
[project.urls]
Github = "https://github.com/OpenSourceEconomics/skillmodels"
Repository = "https://github.com/OpenSourceEconomics/skillmodels"
Tracker = "https://github.com/OpenSourceEconomics/skillmodels/issues"
[tool.hatch]
build.hooks.vcs.version-file = "src/skillmodels/_version.py"
build.targets.sdist.exclude = [ "tests" ]
build.targets.sdist.only-packages = true
build.targets.wheel.only-include = [ "src" ]
build.targets.wheel.sources = [ "src" ]
metadata.allow-direct-references = true
version.source = "vcs"
[tool.ruff]
fix = true
unsafe-fixes = false
[tool.ruff.lint]
select = [ "ALL" ]
extend-ignore = [
"COM812", # Conflicts with ruff-format
"EM101", # Exception must not use a string literal
"EM102", # Exception must not use an f-string literal
"FBT002", # Boolean default positional argument in function definition
"FIX002", # Line contains TODO
"ISC001", # Conflicts with ruff-format
"PERF401", # Use a list comprehension to create a transformed list
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison
"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."**/*.ipynb" = [
"B018", # Found useless expression
"INP001", # File is part of an implicit namespace package
"T201", # print found
]
per-file-ignores."tests/*" = [
"ANN", # Missing type annotations
"ARG001", # Unused function argument
"D103", # Missing docstring in public function
"FBT003", # Boolean positional value in function call
"INP001", # File is part of an implicit namespace package
"S101", # Use of assert detected
]
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.environments.cuda",
"tool.pixi.environments.docs",
"tool.pixi.environments.tests-cpu",
"tool.pixi.environments.tests-cuda",
"tool.pixi.environments.type-checking",
"tool.pixi.feature",
"tool.pixi.feature.cuda",
"tool.pixi.feature.cuda.dependencies",
"tool.pixi.feature.cuda.pypi-dependencies",
"tool.pixi.feature.cuda.system-requirements",
"tool.pixi.feature.cuda.tasks",
"tool.pixi.feature.docs",
"tool.pixi.feature.docs.dependencies",
"tool.pixi.feature.docs.tasks",
"tool.pixi.feature.tests",
"tool.pixi.feature.tests.dependencies",
"tool.pixi.feature.tests.target",
"tool.pixi.feature.tests.tasks",
"tool.pixi.feature.type-checking",
"tool.pixi.feature.type-checking.pypi-dependencies",
"tool.pixi.feature.type-checking.tasks",
"tool.pixi.pypi-dependencies",
"tool.pixi.pypi-dependencies.optimagic",
"tool.pixi.pypi-dependencies.skillmodels",
"tool.pixi.workspace",
]
[tool.ty]
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" ]
ini_options.filterwarnings = []
ini_options.markers = [ "integration: integration tests requiring MODEL2 + data" ]
ini_options.norecursedirs = [ "docs" ]
[tool.pixi.dependencies]
filterpy = "*"
ipykernel = "*"
jupyterlab = "*"
nbformat = "*"
networkx = "*"
prek = "*"
pybaum = "*"
python = "~=3.14.0"
scipy = "*"
[tool.pixi.environments]
cuda = { features = [ "cuda" ], solve-group = "cuda" }
docs = { features = [ "docs" ], solve-group = "default" }
tests-cpu = { features = [ "tests" ], solve-group = "default" }
tests-cuda = { features = [ "tests", "cuda" ], solve-group = "cuda" }
type-checking = { features = [ "type-checking" ], solve-group = "default" }
tests-cuda12 = { features = [ "tests", "cuda" ], solve-group = "cuda" }
[tool.pixi.feature.cuda]
platforms = [ "linux-64" ]
system-requirements = { cuda = "12" }
[tool.pixi.feature.cuda.dependencies]
cuda-nvcc = ">=12"
[tool.pixi.feature.cuda.pypi-dependencies]
jax = { version = ">=0.7", extras = [ "cuda12" ] }
[tool.pixi.feature.cuda.tasks]
mem-cuda = """\
pytest -x -s --pdb --memray --fail-on-increase \
tests/test_likelihood_regression.py::test_likelihood_contributions_large_nobs\
"""
[tool.pixi.feature.docs.tasks]
build-docs = { cmd = "jupyter book build --html", cwd = "docs" }
view-docs = { cmd = "jupyter book start", cwd = "docs" }
[tool.pixi.feature.tests.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
snakeviz = "*"
[tool.pixi.feature.tests.target.unix.dependencies]
pytest-memray = "*"
[tool.pixi.feature.tests.tasks]
tests = "pytest tests"
tests-with-cov = "pytest tests --cov-report=xml --cov=./"
mem = """\
pytest -x -s --pdb --memray --fail-on-increase \
tests/test_likelihood_regression.py::test_likelihood_contributions_large_nobs\
"""
mem-on-clean-repo = """\
git status --porcelain && git diff-index --quiet HEAD -- && git rev-parse HEAD && \
pytest -x -s --pdb --memray --fail-on-increase \
tests/test_likelihood_regression.py::test_likelihood_contributions_large_nobs\
"""
[tool.pixi.feature.type-checking.pypi-dependencies]
matplotlib = "*" # required because of pandas
pandas-stubs = "*"
ty = "*"
types-pytz = "*"
[tool.pixi.feature.type-checking.tasks]
ty = "ty check src tests docs"
[tool.pixi.pypi-dependencies]
# optimagic = { git = "https://github.com/optimagic-dev/optimagic.git", branch = "main" }
pdbp = "*"
skillmodels = { path = ".", editable = true }
[tool.pixi.workspace]
channels = [ "conda-forge" ]
platforms = [ "linux-64", "osx-arm64", "win-64" ]
[tool.yamlfix]
line_length = 88
none_representation = "null"
sequence_style = "block_style"