-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (129 loc) · 4.09 KB
/
Copy pathpyproject.toml
File metadata and controls
145 lines (129 loc) · 4.09 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
[build-system]
requires = [
"setuptools>=77",
"setuptools-scm>=8",
# Cython 3.3.0 makes the __pyx_CyFunctionObject layout depend on the
# limited-API target (an extra func_is_coroutine field below 0x030B0000)
# without reflecting that in the name of the module its shared types live in,
# so our cp311 modules collide with any cp310 abi3 module built by the same
# Cython -- uharfbuzz >=0.56.1, via pygfx -- and whichever imports second dies
# with "Shared Cython type ... has the wrong size". Fixed in cython/cython#7916
# (unreleased at time of writing), so this skips the one bad release.
"Cython>=3.1,!=3.3.0",
"CT3>=3.3.3",
"numpy", # imported (not linked) while rendering the wrappers
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
# The JIT fallback compiles from these at runtime, so they must ship in the
# wheel. `include-package-data` (on by default here) would pick them up from
# the VCS/sdist manifest anyway; listing them keeps that explicit and works
# even when no file finder is available. Patterns are package-relative, so the
# vendored C under `_rtree/src/` and `_graph/src/` needs the `src/` prefix.
"*" = ["py.typed", "*.pyx", "src/*.c", "src/*.h", "src/LICENSE*", "src/*.md"]
[project]
name = "spatial-graph"
dynamic = ["version"]
description = "A spatial graph datastructure for python."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ email = "funkej@janelia.hhmi.org", name = "Jan Funke" },
{ email = "talley.lambert@gmail.com", name = "Talley Lambert" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Typing :: Typed",
]
dependencies = [
"witty>=0.3.2",
"CT3>=3.3.3",
"numpy>=2.3.2; python_version >= '3.14'",
"numpy>=2.1.0; python_version >= '3.13'",
"numpy>=1.26.0; python_version >= '3.12'",
"numpy>=1.23.2",
"setuptools>=75.8.0",
"typing_extensions>=4.5.0", # witty<=0.3.1 imports it without declaring it
]
[dependency-groups]
test = ["pytest>=8.3.5", "pytest-cov>=6.1.1"]
test-codspeed = [{ include-group = "test" }, "pytest-codspeed >=3.2.0"]
dev = [
{ include-group = "test" },
"ipython>=8.18.1",
"mypy>=1.15.0",
"prek>=0.4.4",
"pytest-benchmark>=5.1.0", # specifically excluded from test group for ci
"ruff>=0.11.10",
]
docs = [
"mkdocs>=1.6.1",
"mkdocs-api-autonav>=0.3.0",
"mkdocs-material>=9.6.15",
"mkdocstrings-python>=1.16.12",
"ruff",
]
[project.urls]
homepage = "https://github.com/funkelab/spatial_graph"
repository = "https://github.com/funkelab/spatial_graph"
[tool.cibuildwheel]
# a single abi3 build per platform covers every supported CPython
build = "cp311-*"
# never let a wheel silently degrade to pure Python
environment = { SPATIAL_GRAPH_REQUIRE_PREBUILT = "1" }
test-groups = ["test"]
# these exercise the prebuilt modules in the repaired wheel without needing a
# compiler; cross-version and numpy-only checks live in the CI workflow
test-command = "pytest {project}/tests/test_prebuilt.py -q"
[tool.ruff]
target-version = "py311"
line-length = 88
fix = true
unsafe-fixes = true
[tool.ruff.lint]
select = [
"E", # style errors
"F", # flakes
"W", # warnings
"I", # isort
"UP", # pyupgrade
"TC", # typing
"TID", # tidy imports
"RUF", # ruff
]
[tool.ruff.format]
docstring-code-format = true
[tool.mypy]
files = "*.py"
strict = false
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
[tool.pytest.ini_options]
addopts = "-v --color=yes"
filterwarnings = ["error", "ignore:'cgi' is deprecated"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"raise AssertionError",
"\\.\\.\\.",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]
[tool.coverage.run]
source = ['spatial_graph']