forked from scverse/scanpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
258 lines (247 loc) · 8.43 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
[project]
name = "scanpy"
description = "Single-Cell Analysis in Python."
requires-python = ">=3.9"
license = "BSD-3-clause"
authors = [
{name = "Alex Wolf"},
{name = "Philipp Angerer"},
{name = "Fidel Ramirez"},
{name = "Isaac Virshup"},
{name = "Sergei Rybakov"},
{name = "Gokcen Eraslan"},
{name = "Tom White"},
{name = "Malte Luecken"},
{name = "Davide Cittaro"},
{name = "Tobias Callies"},
{name = "Marius Lange"},
{name = "Andrés R. Muñoz-Rojas"},
]
maintainers = [
{name = "Isaac Virshup", email = "[email protected]"},
{name = "Philipp Angerer", email = "[email protected]"},
{name = "Alex Wolf", email = "[email protected]"},
]
readme = "README.md"
classifiers = [
"License :: OSI Approved :: BSD License",
"Development Status :: 5 - Production/Stable",
"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 = [
"anndata>=0.8",
"numpy>=1.23",
"matplotlib>=3.6",
"pandas >=1.5",
"scipy>=1.8",
"seaborn>=0.13",
"h5py>=3.1",
"tqdm",
"scikit-learn>=0.24",
"statsmodels>=0.13",
"patsy",
"networkx>=2.7",
"natsort",
"joblib",
"numba>=0.56",
"umap-learn>=0.5,!=0.5.0",
"pynndescent>=0.5",
"packaging>=21.3",
"session-info",
"legacy-api-wrap>=1.4", # for positional API deprecations
"get-annotations; python_version < '3.10'",
]
dynamic = ["version"]
[project.urls]
Documentation = "https://scanpy.readthedocs.io/"
Source = "https://github.com/scverse/scanpy"
Home-page = "https://scanpy.org"
Discourse = "https://discourse.scverse.org/c/help/scanpy/37"
Twitter = "https://twitter.com/scverse_team"
[project.scripts]
scanpy = "scanpy.cli:console_main"
[project.optional-dependencies]
test-min = [
"pytest>=8.2",
"pytest-nunit",
"pytest-mock",
"pytest-cov",
"profimp",
]
test = [
"scanpy[test-min]",
# Optional but important dependencies
"scanpy[leiden]",
"zarr",
"scanpy[dask]",
"scanpy[scrublet]",
]
test-full = [
"scanpy[test]",
# optional storage modes
"zappy",
# additional tested algorithms
"scanpy[louvain]",
"scanpy[magic]",
"scanpy[skmisc]",
"scanpy[harmony]",
"scanpy[scanorama]",
"scanpy[dask-ml]",
]
doc = [
"sphinx>=7",
"sphinx-book-theme>=1.1.0",
"scanpydoc>=0.13.4",
"sphinx-autodoc-typehints>=1.25.2",
"myst-parser>=2",
"myst-nb>=1",
"sphinx-design",
"readthedocs-sphinx-search",
"sphinxext-opengraph", # for nice cards when sharing on social
"sphinx-copybutton",
"nbsphinx>=0.9",
"ipython>=7.20", # for nbsphinx code highlighting
"matplotlib!=3.6.1",
"sphinxcontrib-bibtex",
"setuptools",
# TODO: remove necessity for being able to import doc-linked classes
"dask",
"scanpy[paga]",
"sam-algorithm",
]
dev = [
# getting the dev version
"setuptools_scm",
# static checking
"pre-commit",
]
# Algorithms
paga = ["igraph"]
louvain = ["igraph", "louvain>=0.6.0,!=0.6.2"] # Louvain community detection
leiden = ["igraph>=0.10", "leidenalg>=0.9.0"] # Leiden community detection
bbknn = ["bbknn"] # Batch balanced KNN (batch correction)
magic = ["magic-impute>=2.0"] # MAGIC imputation method
skmisc = ["scikit-misc>=0.1.3"] # highly_variable_genes method 'seurat_v3'
harmony = ["harmonypy"] # Harmony dataset integration
scanorama = ["scanorama"] # Scanorama dataset integration
scrublet = ["scikit-image"] # Doublet detection with automatic thresholds
# Acceleration
rapids = ["cudf>=0.9", "cuml>=0.9", "cugraph>=0.9"] # GPU accelerated calculation of neighbors
dask = ["dask[array]>=2022.09.2"] # Use the Dask parallelization engine
dask-ml = ["dask-ml", "scanpy[dask]"] # Dask-ML for sklearn-like API
[tool.hatch.build.targets.wheel]
packages = ["src/testing", "src/scanpy"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/scanpy/_version.py"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--strict-markers",
"--doctest-modules",
"-ptesting.scanpy._pytest",
"--pyargs",
]
testpaths = ["./tests", "scanpy"]
norecursedirs = ["tests/_images"]
xfail_strict = true
nunit_attach_on = "fail"
markers = [
"internet: tests which rely on internet resources (enable with `--internet-tests`)",
"gpu: tests that use a GPU (currently unused, but needs to be specified here as we import anndata.tests.helpers, which uses it)",
"anndata_dask_support: tests that require dask support in anndata",
]
filterwarnings = [
# legacy-api-wrap: internal use of positional API
"error:The specified parameters:FutureWarning",
# When calling `.show()` in tests, this is raised
"ignore:FigureCanvasAgg is non-interactive:UserWarning",
# We explicitly handle the below errors in tests
"error:`anndata.read` is deprecated:FutureWarning",
"error:Observation names are not unique:UserWarning",
"error:The dtype argument is deprecated and will be removed:FutureWarning",
"error:The behavior of DataFrame\\.sum with axis=None is deprecated:FutureWarning",
"error:The default of observed=False is deprecated:FutureWarning",
"error:Series\\.__getitem__ treating keys as positions is deprecated:FutureWarning",
"error:The default value of 'ignore' for the `na_action` parameter in pandas\\.Categorical\\.map:FutureWarning",
"error:The provided callable.* is currently using:FutureWarning",
"error:The behavior of DataFrame concatenation with empty or all-NA entries is deprecated:FutureWarning",
"error:A value is trying to be set on a copy of a slice from a DataFrame",
"error:No data for colormapping provided via 'c'",
"error:\\n*The `scale` parameter has been renamed and will be removed",
"error:\\n*Passing `palette` without assigning `hue` is deprecated",
"error:\\n*Setting a gradient palette using color= is deprecated",
]
[tool.coverage.run]
data_file = "test-data/coverage"
source_pkgs = ["scanpy"]
omit = ["tests/*", "src/testing/*"]
[tool.coverage.xml]
output = "test-data/coverage.xml"
[tool.coverage.paths]
source = [".", "**/site-packages"]
[tool.coverage.report]
exclude_also = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
# https://github.com/numba/numba/issues/4268
"@numba.njit.*",
]
[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
"TID251", # Banned imports
"ICN", # Follow import conventions
"PTH", # Pathlib instead of os.path
"PLR0917", # Ban APIs with too many positional parameters
]
ignore = [
# line too long -> we accept long comment lines; black gets rid of long code lines
"E501",
# module level import not at top of file -> required to circumvent circular imports for Scanpys API
"E402",
# E266 too many leading '#' for block comment -> Scanpy allows them for comments into sections
"E262",
# 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]
# Do not assign a lambda expression, use a def
"src/scanpy/tools/_rank_genes_groups.py" = ["E731"]
[tool.ruff.lint.isort]
known-first-party = ["scanpy", "testing.scanpy"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pytest.importorskip".msg = "Use the “@needs” decorator/mark instead"
"pandas.api.types.is_categorical_dtype".msg = "Use isinstance(s.dtype, CategoricalDtype) instead"
"pandas.value_counts".msg = "Use pd.Series(a).value_counts() instead"
[tool.ruff.lint.flake8-type-checking]
exempt-modules = []
strict = true