-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (128 loc) · 3.93 KB
/
pyproject.toml
File metadata and controls
139 lines (128 loc) · 3.93 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
[build-system]
requires = ["setuptools >=61"]
build-backend = "setuptools.build_meta"
[project]
name = "nitrix"
version = "0.0.0.dev0"
description = "Neuroimaging transformations in XLA"
authors = [
{ name = "Rastko Ciric", email = "rastko@stanford.edu" },
]
maintainers = [
{ name = "Rastko Ciric", email = "rastko@stanford.edu" },
]
license = { file = "LICENSE" }
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
]
# jax >= 0.10.0 requires Python >= 3.11; the nox test matrix is already
# 3.11/3.12/3.13. A >=3.10 floor silently caps jax at the last 3.10-compatible
# release (0.4.35), which lacks jax.random.multinomial and diverges on the
# Pallas surface -- see the jax pin note below.
requires-python = ">=3.11"
dependencies = [
# Min pin tracks the validated baseline (Dockerfile: jax[cuda12]==0.10.0;
# bench/G0_ELL_REPORT.md, the kernels, and the Pallas-Triton gather-lowering
# analysis are all against 0.10.0). Below 0.10.0, jax.random.multinomial
# (used by signal/window.py) is absent and the Pallas surface diverges, so
# this is a hard floor per SPEC_UPDATE_v0.2 §7.2 ("pin a minimum jax").
"jax >= 0.10.0",
"jaxtyping >= 0.2.31",
"numpy >= 2.0",
]
[project.optional-dependencies]
dev = [
"nox",
"pytest",
"pytest-cov",
"coverage[toml]",
"ruff",
"mypy",
"hypothesis",
"pingouin",
"gnureadline",
# >= 0.21: earlier numpyro imports jax.experimental.pjit.pjit_p, removed in
# jax 0.10. Test-only reference dep (not a runtime import; SPEC §5.2).
"numpyro >= 0.21.0",
]
[project.urls]
"Homepage" = "https://github.com/hypercoil/nitrix"
[tool.coverage.report]
show_missing = true
skip_covered = true
precision = 2
[tool.coverage.run]
branch = true
omit = [
'*test*',
'*__init__*',
]
[tool.ruff]
lint.ignore = [
"E501", # line too long: add it back when this is resolved:
# https://github.com/astral-sh/ruff/issues/3711
# jaxtyping shape strings (the 2nd arg of ``Float[Array, 'n m']``) are
# read by ruff as forward-reference annotations: multi-axis strings
# ('n m', '... n n') are "syntax errors" (F722) and single-axis strings
# ('n', 'spatial') are "undefined names" (F821). Both are pervasive and
# not real defects. Undefined names in actual code/annotations are still
# caught by mypy's [name-defined] (enforced via the `typecheck` session),
# so this is a documentation-only loss for ruff.
"F722", # forward-annotation "syntax error" -- jaxtyping shapes
"F821", # forward-annotation "undefined name" -- jaxtyping axis labels
]
lint.select = [
"E",
"F",
"W",
"I001",
]
line-length = 79
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.pytest.ini_options]
testpaths = [
"tests",
]
[tool.mypy]
mypy_path = "src"
allow_redefinition = true
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true
# Lift the bar from "bodies are checked" to "everything is annotated": every
# def carries a complete signature, so static inference flows through the
# numerics surface instead of decaying to Any at each unannotated boundary.
# The `typecheck` nox session runs mypy in CI so this is enforced, not
# aspirational.
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_unused_ignores = true
[tool.uv]
dev-dependencies = [
"nox",
"pytest",
"pytest-cov",
"coverage[toml]",
"ruff",
"mypy",
"hypothesis",
"pingouin",
"gnureadline",
"numpyro>=0.21.0", # < 0.21 imports pjit_p, removed in jax 0.10
"communities>=3.0.0",
]