/
pyproject.toml
101 lines (93 loc) · 2.81 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
[project]
name = 'anndata2ri'
authors = [
{ name = 'Philipp A.', email = 'flying-sheep@web.de' },
]
readme = 'README.rst'
classifiers = [
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3',
'Programming Language :: R',
'Topic :: Scientific/Engineering :: Bio-Informatics',
]
urls.'Documentation' = 'https://icb-anndata2ri.readthedocs-hosted.com/'
urls.'Source Code' = 'https://github.com/theislab/anndata2ri'
urls.'Issue Tracker' = 'https://github.com/theislab/anndata2ri/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc'
dynamic = ['version']
requires-python = '>= 3.9'
dependencies = [
'rpy2 >= 3.5.2', # first with get_conversion
'tzlocal', # for pandas2ri
'anndata',
]
[project.optional-dependencies]
dev = ['pre-commit', 'setuptools-scm']
test = [
'pytest',
'pytest-faulthandler',
'pygments',
'scanpy',
]
doc = [
'sphinx>=3.0',
'scanpydoc[theme,typehints]',
'lxml', # For scraping the R link info
]
[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.docs]
features = ['doc']
[tool.hatch.envs.docs.scripts]
build = 'sphinx-build -M html docs docs/_build'
[[tool.hatch.envs.test.matrix]]
python = ['3.9', '3.10', '3.11', '3.12']
[tool.hatch.envs.test]
features = ['test']
[tool.hatch.envs.test.scripts]
run = 'pytest -vv {args}'
[tool.pytest.ini_options]
addopts = [
'--import-mode=importlib',
'-panndata2ri.test_utils',
'-Werror',
]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ['ALL']
ignore = [
'Q', # handled by formatter
'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
'S101', # asserts are fine
]
allowed-confusables = ['’', '×']
[tool.ruff.lint.per-file-ignores]
'src/**/*.py' = ['PT'] # No Pytest checks
'docs/**/*.py' = ['INP001'] # No __init__.py in docs
'tests/**/*.py' = [
'INP001', # No __init__.py in tests
'D100', # test modules don’t need docstrings
'D103', # tests don’t need docstrings
'PD901', # “df” is a fine var name in tests
'PLR2004', # magic numbers are fine in tests
]
[tool.ruff.lint.isort]
known-first-party = ['anndata2ri']
lines-after-imports = 2
[tool.ruff.format]
quote-style = 'single'
[build-system]
requires = ['hatchling', 'hatch-vcs']
build-backend = 'hatchling.build'