-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
197 lines (169 loc) · 5.72 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
[project]
name = "quaxed"
dynamic = ["version"]
description = "Pre-quaxed libraries for multiple dispatch over abstract array types in JAX"
readme = "README.md"
requires-python = ">=3.11"
authors = [
{ name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" },
]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD 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",
]
dependencies = [
"jax>=0.4.3",
"jaxlib>=0.4.3",
"jaxtyping>=0.2.34",
"optype>=0.8.0",
"plum-dispatch>=2.5.2",
"quax>=0.0.5",
]
[project.urls]
Homepage = "https://github.com/GalacticDynamics/quaxed"
"Bug Tracker" = "https://github.com/GalacticDynamics/quaxed/issues"
Discussions = "https://github.com/GalacticDynamics/quaxed/discussions"
Changelog = "https://github.com/GalacticDynamics/quaxed/releases"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"cz-conventional-gitmoji>=0.6.1",
{include-group = "test"},
{include-group = "docs"},
]
docs = [
"griffe < 1.0", # For Python structure signatures"
"mkdocs==1.6.0", # Main documentation generator.
"mkdocs-material==9.5", # Theme
"mkdocs_include_exclude_files==0.0.1", # Tweak which files are included/excluded
"mkdocstrings[python] >= 0.18", # Autogenerate documentation from docstrings.
"mknotebooks==0.8", # Turn Jupyter Lab notebooks into webpages.
"nbconvert==7.16",
"pygments==2.16",
"pymdown-extensions==10.2", # Markdown extensions e.g. to handle LaTeX.
"pytkdocs_tweaks==0.0.8", # Tweaks mkdocstrings to improve various aspects
"jinja2==3.1"
]
test = [
"pytest >= 8.3",
"pytest-cov >= 3",
"pytest-github-actions-annotate-failures", # only applies to GH Actions
"sybil >= 7.1.0",
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/quaxed/_version.py"
[tool.codespell]
ignore-words-list = """
fro,
"""
[tool.commitizen]
name = "cz_gitmoji"
[tool.coverage]
run.source = ["quaxed"]
port.exclude_lines = [
'pragma: no cover',
'\.\.\.',
'if typing.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
warn_return_any = false
[[tool.mypy.overrides]]
module = "quaxed.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
[[tool.mypy.overrides]]
module = ["jax.*", "jaxtyping.*", "plum.*", "quax.*"]
ignore_missing_imports = true
[tool.pylint]
py-version = "3.11"
ignore-paths = [".*/_version.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"missing-function-docstring", # TODO: reinstate.
"missing-module-docstring",
"redefined-builtin",
"useless-import-alias", # handled by ruff
"wrong-import-position",
]
[tool.pytest.ini_options]
minversion = "8.3"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = [
"error",
# jaxtyping
"ignore:ast\\.Str is deprecated and will be removed in Python 3.14:DeprecationWarning",
# jax
"ignore:jax\\.core\\.pp_eqn_rules is deprecated:DeprecationWarning",
"ignore:jax\\.experimental\\.array_api import is no longer required as of JAX v0\\.4\\.32"
]
log_cli_level = "INFO"
testpaths = ["tests"]
[tool.ruff]
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"A001", # Variable is shadowing a Python builtin
"A002", # Argument is shadowing a Python builtin
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed # TODO
"ARG001", # Unused function argument
"COM812", # Missing trailing comma
"D103", # Missing docstring in public function # TODO
"D203", # one-blank-line-before-class
"D213", # Multi-line docstring summary should start at the second line
"ISC001", # handled by formatter
"ERA001", # Found commented-out code
"F811", # Redefinition of unused variable <- plum
"FIX002", # Line contains TODO, consider resolving the issue
"PD011", # Pandas
"PYI041", # Use `float` instead of `int | float`
"RUF022", # `__all__` is not sorted
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): .
"TD003", # Missing issue link on the line following this TODO
]
[tool.ruff.lint.isort]
combine-as-imports = true
extra-standard-library = ["typing_extensions"]
[tool.ruff.lint.per-file-ignores]
"src/quaxed/**" = ["A004"]
"tests/**" = ["ANN", "INP001", "PLR0913", "PLR2004", "S101", "T20", "TID252"]
"__init__.py" = ["F403"]
"noxfile.py" = ["T20"]
"docs/conf.py" = ["INP001"]
"scratch/**" = ["ANN", "D", "FBT", "INP"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.uv]
constraint-dependencies = [
"bleach>6.0",
"pyparsing>=3.0.0",
"pyzmq>=25.0",
"scipy>=1.13",
"jax<0.4.36", # TODO: remove when https://github.com/patrick-kidger/quax/pull/37 is merged
]