-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
244 lines (223 loc) · 7.71 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
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
[project]
name = "coordinax"
dynamic = ["version"]
description = "Coordinates in JAX"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.10"
authors = [
{ name = "Nathaniel Starkman", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"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.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dependencies = [
"astropy>=6.1.4",
"dataclassish>=0.3.1",
"equinox>=0.11.8",
"jax>=0.4.33",
"jaxlib>=0.4.33",
"jaxtyping>=0.2.34",
"optional-dependencies>=0.3.2",
"plum-dispatch>=2.5.2",
"quax>=0.0.5",
"quaxed>=0.6.4",
"unxt>=0.22",
"xmmutablemap>=0.1",
]
[project.optional-dependencies]
all = ["coordinax[docs]", "coordinax[dev]", "coordinax[test]"]
dev = ["coordinax[test]"]
docs = [
"furo>=2023.08.17",
"myst_parser>=0.13",
"sphinx>=7.0",
"sphinx_copybutton",
"sphinx_autodoc_typehints",
]
test = [
"hypothesis[numpy]",
"nox",
"pytest >=6",
"pytest-arraydiff",
"pytest-cov >=3",
"pytest-env",
"sybil != 7.1.0",
]
[project.urls]
"Bug Tracker" = "https://github.com/GalacticDynamics/coordinax/issues"
Changelog = "https://github.com/GalacticDynamics/coordinax/releases"
Discussions = "https://github.com/GalacticDynamics/coordinax/discussions"
Homepage = "https://github.com/GalacticDynamics/coordinax"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch]
build.hooks.vcs.version-file = "src/coordinax/_version.py"
version.source = "vcs"
[tool.coverage]
run.source = ["coordinax"]
[tool.coverage.report]
exclude_also = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Ignore type-checking stuff
'if typing.TYPE_CHECKING:',
'if TYPE_CHECKING:',
'\.\.\.',
# Ignore contents of abstract methods
'@abc.abstractmethod',
'@abstractmethod',
]
[tool.mypy]
disable_error_code = [
"no-redef", # for plum-dispatch
"name-defined", # for jaxtyping
]
disallow_incomplete_defs = false
disallow_untyped_defs = false
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
files = ["src", "tests"]
python_version = "3.10"
strict = true
warn_return_any = false
warn_unreachable = true
warn_unused_configs = true
[[tool.mypy.overrides]]
disallow_incomplete_defs = true
disallow_untyped_defs = true
module = "coordinax.*"
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"array_api.*",
"quaxed.*",
"astropy.*",
"equinox.*",
"hypothesis.*",
"jax.*",
"coordinax.*",
"jaxtyping.*",
"numpy.*",
"quax.*",
]
[tool.pylint]
ignore-paths = [".*/_version.py"]
messages_control.disable = [
"abstract-method", # pylint doesn't like ABC hierarchies
"arguments-differ", # plum-dispatch
"cyclic-import", # broken?
"design",
"duplicate-code",
"import-outside-toplevel", # handled by ruff
"fixme",
"function-redefined", # plum-dispatch
"invalid-name", # handled by ruff
"invalid-unary-operand-type", # pylint doesn't understand dataclass fields
"isinstance-second-argument-not-valid-type", # pylint doesn't understand _cartesian_cls
"line-too-long",
"missing-function-docstring", # TODO: resolve
"missing-kwoa", # plum-dispatch
"missing-module-docstring",
"no-member", # handled by mypy
"no-value-for-parameter", # pylint doesn't understand multiple dispatch
"not-a-mapping", # pylint doesn't understand dataclass fields
"property-with-parameters", # Cannot have defined parameters for properties
"protected-access", # handled by ruff
"redefined-builtin", # handled by ruff
"too-many-function-args", # plum-dispatch
"unexpected-keyword-arg", # plum-dispatch
"unnecessary-ellipsis", # I like my ellipses in ABCs and Protocols
"unsubscriptable-object", # handled by mypy
"unused-argument", # handled by ruff
"wrong-import-position",
"wrong-import-order", # handled by ruff
]
py-version = "3.10"
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
max-module-lines = 1500
[tool.pytest.ini_options]
addopts = [
"-ra",
"--arraydiff",
"--showlocals",
"--strict-markers",
"--strict-config",
"--doctest-glob='*.rst | *.py'",
]
filterwarnings = [
"error",
"ignore:ast\\.Str is deprecated and will be removed in Python 3\\.14:DeprecationWarning", # from Sybil
"ignore:Attribute s is deprecated and will be removed in Python 3\\.14:DeprecationWarning", # from Sybil
"ignore:Explicitly requested dtype <class 'jax.numpy\\.float64'> requested in astype is not available",
"ignore:jax\\.core\\.pp_eqn_rules is deprecated:DeprecationWarning",
]
log_cli_level = "INFO"
minversion = "6.0"
testpaths = ["tests"]
xfail_strict = true
env = [
"COORDINAX_ENABLE_RUNTIME_TYPECHECKING=beartype.beartype",
]
[tool.ruff]
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"A002", # Argument is shadowing a Python builtin
"ANN001", # Missing type annotation for `cls` in method
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in method
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"ARG001", # Unused function argument # TODO: resolve
"B008", # Do not perform function calls in argument defaults
"COM812", # <- for ruff.format
"D103", # Missing docstring in public function # TODO: resolve
"D105", # Missing docstring in magic method
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"ERA001", # Commented out code
"F722", # Syntax error in forward annotation <- jaxtyping
"F811", # redefinition of unused '...' <- plum-dispatch
"F821", # undefined name '...' <- jaxtyping
"FIX002", # Line contains TODO
"ISC001", # Conflicts with formatter
"PD", # Pandas
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"PYI041", # Use `complex` instead of `int | complex` <- plum is more strict
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
]
# Uncomment if using a _compat.typing backport
# typing-modules = ["coordinax._compat.typing"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"]
"docs/conf.py" = ["A001", "INP001"]
"noxfile.py" = ["T20"]
"tests/**" = ["ANN", "S101", "T20"]
[tool.ruff.lint.isort]
combine-as-imports = true
extra-standard-library = ["typing_extensions"]
known-first-party = ["dataclassish", "optional_dependencies", "quaxed", "unxt", "xmmutablemap"]
known-local-folder = ["coordinax"]
[tool.uv]
dev-dependencies = [
"ipykernel>=6.29.5",
"pytest-arraydiff>=0.6.1",
"pytest-env>=1.1.5",
"pytest>=8.3.3",
"sybil>=8.0.0",
]