-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
136 lines (122 loc) · 3.64 KB
/
Copy pathpyproject.toml
File metadata and controls
136 lines (122 loc) · 3.64 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
[project]
name = "bearshape"
version = "0.1.0rc0"
description = "Elegant runtime shape and dtype checking for NumPy, JAX, PyTorch, and CuPy arrays — powered by beartype."
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "acecchini", email = "ale.cecchini.valette@gmail.com" }]
requires-python = ">=3.10"
dependencies = [
"beartype>=0.23.0rc0,<0.24", # Exact candidate tested in tox.toml
"typing_extensions>=4.6",
]
keywords = [
"type-checking",
"shape",
"dtype",
"numpy",
"jax",
"pytorch",
"cupy",
"beartype",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"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 :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/acecchini/bearshape"
Repository = "https://github.com/acecchini/bearshape"
Issues = "https://github.com/acecchini/bearshape/issues"
[build-system]
requires = ["uv_build>=0.11.0,<0.12.0"]
build-backend = "uv_build"
[dependency-groups]
# Backends are CPU-only for dev/CI. bearshape is device-agnostic — it checks
# .shape and .dtype only. Users install their own numpy/jax/torch/cupy/optree.
# CuPy requires CUDA and is not included here; install separately for GPU envs.
optional = ["numpy>=2.2.0", "torch>=2.6.0", "jax[cpu]>=0.5.0", "optree>=0.14.0"]
static = [
"pyright>=1.1.408",
"mypy>=1.19,<3",
"ty>=0.0.79",
"pyrefly>=1.2,<2",
]
docs = ["zensical>=0.0.43"]
test = [
"pytest>=9.0.2",
"pytest-cov>=7.1.0",
"pytest-xdist>=3.8.0",
"tox>=4.52.0",
"tox-uv>=1.34.0",
]
notebook = ["ipykernel>=7.2.0", "nbclient>=0.11.0"]
dev = ["ruff>=0.15.9", "prek>=0.3.8"]
[tool.uv]
default-groups = ["dev", "optional", "static", "docs", "test", "notebook"]
required-version = ">=0.11.0,<0.12.0"
python-preference = "only-managed"
[tool.uv.build-backend]
module-name = "bearshape"
source-include = [
"tests/**", "tools/**", "pytest.toml", "tox.toml", "ty.toml", "ruff.toml",
"uv.lock", "CONTRIBUTING.md", "CHANGELOG.md",
]
[tool.uv.sources]
torch = [{ index = "pytorch-cpu" }]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.codespell]
skip = "uv.lock,*.ipynb,.venv,.tox"
ignore-words-list = "numbe"
[tool.typos.default.extend-words]
ND = "ND"
[tool.pyright]
typeCheckingMode = "strict"
include = ["src", "tests/typing"]
# Beartype's Is[lambda ...] validators produce unknown types in closures
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownVariableType = false
reportUnknownArgumentType = false
# _TreeFactory is used at runtime via module-level assignment, not direct reference
reportUnusedClass = false
# numpy._NestedSequence, ._SupportsArray, and internal _dim_spec access
reportPrivateUsage = false
reportUnusedImport = "warning"
# Check the oldest supported Python, not the interpreter running the checker.
pythonVersion = "3.10"
pythonPlatform = "Linux"
[tool.pyrefly]
preset = "default"
project-includes = ["src", "tests/typing"]
python-version = "3.10"
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
warn_unreachable = true
[tool.coverage.run]
branch = true
source = ["bearshape"]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_also = [
"if tp.TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
]