|
a |
|
b/pyproject.toml |
|
|
1 |
[build-system] |
|
|
2 |
build-backend = "hatchling.build" |
|
|
3 |
requires = ["hatchling"] |
|
|
4 |
|
|
|
5 |
[project] |
|
|
6 |
name = "ehrapy" |
|
|
7 |
version = "0.12.0" |
|
|
8 |
description = "Electronic Health Record Analysis with Python." |
|
|
9 |
readme = "README.md" |
|
|
10 |
requires-python = ">=3.10,<3.14" |
|
|
11 |
license = {file = "LICENSE"} |
|
|
12 |
authors = [ |
|
|
13 |
{name = "Lukas Heumos"}, |
|
|
14 |
{name = "Philipp Ehmele"}, |
|
|
15 |
{name = "Eljas Roellin"}, |
|
|
16 |
{name = "Lilly May"}, |
|
|
17 |
{name = "Tim Treis"}, |
|
|
18 |
{name = "Altana Namsaraeva"}, |
|
|
19 |
{name = "Vladimir Shitov"}, |
|
|
20 |
{name = "Luke Zappia"}, |
|
|
21 |
{name = "Xinyue Zhang"}, |
|
|
22 |
] |
|
|
23 |
maintainers = [ |
|
|
24 |
{name = "Lukas Heumos", email = "lukas.heumos@posteo.net"}, |
|
|
25 |
] |
|
|
26 |
urls.Documentation = "https://ehrapy.readthedocs.io" |
|
|
27 |
urls.Source = "https://github.com/theislab/ehrapy" |
|
|
28 |
urls.Home-page = "https://github.com/theislab/ehrapy" |
|
|
29 |
|
|
|
30 |
classifiers = [ |
|
|
31 |
"License :: OSI Approved :: Apache Software License", |
|
|
32 |
"Development Status :: 4 - Beta", |
|
|
33 |
"Environment :: Console", |
|
|
34 |
"Framework :: Jupyter", |
|
|
35 |
"Intended Audience :: Developers", |
|
|
36 |
"Intended Audience :: Science/Research", |
|
|
37 |
"Natural Language :: English", |
|
|
38 |
"Operating System :: MacOS :: MacOS X", |
|
|
39 |
"Operating System :: POSIX :: Linux", |
|
|
40 |
"Programming Language :: Python :: 3", |
|
|
41 |
"Programming Language :: Python :: 3.10", |
|
|
42 |
"Programming Language :: Python :: 3.11", |
|
|
43 |
"Programming Language :: Python :: 3.12", |
|
|
44 |
"Programming Language :: Python :: 3.13", |
|
|
45 |
"Topic :: Scientific/Engineering :: Bio-Informatics", |
|
|
46 |
"Topic :: Scientific/Engineering :: Visualization", |
|
|
47 |
] |
|
|
48 |
|
|
|
49 |
dependencies = [ |
|
|
50 |
"session-info2", |
|
|
51 |
"lamin_utils", |
|
|
52 |
"rich", |
|
|
53 |
"scanpy", |
|
|
54 |
"requests", |
|
|
55 |
"miceforest", |
|
|
56 |
"scikit-misc", # required for seuratv3 highly variable features |
|
|
57 |
"lifelines>=0.30.0", |
|
|
58 |
"missingno", |
|
|
59 |
"thefuzz[speedup]", |
|
|
60 |
"dowhy", |
|
|
61 |
"fhiry", |
|
|
62 |
"pyampute", |
|
|
63 |
"tableone", |
|
|
64 |
"imbalanced-learn", |
|
|
65 |
"fknni>=1.2.0", |
|
|
66 |
"python-dateutil", |
|
|
67 |
"filelock", |
|
|
68 |
"numpy>=2.0.0", |
|
|
69 |
"numba>=0.60.0", |
|
|
70 |
"igraph" |
|
|
71 |
] |
|
|
72 |
|
|
|
73 |
[project.optional-dependencies] |
|
|
74 |
medcat = [ |
|
|
75 |
"medcat", |
|
|
76 |
] |
|
|
77 |
dask = [ |
|
|
78 |
"anndata[dask]", |
|
|
79 |
"dask-ml>=2025.1.0", |
|
|
80 |
] |
|
|
81 |
dev = [ |
|
|
82 |
"pre-commit", |
|
|
83 |
] |
|
|
84 |
docs = [ |
|
|
85 |
"docutils", |
|
|
86 |
"sphinx", |
|
|
87 |
"furo", |
|
|
88 |
"myst-nb", |
|
|
89 |
"myst-parser", |
|
|
90 |
"sphinxcontrib-bibtex", |
|
|
91 |
"sphinx-gallery", |
|
|
92 |
"sphinx-autodoc-typehints", |
|
|
93 |
"sphinx-copybutton", |
|
|
94 |
"sphinx-remove-toctrees", |
|
|
95 |
"sphinx-design", |
|
|
96 |
"sphinx-last-updated-by-git", |
|
|
97 |
"sphinx-automodapi", |
|
|
98 |
"sphinxext-opengraph", |
|
|
99 |
"pygments", |
|
|
100 |
"nbsphinx", |
|
|
101 |
"nbsphinx-link", |
|
|
102 |
"ipykernel", |
|
|
103 |
"ipython", |
|
|
104 |
"ehrapy[dask]", |
|
|
105 |
] |
|
|
106 |
test = [ |
|
|
107 |
"ehrapy[dask]", |
|
|
108 |
"pytest", |
|
|
109 |
"pytest-cov", |
|
|
110 |
"pytest-mock" |
|
|
111 |
] |
|
|
112 |
|
|
|
113 |
|
|
|
114 |
[tool.hatch.version] |
|
|
115 |
source = "vcs" |
|
|
116 |
|
|
|
117 |
[tool.coverage.run] |
|
|
118 |
source_pkgs = ["ehrapy"] |
|
|
119 |
omit = [ |
|
|
120 |
"**/test_*.py", |
|
|
121 |
"ehrapy/data/_datasets.py", # Difficult to test |
|
|
122 |
] |
|
|
123 |
|
|
|
124 |
[tool.pytest.ini_options] |
|
|
125 |
testpaths = "tests" |
|
|
126 |
xfail_strict = true |
|
|
127 |
addopts = [ |
|
|
128 |
"--import-mode=importlib", # allow using test files with same name |
|
|
129 |
] |
|
|
130 |
markers = [ |
|
|
131 |
"conda: marks a subset of tests to be ran on the Bioconda CI.", |
|
|
132 |
"extra: marks tests that require extra dependencies." |
|
|
133 |
] |
|
|
134 |
filterwarnings = [ |
|
|
135 |
"ignore::DeprecationWarning", |
|
|
136 |
"ignore::anndata.OldFormatWarning:", |
|
|
137 |
"ignore:X converted to numpy array with dtype object:UserWarning", |
|
|
138 |
"ignore:`flavor='seurat_v3'` expects raw count data, but non-integers were found:UserWarning", |
|
|
139 |
"ignore:All-NaN slice encountered:RuntimeWarning", |
|
|
140 |
"ignore:Observation names are not unique. To make them unique, call `.obs_names_make_unique`.:UserWarning", |
|
|
141 |
"ignore:Trying to modify attribute `.var` of view, initializing view as actual.:anndata.ImplicitModificationWarning", |
|
|
142 |
"ignore:Transforming to str index.:anndata.ImplicitModificationWarning:" |
|
|
143 |
] |
|
|
144 |
minversion = 6.0 |
|
|
145 |
norecursedirs = [ '.*', 'build', 'dist', '*.egg', 'data', '__pycache__'] |
|
|
146 |
|
|
|
147 |
[tool.ruff] |
|
|
148 |
line-length = 120 |
|
|
149 |
|
|
|
150 |
[tool.ruff.format] |
|
|
151 |
docstring-code-format = true |
|
|
152 |
|
|
|
153 |
[tool.ruff.lint] |
|
|
154 |
select = [ |
|
|
155 |
"F", # Errors detected by Pyflakes |
|
|
156 |
"E", # Error detected by Pycodestyle |
|
|
157 |
"W", # Warning detected by Pycodestyle |
|
|
158 |
"I", # isort |
|
|
159 |
"D", # pydocstyle |
|
|
160 |
"B", # flake8-bugbear |
|
|
161 |
"TID", # flake8-tidy-imports |
|
|
162 |
"C4", # flake8-comprehensions |
|
|
163 |
"BLE", # flake8-blind-except |
|
|
164 |
"UP", # pyupgrade |
|
|
165 |
"RUF100", # Report unused noqa directives |
|
|
166 |
"TCH", # Typing imports |
|
|
167 |
"NPY", # Numpy specific rules |
|
|
168 |
"PTH" # Use pathlib |
|
|
169 |
] |
|
|
170 |
ignore = [ |
|
|
171 |
# line too long -> we accept long comment lines; black gets rid of long code lines |
|
|
172 |
"E501", |
|
|
173 |
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient |
|
|
174 |
"E731", |
|
|
175 |
# allow I, O, l as variable names -> I is the identity matrix |
|
|
176 |
"E741", |
|
|
177 |
# Missing docstring in public package |
|
|
178 |
"D104", |
|
|
179 |
# Missing docstring in public module |
|
|
180 |
"D100", |
|
|
181 |
# Missing docstring in __init__ |
|
|
182 |
"D107", |
|
|
183 |
# Errors from function calls in argument defaults. These are fine when the result is immutable. |
|
|
184 |
"B008", |
|
|
185 |
# __magic__ methods are are often self-explanatory, allow missing docstrings |
|
|
186 |
"D105", |
|
|
187 |
# first line should end with a period [Bug: doesn't work with single-line docstrings] |
|
|
188 |
"D400", |
|
|
189 |
# First line should be in imperative mood; try rephrasing |
|
|
190 |
"D401", |
|
|
191 |
## Disable one in each pair of mutually incompatible rules |
|
|
192 |
# We don’t want a blank line before a class docstring |
|
|
193 |
"D203", |
|
|
194 |
# We want docstrings to start immediately after the opening triple quote |
|
|
195 |
"D213", |
|
|
196 |
# Imports unused |
|
|
197 |
"F401", |
|
|
198 |
# camcelcase imported as lowercase |
|
|
199 |
"N813", |
|
|
200 |
# module import not at top level of file |
|
|
201 |
"E402", |
|
|
202 |
] |
|
|
203 |
|
|
|
204 |
[tool.ruff.lint.pydocstyle] |
|
|
205 |
convention = "google" |
|
|
206 |
|
|
|
207 |
[tool.ruff.lint.per-file-ignores] |
|
|
208 |
"docs/*" = ["I"] |
|
|
209 |
"tests/*" = ["D"] |
|
|
210 |
"*/__init__.py" = ["F401"] |
|
|
211 |
|
|
|
212 |
[tool.mypy] |
|
|
213 |
strict = false |
|
|
214 |
pretty = true |
|
|
215 |
show_column_numbers = true |
|
|
216 |
show_error_codes = true |
|
|
217 |
show_error_context = true |
|
|
218 |
ignore_missing_imports = true |
|
|
219 |
no_strict_optional = true |
|
|
220 |
|
|
|
221 |
[tool.cruft] |
|
|
222 |
skip = [ |
|
|
223 |
"tests", |
|
|
224 |
"src/**/__init__.py", |
|
|
225 |
"src/**/basic.py", |
|
|
226 |
"docs/api.md", |
|
|
227 |
"docs/changelog.md", |
|
|
228 |
"docs/references.bib", |
|
|
229 |
"docs/references.md", |
|
|
230 |
"docs/notebooks/example.ipynb" |
|
|
231 |
] |