-
Notifications
You must be signed in to change notification settings - Fork 152
/
pyproject.toml
211 lines (197 loc) · 5.92 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
[project]
name = "anndata"
description = "Annotated data."
requires-python = ">=3.9"
license = "BSD-3-Clause"
authors = [
{ name = "Philipp Angerer" },
{ name = "Alex Wolf" },
{ name = "Isaac Virshup" },
{ name = "Sergei Rybakov" },
]
maintainers = [
{ name = "Isaac Virshup", email = "[email protected]" },
{ name = "Philipp Angerer", email = "[email protected]" },
{ name = "Alex Wolf", email = "[email protected]" },
]
readme = "README.md"
classifiers = [
"Environment :: Console",
"Framework :: Jupyter",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
# pandas <1.4 has pandas/issues/35446
# pandas 2.1.0rc0 has pandas/issues/54622
"pandas >=1.4, !=2.1.0rc0, !=2.1.2",
"numpy>=1.23",
# https://github.com/scverse/anndata/issues/1434
"scipy >1.8",
"h5py>=3.1",
"exceptiongroup; python_version<'3.11'",
"natsort",
"packaging>=20.0",
# array-api-compat 1.5 has https://github.com/scverse/anndata/issues/1410
"array_api_compat>1.4,!=1.5",
]
dynamic = ["version"]
[project.urls]
Documentation = "https://anndata.readthedocs.io/"
Source = "https://github.com/scverse/anndata"
Home-page = "https://github.com/scverse/anndata"
[project.optional-dependencies]
dev = [
# dev version generation
"setuptools_scm",
# test speedups
"pytest-xdist",
"towncrier>=24.8.0rc1",
]
doc = [
"sphinx>=7.4.6",
"sphinx-book-theme>=1.1.0",
"sphinx-autodoc-typehints>=2.2.0",
"sphinx-issues",
"sphinx-copybutton",
"sphinx-toolbox",
"sphinxext.opengraph",
"nbsphinx",
"scanpydoc[theme,typehints] >=0.13.6",
"zarr",
"awkward>=2.0.7",
"IPython", # For syntax highlighting in notebooks
"myst_parser",
"sphinx_design>=0.5.0",
"readthedocs-sphinx-search",
]
test = [
"loompy>=3.0.5",
"pytest>=8.2",
"pytest-cov>=2.10",
"zarr<3.0.0a0",
"matplotlib",
"scikit-learn",
"openpyxl",
"joblib",
"boltons",
"scanpy",
"httpx", # For data downloading
"dask[array,distributed]>=2022.09.2,<2024.8.0",
"awkward>=2.3",
"pyarrow",
"pytest_memray",
"pytest-mock"
]
gpu = [
"cupy",
"numpy<2.0.0",
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/anndata/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/anndata", "src/testing"]
[tool.coverage.run]
source_pkgs = ["anndata"]
omit = ["src/anndata/_version.py", "**/test_*.py"]
[tool.coverage.paths]
source = ["./src", "**/site-packages"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--strict-markers",
"--doctest-modules",
"--pyargs",
"-ptesting.anndata._pytest",
]
filterwarnings = [
# all `ignore::anndata.*` entries are in `conftest.py`
# See: https://github.com/pytest-dev/pytest-cov/issues/437
]
# When `--strict-warnings` is used, all warnings are treated as errors, except those:
filterwarnings_when_strict = [
"default::anndata._warnings.ImplicitModificationWarning",
"default:Transforming to str index:UserWarning",
"default:(Observation|Variable) names are not unique. To make them unique:UserWarning",
"default::scipy.sparse.SparseEfficiencyWarning",
"default::dask.array.core.PerformanceWarning",
]
python_files = "test_*.py"
testpaths = [
"anndata", # docstrings (module name due to --pyargs)
"./tests", # unit tests
"./docs/concatenation.rst", # further doctests
]
# For some reason this effects how logging is shown when tests are run
xfail_strict = true
markers = ["gpu: mark test to run on GPU"]
[tool.ruff]
src = ["src"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # Error detected by Pycodestyle
"F", # Errors detected by Pyflakes
"W", # Warning detected by Pycodestyle
"UP", # pyupgrade
"I", # isort
"TCH", # manage type checking blocks
"ICN", # Follow import conventions
"PTH", # Pathlib instead of os.path
"PT", # Pytest conventions
]
ignore = [
# line too long -> we accept long comment lines; formatter gets rid of long code lines
"E501",
# Do not assign a lambda expression, use a def -> AnnData allows lambda expression assignments,
"E731",
# allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation
"E741",
]
[tool.ruff.lint.per-file-ignores]
# E721 comparing types, but we specifically are checking that we aren't getting subtypes (views)
"tests/test_readwrite.py" = ["E721"]
[tool.ruff.lint.isort]
known-first-party = ["anndata"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.flake8-type-checking]
exempt-modules = []
strict = true
[tool.codespell]
skip = ".git,*.pdf,*.svg"
ignore-words-list = "theis,coo,homogenous"
[tool.towncrier]
package = "anndata"
directory = "docs/release-notes"
filename = "docs/release-notes/{version}.md"
single_file = false
package_dir = "src"
issue_format = "[#{issue}](https://github.com/scverse/anndata/pull/{issue})"
title_format = "(v{version})=\n### {version} `{project_date}`"
[tool.towncrier.fragment.bugfix]
[tool.towncrier.fragment.doc]
[tool.towncrier.fragment.feature]
[tool.towncrier.fragment.misc]
[tool.towncrier.fragment.performance]
name = "Performance"