-
Notifications
You must be signed in to change notification settings - Fork 16
/
pyproject.toml
107 lines (97 loc) · 3.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
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]
[project]
name = "anndata2ri"
readme = "README.rst"
authors = [
{ name = "Philipp A.", email = "flying-sheep@web.de" },
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: R",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dynamic = [ "version" ]
dependencies = [
"anndata",
"rpy2>=3.5.2", # first with get_conversion
"tzlocal", # for pandas2ri
]
optional-dependencies.dev = [ "pre-commit", "setuptools-scm" ]
optional-dependencies.doc = [
"lxml", # For scraping the R link info
"scanpydoc[theme,typehints]",
"sphinx>=3",
]
optional-dependencies.test = [
"pygments",
"pytest",
"pytest-faulthandler",
"scanpy",
]
urls.'Documentation' = "https://icb-anndata2ri.readthedocs-hosted.com/"
urls.'Issue Tracker' = "https://github.com/theislab/anndata2ri/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
urls.'Source Code' = "https://github.com/theislab/anndata2ri"
[tool.hatch.version]
source = "vcs"
raw-options = { local_scheme = "no-local-version" } # be able to publish dev version
[tool.hatch.build.hooks.vcs]
version-file = "src/anndata2ri/_version.py"
[tool.hatch.envs.default]
installer = "uv"
[tool.hatch.envs.docs]
features = [ "doc" ]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build -M html docs docs/_build"
[tool.hatch.envs.hatch-test]
features = [ "test" ]
[tool.ruff]
line-length = 120
format.quote-style = "single"
lint.select = [ "ALL" ]
lint.ignore = [
"ANN101", # self type doesn’t need to be annotated
"C408", # dict() calls are nice
"COM812", # trailing commas handled by black
"D203", # prefer 0 to 1 blank line before class members
"D213", # prefer docstring summary on first line
"FIX002", # “TODO” comments
"PLR0913", # having many (kw)args is fine
"Q", # handled by formatter
"S101", # asserts are fine
]
lint.per-file-ignores.'**/*.ipynb' = [
"F821", # `%%R -o` means that ruff doesn’t understand which variables exist
"T201", # Allow print in notebooks
]
lint.per-file-ignores.'docs/**/*.py' = [ "INP001" ] # No __init__.py in docs
lint.per-file-ignores.'src/**/*.py' = [ "PT" ] # No Pytest checks
lint.per-file-ignores.'tests/**/*.py' = [
"D100", # test modules don’t need docstrings
"D103", # tests don’t need docstrings
"INP001", # No __init__.py in tests
"PD901", # “df” is a fine var name in tests
"PLR2004", # magic numbers are fine in tests
]
lint.allowed-confusables = [ "×", "’" ]
lint.isort.known-first-party = [ "anndata2ri" ]
lint.isort.lines-after-imports = 2
[tool.pyproject-fmt]
indent = 4
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"-panndata2ri.test_utils",
"-Werror",
]