-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
339 lines (293 loc) · 9.73 KB
/
Copy pathpyproject.toml
File metadata and controls
339 lines (293 loc) · 9.73 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
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
[build-system]
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "chatspatial"
version = "1.5.3"
description = "ChatSpatial: Natural language-driven spatial transcriptomics analysis via Model Context Protocol (MCP) integration"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{name = "Chen Yang", email = "cafferychen777@tamu.edu"}
]
keywords = ["spatial-transcriptomics", "single-cell", "mcp", "llm", "bioinformatics", "scanpy", "squidpy"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
requires-python = ">=3.11,<3.15"
dependencies = [
# ========== Core Foundation (Essential) ==========
# MCP 2026-07-28 protocol and data processing
"mcp>=2.0.0,<3.0",
"anyio>=4.9.0,<5.0",
"numpy>=1.21.0",
"pandas>=1.3.0",
"scipy>=1.7.0",
"scikit-learn>=1.0.0",
"statsmodels>=0.13.0,<1.0",
"certifi>=2024.2.2",
"cloudpickle>=2.2.0",
"typing-extensions>=4.12.0",
"zarr>=2.18.0,<4.0",
# Visualization
"matplotlib>=3.5.0",
"seaborn>=0.11.0",
"Pillow>=8.0.0",
# Single-cell analysis core
# Modern releases are required for the declared Python 3.11-3.14 range.
# Older releases can resolve to numba/llvmlite builds that do not support it.
"scanpy>=1.11.0,<2.0",
"anndata>=0.11.0", # Updated for scvi-tools 1.3.x compatibility
"squidpy>=1.6.0,<2.0",
# Default Python-native spatial variable gene backend
"flashs>=0.2.1,<0.3",
# Clustering and dimensionality reduction
"umap-learn>=0.5.0",
"igraph>=0.9.0",
"leidenalg>=0.8.0", # Leiden is preferred over Louvain (better algorithm, fewer compilation issues on macOS)
# MCP server framework
"pydantic>=2.12.0,<3.0",
"click>=8.0.0",
# Heavy method-specific packages live in optional extras below. The default
# install includes every default backend; optional methods report clear
# installation guidance only when their extra has not been installed.
]
[project.optional-dependencies]
# Deep learning methods (scVI, scANVI, VeloVI, DestVI, Cell2location backend)
deep-learning = [
"torch>=2.0.0,<3.0",
"scvi-tools>=1.0.0,<2.0",
]
# RNA velocity methods
velocity = [
"scvelo-modern>=0.3.4.post2,<0.4",
]
# Trajectory methods. CellRank is available on Python 3.12 and newer.
trajectory = [
"cellrank>=2.3.2,<3.0; python_version >= '3.12'",
"palantir>=1.0.0",
]
# Cell-cell communication methods
cell-communication = [
"liana>=1.4.0,<2.0; python_version < '3.14'",
"cellphonedb>=5.0.0,<6.0",
]
# Focused FastCCC statistical runtime. The maintained distribution omits the
# unused HTML report layer, so it has no Jinja2 conflict with CellRank/pyGPCCA.
fastccc = [
"fastccc-modern>=1.0.1.post1,<1.1",
]
# Batch integration methods that do not require the deep-learning stack
integration = [
"harmonypy>=0.0.9",
"bbknn>=1.5.0",
"scanorama>=1.7.0",
]
# Spatial statistics extensions
spatial-stats = [
"esda>=2.4.0",
"libpysal>=4.6.0",
"networkx>=2.6.0",
]
# Spatial deconvolution methods
deconvolution = [
"flashdeconv>=0.1.0",
"cell2location>=0.1.4",
]
# Cell type annotation and spatial mapping methods.
annotation = [
"tangram-sc>=1.0.0",
"singler>=0.4.0; sys_platform != 'win32'",
"singlecellexperiment>=0.4.0; sys_platform != 'win32'",
"celldex>=0.3.0; sys_platform != 'win32'",
"mllmcelltype>=0.1.0",
]
# Gene-set enrichment and enrichment-map visualization.
enrichment = [
"gseapy>=1.0.0",
"enrichmap>=0.1.0",
"requests>=2.31.0,<3.0",
]
# Copy-number inference.
cnv = [
"infercnvpy>=0.4.0",
]
# Pseudobulk differential expression.
differential = [
"pydeseq2>=0.4.0",
]
# Pairwise and multi-slice spatial registration.
registration = [
"torch>=2.0.0,<3.0",
"POT>=0.9.0",
"paste-modern>=1.4.0.post1,<1.5",
"stalign-modern>=1.0.post1,<1.1",
]
# Optional statistically rigorous spatial-variable-gene backend.
spatial-genes = [
"spatialde-modern>=1.1.3.post2,<1.2",
]
# PyTorch port of RCTD. Kept separate because it downloads a large likelihood
# table on first use and has a faster release cadence than the core package.
rctd-python = [
"rctd-py>=0.3.7,<0.4",
]
# Bridges for methods implemented in R. Kept out of [full] because rpy2 must
# inspect and link against a system R installation while it is being installed;
# the required R packages are managed separately from Python package metadata.
r-backends = [
"rpy2>=3.6.7,<3.7",
"anndata2ri>=1.3.0",
]
# Broadest mutually compatible Python installation. R bridges, AESTETIK, and
# RCTD remain isolated because they impose platform, system, or dependency
# constraints that cannot be expressed as one portable environment.
full = [
# Deep learning and dynamics
"torch>=2.0.0,<3.0",
"scvi-tools>=1.0.0,<2.0",
"scvelo-modern>=0.3.4.post2,<0.4",
"cellrank>=2.3.2,<3.0; python_version >= '3.12'",
"palantir>=1.0.0",
# Cell communication
"liana>=1.4.0,<2.0; python_version < '3.14'",
"cellphonedb>=5.0.0,<6.0",
"fastccc-modern>=1.0.1.post1,<1.1",
# Integration and spatial statistics
"harmonypy>=0.0.9",
"bbknn>=1.5.0",
"scanorama>=1.7.0",
"esda>=2.4.0",
"libpysal>=4.6.0",
"networkx>=2.6.0",
# Deconvolution and annotation
"flashdeconv>=0.1.0",
"cell2location>=0.1.4",
"tangram-sc>=1.0.0",
"singler>=0.4.0; sys_platform != 'win32'",
"singlecellexperiment>=0.4.0; sys_platform != 'win32'",
"celldex>=0.3.0; sys_platform != 'win32'",
"mllmcelltype>=0.1.0",
# Enrichment, CNV, and differential expression
"gseapy>=1.0.0",
"enrichmap>=0.1.0",
"requests>=2.31.0,<3.0",
"infercnvpy>=0.4.0",
"pydeseq2>=0.4.0",
# Spatial domains and variable genes
"graphst-modern>=1.1.1.post3,<1.2",
"stagate-modern>=1.0.0.post1,<1.1",
"spagcn-modern>=1.3.0,<1.4",
"pybanksy>=1.3.5,<2.0; python_version < '3.14'",
"spatialde-modern>=1.1.3.post2,<1.2",
# Spatial registration
"POT>=0.9.0",
"paste-modern>=1.4.0.post1,<1.5",
"stalign-modern>=1.0.post1,<1.1",
]
# SCTransform normalization (variance-stabilizing transformation)
# Note: SCTransform now uses R's sctransform package via rpy2 (more stable than pySCTransform)
# Requirements: R with sctransform package installed
# Install R package: R -e 'install.packages("sctransform")'
# Install the [r-backends] extra after installing R.
# Spatial domain methods. The maintained SpaGCN distribution uses igraph's
# built-in Leiden implementation and does not require the obsolete louvain
# extension. BANKSY does not yet publish Python 3.14-compatible metadata.
spatial-domains = [
"torch>=2.0.0,<3.0",
"graphst-modern>=1.1.1.post3,<1.2",
"stagate-modern>=1.0.0.post1,<1.1",
"spagcn-modern>=1.3.0,<1.4",
"pybanksy>=1.3.5,<2.0; python_version < '3.14'",
]
# AESTETIK multi-modal spatial domain identification. Kept in its own family
# because it does not yet support Python 3.14 and because it pulls a
# torchvision/lightning stack that the other spatial-domain backends do not
# need. The environment marker keeps the 3.14 CI leg resolvable.
aestetik = [
"aestetik>=0.3.1,<0.4; python_version < '3.14'",
]
# Dependencies used by the manuscript reproducibility scripts. Core scientific
# packages such as NumPy, pandas, Scanpy, and scikit-learn are already required
# by ChatSpatial itself, so this extra only declares the additional packages.
reproducibility = [
"requests>=2.31.0,<3.0",
"statsmodels>=0.13.0,<1.0",
]
# Development dependencies
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0,<2.0",
"black==25.12.0",
"mypy>=1.0.0,<2.0",
"types-requests>=2.31.0",
"ruff==0.14.11",
"isort==7.0.0",
"pre-commit>=3.0.0,<5.0",
]
# Deliberately pinned: these tools create the immutable public artifacts.
release = [
"build==1.5.0",
"twine==7.0.0",
]
[project.urls]
Homepage = "https://github.com/cafferychen777/ChatSpatial"
Documentation = "https://docs.cafferyang.com/"
Repository = "https://github.com/cafferychen777/ChatSpatial"
Issues = "https://github.com/cafferychen777/ChatSpatial/issues"
[project.scripts]
chatspatial = "chatspatial.__main__:main"
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v -m 'not slow' --strict-markers"
# Fix pytest-asyncio warning
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"unit: Unit tests for pure functions",
"integration: Multi-component integration tests",
"e2e: End-to-end workflow tests through public tool interfaces",
"slow: Heavy dependency or long-running tests (excluded by default)",
]
[tool.black]
line-length = 88
target-version = ["py311"]
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint.mccabe]
max-complexity = 40
[tool.isort]
profile = "black"
line_length = 88
skip_gitignore = true
[tool.mypy]
python_version = "3.11"
warn_return_any = false
warn_unused_ignores = true
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.setuptools.packages.find]
where = ["."]
include = ["chatspatial", "chatspatial.*"]
exclude = ["tests", "tests.*", "chatspatial.tests", "chatspatial.tests.*"]
[tool.setuptools.package-data]
chatspatial = ["py.typed"]