-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (185 loc) · 6.38 KB
/
pyproject.toml
File metadata and controls
228 lines (185 loc) · 6.38 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
226
227
228
[project]
name = "dags"
description = "Tools to create executable dags from interdependent functions."
requires-python = ">=3.11"
dynamic = ["version"]
dependencies = [
"networkx>=3.6",
"flatten-dict",
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Utilities",
"Typing :: Typed",
]
authors = [
{name = "Janoś Gabler", email = "janos.gabler@gmail.com"},
{name = "Tobias Raabe"}
]
maintainers = [
{name = "Hans-Martin von Gaudecker", email = "hmgaudecker@uni-bonn.de" }
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.license]
file = "LICENSE"
[project.urls]
Repository = "https://github.com/OpenSourceEconomics/dags"
Github = "https://github.com/OpenSourceEconomics/dags"
Tracker = "https://github.com/OpenSourceEconomics/dags/issues"
# ======================================================================================
# Build system configuration
# ======================================================================================
[build-system]
requires = ["hatchling", "hatch_vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.vcs]
version-file = "src/dags/_version.py"
[tool.hatch.build.targets.sdist]
exclude = ["tests"]
only-packages = true
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
include = [
"src/dags/py.typed",
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
# ======================================================================================
# Pixi
# ======================================================================================
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
# Development Dependencies
# --------------------------------------------------------------------------------------
[tool.pixi.dependencies]
python = ">=3.11,<3.15"
jupyterlab = "*"
pre-commit = "*"
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
[tool.pixi.pypi-dependencies]
dags = {path = ".", editable = true}
ty = ">=0.0.11"
types-networkx = ">=3.6.1.20251220"
pdbp = "*"
# Features and Tasks
# --------------------------------------------------------------------------------------
[tool.pixi.feature.test.tasks]
tests = "pytest tests"
tests-with-cov = "pytest tests --cov-report=xml --cov=./"
# Python versions for testing
# --------------------------------------------------------------------------------------
[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"
# Environments
# --------------------------------------------------------------------------------------
[tool.pixi.environments]
py311 = ["test", "py311"]
py312 = ["test", "py312"]
py313 = ["test", "py313"]
py314 = ["test", "py314"]
# ======================================================================================
# Ruff configuration
# ======================================================================================
[tool.ruff]
target-version = "py311"
fix = true
unsafe-fixes = false
[tool.ruff.lint]
select = ["ALL"]
extend-ignore = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `return_annotation`
"COM812", # ignored to avoid conflict with formatter
"EM101", # exception must not use a string literal
"EM102", # exception must not use an f-string literal
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"ISC001", # ignored to avoid conflict with formatter
"TRY003", # "long" messages outside exception class.
]
[tool.ruff.lint.per-file-ignores]
"docs/source/conf.py" = ["INP001", "ERA001", "RUF100"]
"docs/*" = [
"D100", # missing docstring in public module
"D103", # missing docstring in public function
"D104", # missing docstring in public package
]
"src/dags/tree/__init__.py" = ["RUF022"]
"tests/*" = [
"ANN001", # missing type annotation
"ANN002", # missing type annotation for `*args`
"ANN003", # missing type annotation for `**kwargs`
"ANN201",
"ANN202",
"D100", # missing docstring in public module
"D103", # missing docstring in public function
"D104", # missing docstring in public package
"D401",
"FBT001",
"INP001",
"PLC2401",
"PLR2004", # magic value used in comparison
"S101", # use of `assert` detected
]
"tests/test_dag.py" = ["ARG001"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
# ======================================================================================
# Pytest configuration
# ======================================================================================
[tool.pytest.ini_options]
markers = [
"wip: Tests that are work-in-progress.",
"slow: Tests that take a long time to run and are skipped in continuous integration.",
]
norecursedirs = ["docs"]
addopts = ["--pdbcls=pdbp:Pdb"]
# ======================================================================================
# yamlfix configuration
# ======================================================================================
[tool.yamlfix]
line_length = 88
sequence_style = "block_style"
none_representation = "null"
# ======================================================================================
# ty configuration -- set all rules to error.
# ======================================================================================
[tool.ty.rules]
ambiguous-protocol-member = "error"
deprecated = "error"
division-by-zero = "error"
ignore-comment-unknown-rule = "error"
invalid-argument-type = "error"
invalid-ignore-comment = "error"
possibly-missing-attribute = "error"
possibly-missing-implicit-call = "error"
possibly-missing-import = "error"
possibly-unresolved-reference = "error"
redundant-cast = "error"
undefined-reveal = "error"
unresolved-global = "error"
unsupported-base = "error"
unused-ignore-comment = "error"
useless-overload-body = "error"
[tool.ty.src]
exclude = ["docs/source/example/example.ipynb"]