-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathpyproject.toml
More file actions
131 lines (117 loc) · 3.24 KB
/
pyproject.toml
File metadata and controls
131 lines (117 loc) · 3.24 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
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "array-api-compat"
dynamic = ["version"]
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",
"Programming Language :: Python :: 3.14",
"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/"
[tool.setuptools.dynamic]
version = {attr = "array_api_compat.__version__"}
[tool.setuptools.packages.find]
include = ["array_api_compat*"]
namespaces = false
[tool.ruff.lint]
preview = true
select = [
# Defaults
"E4", "E7", "E9", "F",
# Additional rules
"B", "C4", "ISC", "PIE", "FLY", "PERF", "UP", "FURB",
# Useless import alias
"PLC0414",
# Unused `noqa` directive
"RUF100",
]
ignore = [
# Module import not at top of file
"E402",
# Do not use bare `except`
"E722",
# Use of `functools.cache` on methods can lead to memory leaks
"B019",
# No explicit `stacklevel` keyword argument found
"B028",
# Within an `except` clause, raise exceptions with `raise ... from ...`
"B904",
# `try`-`except` within a loop incurs performance overhead
"PERF203",
]
[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" },
]