-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (138 loc) · 3.68 KB
/
pyproject.toml
File metadata and controls
167 lines (138 loc) · 3.68 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
[build-system]
requires = ["meson-python"]
build-backend = "mesonpy"
[project]
name = "array-api-compat"
version = "1.15.0.dev0"
description = "A wrapper around NumPy and other array libraries to make them compatible with the Array API standard"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [{name = "Consortium for Python Data API Standards"}]
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.optional-dependencies]
cupy = ["cupy"]
dask = ["dask>=2024.9.0"]
jax = ["jax"]
# Note: array-api-compat follows scikit-learn minimum dependencies, which support
# much older versions of NumPy than what SPEC0 recommends.
numpy = ["numpy>=1.22"]
pytorch = ["torch"]
sparse = ["sparse>=0.15.1"]
ndonnx = ["ndonnx"]
docs = [
"furo",
"linkify-it-py",
"myst-parser",
"sphinx",
"sphinx-copybutton",
"sphinx-autobuild",
]
dev = [
"array-api-strict",
"dask[array]>=2024.9.0",
"jax[cpu]",
"ndonnx",
"numpy>=1.22",
"pytest",
"torch",
"sparse>=0.15.1",
]
[project.urls]
homepage = "https://data-apis.org/array-api-compat/"
repository = "https://github.com/data-apis/array-api-compat/"
# Pixi
[tool.pixi.workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "osx-arm64", "win-64"]
preview = ["pixi-build"]
### array-api-compat package definition ###
[tool.pixi.package.build.backend]
name = "pixi-build-python"
version = "*"
[tool.pixi.package.host-dependencies]
meson-python = "*"
### workspace environments ###
[tool.pixi.environments]
docs = ["docs"]
tests = ["tests"]
### default feature definition ###
[tool.pixi.dev]
# this pulls in array-api-compat's host dependencies
array-api-compat.path = "."
[tool.pixi.dependencies]
array-api-compat.path = "."
### non-default feature definitions ###
[tool.pixi.feature.tests.dependencies]
pytest = "*"
array-api-strict = "*"
numpy = "*"
[tool.pixi.feature.tests.tasks]
tests = { cmd = "pytest -v", description = "Run tests" }
[tool.pixi.feature.docs.dependencies]
furo = "*"
linkify-it-py = "*"
myst-parser = "*"
sphinx = "*"
sphinx-copybutton = "*"
sphinx-autobuild = "*"
[tool.pixi.feature.docs.tasks]
docs = { cmd = "make html", cwd = "docs", description = "Build docs" }
[tool.ruff.lint]
preview = true
select = [
# Defaults
"E4", "E7", "E9", "F",
# Undefined export
"F822",
# Useless import alias
"PLC0414"
]
ignore = [
# Module import not at top of file
"E402",
# Do not use bare `except`
"E722"
]
[tool.mypy]
files = ["array_api_compat"]
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = false # TODO
ignore_missing_imports = false
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["cupy.*", "cupy_backends.*", "dask.*", "jax.*", "ndonnx.*", "sparse.*", "torch.*"]
ignore_missing_imports = true
[tool.pyright]
include = ["src", "tests"]
pythonPlatform = "All"
reportAny = false
reportExplicitAny = false
# missing type stubs
reportAttributeAccessIssue = false
reportUnknownMemberType = false
reportUnknownVariableType = false
# Redundant with mypy checks
reportMissingImports = false
reportMissingTypeStubs = false
# false positives for input validation
reportUnreachable = false
# ruff handles this
reportUnusedParameter = false
executionEnvironments = [
{ root = "array_api_compat" },
]