-
Notifications
You must be signed in to change notification settings - Fork 47
/
pyproject.toml
323 lines (299 loc) · 7.88 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
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
[build-system]
requires = ["setuptools>=61", "setuptools-scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "cellrank"
dynamic = ["version"]
description = "CellRank: dynamics from multi-view single-cell data"
readme = "README.rst"
requires-python = ">=3.9"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Typing :: Typed",
"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 :: Mathematics",
"Topic :: Scientific/Engineering :: Visualization",
]
keywords = [
"single-cell",
"bio-informatics",
"RNA velocity",
"Markov chain",
"GPCCA",
]
authors = [
{name = "Marius Lange"},
{name = "Michal Klein"},
{name = "Philipp Weiler"},
]
maintainers = [
{name = "Michal Klein", email = "[email protected]"}
]
dependencies = [
"anndata>=0.9",
"docrep>=0.3.0",
"joblib>=0.13.1",
"matplotlib>=3.5.0",
"networkx>=2.2",
"numba>=0.51.0,!=0.57.0",
"numpy>=1.22.0",
"pandas>=1.5.0",
"pygam>=0.8.0",
"pygpcca>=1.0.4",
"scanpy>=1.7.2",
"scikit-learn>=0.24.0",
"scipy>=1.12.0",
"scvelo>=0.2.5",
"seaborn>=0.10.0",
"wrapt>=1.12.1",
]
[project.optional-dependencies]
dev = [
"pre-commit>=3.0.0",
"tox>=4",
]
test = [
"pytest>=8",
"pytest-mock>=3.5.0",
"pytest-cov>=4",
"pytest-xdist",
"coverage[toml]>=7",
"zarr",
"igraph",
"leidenalg",
"Pillow",
"jax",
]
docs = [
"sphinx>=5.1.1",
"furo>=2022.09.29",
"myst-nb>=0.17.1",
"sphinx-tippy>=0.4.1",
"sphinx-autodoc-typehints>=1.10.3",
"sphinx_copybutton>=0.5.0",
"sphinx_design>=0.3.0",
"sphinxcontrib-bibtex>=2.3.0",
"sphinxcontrib-spelling>=7.6.2",
]
[project.urls]
Homepage = "https://github.com/theislab/cellrank"
Download = "https://cellrank.readthedocs.io/en/latest/installation.html"
"Bug Tracker" = "https://github.com/theislab/cellrank/issues"
Documentation = "https://cellrank.readthedocs.io"
"Source Code" = "https://github.com/theislab/cellrank"
[tool.setuptools]
package-dir = {"" = "src"}
include-package-data = true
[tool.setuptools_scm]
[tool.ruff]
target-version = "py39"
line-length = 120
[tool.ruff.lint]
exclude = [
".eggs",
".git",
".ruff_cache",
".tox",
"__pypackages__",
"_build",
"build",
"dist",
]
ignore = [
"PT011", # TODO/
# Do not implicitly `return None` in function able to return non-`None` value
"RET502",
# Missing explicit `return` at the end of function able to return non-`None` value
"RET503",
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
"E731",
# allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation
"E741",
# Missing docstring in public package
"D104",
# Missing docstring in public module
"D100",
# Missing docstring in __init__
"D107",
# Missing docstring in magic method
"D105",
]
select = [
"D", # flake8-docstrings
"E", # pycodestyle
"F", # pyflakes
"W", # pycodestyle
"Q", # flake8-quotes
"SIM", # flake8-simplify
"NPY", # NumPy-specific rules
"PT", # flake8-pytest-style
"TID", # flake8-tidy-imports
"B", # flake8-bugbear
"UP", # pyupgrade
"C4", # flake8-comprehensions
"BLE", # flake8-blind-except
"T20", # flake8-print
"RET", # flake8-raise
]
unfixable = ["B", "C4", "BLE", "T20", "RET"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]
"*/__init__.py" = ["F401"]
"docs/*" = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
[tool.black]
line-length = 120
target-version = ['py39']
include = '\.pyi?$'
[tool.isort]
profile = "black"
include_trailing_comma = true
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "GENERIC", "NUMERIC", "PLOTTING", "BIO", "FIRSTPARTY", "LOCALFOLDER"]
# also contains what we import in notebooks
known_generic = ["wrapt", "joblib"]
known_numeric = ["numpy", "numba", "scipy", "jax", "pandas", "sklearn", "networkx", "statsmodels"]
known_bio = ["anndata", "scanpy"]
known_plotting = ["IPython", "matplotlib", "mpl_toolkits", "seaborn"]
[tool.pytest.ini_options]
testpaths = "tests"
xfail_strict = true
[tool.coverage.run]
branch = true
parallel = true
source = ["src/"]
omit = [
"*/__init__.py",
]
[tool.coverage.report]
exclude_lines = [
'\#.*pragma:\s*no.?cover',
"^if __name__ == .__main__.:$",
'^\s*raise AssertionError\b',
'^\s*raise NotImplementedError\b',
'^\s*return NotImplemented\b',
]
precision = 2
show_missing = true
skip_empty = true
sort = "Miss"
[tool.rstcheck]
ignore_directives = [
"toctree",
"currentmodule",
"autosummary",
"module",
"automodule",
"autoclass",
"bibliography",
"grid",
]
ignore_roles = [
"mod",
"class",
"attr",
"func",
"meth",
"doc",
"cite",
]
[tool.doc8]
max_line_length = 120
ignore-path = "docs/release/**.rst"
[tool.tox]
legacy_tox_ini = """
[tox]
# TODO(michalk8): upgrade to `tox>=4.0` once `tox-conda` supports it
requires = tox-conda
isolated_build = true
envlist = lint-code,py{3.9,3.10,3.11,3.12,3.13}-{slepc,noslepc}
skip_missing_interpreters = true
[testenv]
conda_deps =
py: r-mgcv
py: rpy2
slepc: mpi4py
slepc: petsc4py
slepc: slepc4py
conda_channels=
conda-forge
extras = test
passenv = PYTEST_* CI
commands =
python -m pytest {tty:--color=yes} {posargs: \
--cov={envsitepackagesdir}{/}cellrank --cov-config={toxinidir}{/}pyproject.toml \
--no-cov-on-fail --cov-report=xml --cov-report=term-missing:skip-covered}
[testenv:lint-code]
description = Lint the code.
deps = pre-commit>=3.0.0
skip_install = true
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:lint-docs]
description = Lint the documentation.
deps =
extras = docs
ignore_errors = true
allowlist_externals = make
passenv = PYENCHANT_LIBRARY_PATH
setenv = SPHINXOPTS = -W -q --keep-going
changedir = {toxinidir}{/}docs
commands =
# make linkcheck {posargs}
# make spelling {posargs}
[testenv:clean-docs]
description = Remove the documentation.
deps =
skip_install = true
changedir = {toxinidir}{/}docs
allowlist_externals = make
commands =
make clean
[testenv:build-docs]
description = Build the documentation.
deps =
extras = docs
allowlist_externals = make
changedir = {toxinidir}{/}docs
commands =
make html {posargs}
commands_post =
python -c 'import pathlib; print("Documentation is under:", pathlib.Path("{toxinidir}") / "docs" / "_build" / "html" / "index.html")'
[testenv:build-package]
description = Build the package.
deps =
build
twine
allowlist_externals = rm
commands =
rm -rf {toxinidir}{/}dist
python -m build --sdist --wheel --outdir {toxinidir}{/}dist{/} {posargs:}
python -m twine check {toxinidir}{/}dist{/}*
commands_post =
python -c 'import pathlib; print(f"Package is under:", pathlib.Path("{toxinidir}") / "dist")'
[testenv:format-references]
description = Format references.bib.
deps =
skip_install = true
allowlist_externals = biber
commands = biber --tool --output_file={toxinidir}{/}docs{/}references.bib --nolog \
--output_align --output_indent=2 --output_fieldcase=lower \
--output_legacy_dates --output-field-replace=journaltitle:journal,thesis:phdthesis,institution:school \
{toxinidir}{/}docs{/}references.bib
"""