-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
220 lines (191 loc) · 5.28 KB
/
Copy pathpyproject.toml
File metadata and controls
220 lines (191 loc) · 5.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
[project]
name = "diffraxtra"
authors = [
{ name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" },
]
description = "diffrax extras: OOP and vectorization"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.11"
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"diffrax>=0.6",
"equinox>=0.11.5",
"jaxtyping>=0.2.35",
"plum-dispatch>=2.5.7",
"typing_extensions>=4.12.2",
]
[project.urls]
Homepage = "https://github.com/GalacticDynamics/diffraxtra"
"Bug Tracker" = "https://github.com/GalacticDynamics/diffraxtra/issues"
Discussions = "https://github.com/GalacticDynamics/diffraxtra/discussions"
Changelog = "https://github.com/GalacticDynamics/diffraxtra/releases"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"ipykernel>=6.29.5",
"cz-conventional-gitmoji>=0.6.1",
{include-group = "build"},
{include-group = "lint"},
{include-group = "nox"},
{include-group = "test"},
]
build = [
"build>=1.3.0",
]
lint = [
"mypy>=1.19.0",
"pre-commit>=4.1.0",
"pylint>=3.3.8",
]
nox = [
"nox>=2024.10.9",
"nox-uv>=0.6.3",
]
test = [
"attrs>=25.3.0",
"pytest>=8.3.3",
"pytest-cov>=6.2.1",
"pytest-github-actions-annotate-failures>=0.2.0",
"sybil[pytest]>=9.1.0",
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/diffraxtra/_version.py"
[tool.codespell]
skip = ["uv.lock"]
[tool.commitizen]
name = "cz_gitmoji"
[tool.coverage]
run.source = ["diffraxtra"]
report.exclude_also = [
'\.\.\.',
'if TYPE_CHECKING:',
]
[tool.mypy]
files = ["src"]
python_version = "3.11"
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
[[tool.mypy.overrides]]
module = "diffraxtra.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = ["plum.*"]
[tool.pylint]
py-version = "3.11"
ignore-paths = [".*/_version.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
disable = [
"fixme",
"function-redefined", # incompatible with plum-dispatch
"line-too-long", # handled by ruff
"no-member", # handled by mypy
]
[tool.pytest.ini_options]
minversion = "8.3"
addopts = [
"--showlocals",
"--strict-config",
"--strict-markers",
"-p no:doctest", # using sybil
"-ra",
]
xfail_strict = true
filterwarnings = [
"error",
"ignore:jax.core.Primitive is deprecated:DeprecationWarning",
"ignore:jax.core.pp_eqn_rules is deprecated:DeprecationWarning",
# Equinox 0.11.5 & Jax 0.4.35
"ignore:jax.interpreters.batching.NotMapped is deprecated:DeprecationWarning",
]
log_cli_level = "INFO"
testpaths = ["README.md", "src/", "tests/"]
norecursedirs = [
".*", # ignores .hypothesis, .git, etc.
"__pycache__"
]
[tool.ruff]
src = ["src"]
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"ANN401", # Dynamically typed expressions are disallowed in `**kwargs`
"COM812", # For ruff.format
"D107", # Missing docstring in `__init__`
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the first line
"F722", # Syntax error in forward annotation <- jaxtyping
"F811", # Redefinition of unused '...' (for plum-dispatch)
"F821", # undefined name <- jaxtyping
"FIX002", # Line contains TODO
"ISC001", # Conflicts with formatter
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"RUF022", # `__all__` is not sorted
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
"UP037", # Remove quote from type annotation <- jaxtyping
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["ANN", "S101", "T20"]
"noxfile.py" = ["T20"]
"docs/conf.py" = ["INP001"]
[tool.ruff.lint.isort]
combine-as-imports = true
extra-standard-library = ["typing_extensions"]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"diffrax" = "dfx"
"equinox" = "eqx"
"numpy" = "np"
[tool.uv]
constraint-dependencies = [
# Because IPyKernel doesn't constrain its dependencies
"appnope>=0.1.4",
"cffi>=1.17",
"decorator>=5.1",
"psutil>=6.1.1",
"py>=1.11",
# Matplotlib
"matplotlib>=3.10",
"pillow>=10.3.0",
# Jax
"scipy>=1.14",
"jax>0.4.34",
# Misc
"opt-einsum>=3.3.0",
# Transitive dependencies for --resolution lowest
"pyparsing>3.0.0",
"future>=0.16.0",
"backcall>=0.1.0",
"wcwidth>=0.1.0",
"iniconfig>=0.1.0",
"nest-asyncio>=0.1.0",
"pickleshare>=0.7",
"tomli>=1.0",
"pycparser>=2.10",
]