-
Notifications
You must be signed in to change notification settings - Fork 22
/
pyproject.toml
161 lines (148 loc) · 5.27 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "cellxgene-census"
dynamic = ["version"]
description = "API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit https://github.com/chanzuckerberg/cellxgene-census/"
authors = [
{ name = "Chan Zuckerberg Initiative Foundation", email = "soma@chanzuckerberg.com" }
]
license = { text = "MIT" }
readme = "README.md"
requires-python = ">= 3.8, < 3.12"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies= [
# NOTE: the tiledbsoma version must be >= to the version used in the Census builder, to
# ensure that the assets are readable (tiledbsoma supports backward compatible reading).
# Make sure this version does not fall behind the builder's tiledbsoma version.
"tiledbsoma~=1.11.4",
"anndata",
"numpy>=1.21,<2.0",
"requests",
"typing_extensions",
"s3fs>=2021.06.1",
]
[project.optional-dependencies]
experimental = [
"torch",
"torchdata~=0.7",
"scikit-learn~=1.0",
"scikit-misc>=0.2,<0.4", # scikit-misc 0.3 dropped Python 3.8 support, and 0.4 doesn't have MacOS/ARM wheels
"psutil~=5.0",
"datasets~=2.0",
"tdigest~=0.5",
# Not expressible in pyproject.toml:
#"git+https://huggingface.co/ctheodoris/Geneformer",
# instead, experimental/ml/geneformer_tokenizer.py catches ImportError to ask user to install that.
]
doc = [
"nbsphinx",
"myst-parser",
"sphinx-rtd-theme",
"gitpython",
"sphinx<7.0.0",
]
[project.urls]
homepage = "https://github.com/chanzuckerberg/cellxgene-census"
repository = "https://github.com/chanzuckerberg/cellxgene-census"
[tool.setuptools.packages.find]
where = ["src"]
include = ["cellxgene_census*"] # package names should match these glob patterns (["*"] by default)
exclude = ["tests*"] # exclude packages matching these glob patterns (empty by default)
[tool.setuptools.package-data]
"cellxgene_census" = ["py.typed"]
[tool.setuptools_scm]
root = "../../.."
[tool.ruff]
line-length = 120
src = ["api/python/cellxgene_census/src"]
target-version = "py38"
[tool.ruff.lint]
select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
"W", # Warning detected by Pycodestyle
"I", # isort
"D", # pydocstyle
"B", # flake8-bugbear
"TID", # flake8-tidy-imports
"C4", # flake8-comprehensions
"BLE", # flake8-blind-except
"UP", # pyupgrade
"RUF100", # Report unused noqa directives
]
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 -> lambda expression assignments are convenient
"E731",
# allow I, O, l as variable names -> I is the identity matrix
"E741",
# Missing docstring in public package
"D104",
# Missing docstring in public module
"D100",
# Missing docstring in __init__
"D107",
# Errors from function calls in argument defaults. These are fine when the result is immutable.
"B008",
# __magic__ methods are are often self-explanatory, allow missing docstrings
"D105",
# first line should end with a period [Bug: doesn't work with single-line docstrings]
"D400",
# First line should be in imperative mood; try rephrasing
"D401",
## Disable one in each pair of mutually incompatible rules
# We don’t want a blank line before a class docstring
"D203",
# We want docstrings to start immediately after the opening triple quote
"D213",
# Missing argument description in the docstring TODO: enable
"D417",
# Blank line required between summary line and description TODO: enable
"D205",
# Prefer absolute imports over relative imports from parent modules TODO: enable
"TID252",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"*/tests/*" = ["D"]
"*/__init__.py" = ["F401"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.mypy]
show_error_codes = true
ignore_missing_imports = true
warn_unreachable = true
strict = true
plugins = "numpy.typing.mypy_plugin"
[tool.pytest.ini_options]
markers = [
"live_corpus: runs on the live CELLxGENE Census data corpus and small enough to run in CI",
"expensive: too expensive to run regularly or in CI",
"experimental: tests for the `experimental` package",
"lts_compat_check: check for compatibility with an LTS build",
]