-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
130 lines (120 loc) · 3.45 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
[project]
name = 'scanpydoc'
dynamic = ['version']
description = 'A series of Sphinx extensions to get maintainable numpydoc style documentation.'
authors = [
{ name = 'Philipp Angerer', email = '[email protected]' },
]
urls.Source = 'https://github.com/theislab/scanpydoc/'
urls.Documentation = 'https://icb-scanpydoc.readthedocs-hosted.com/'
readme = 'README.rst'
license = 'GPL-3.0-or-later'
classifiers = [
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Topic :: Documentation :: Sphinx',
'Topic :: Software Development :: Libraries :: Python Modules',
'Framework :: Sphinx :: Extension',
'Typing :: Typed',
]
requires-python = '>=3.10'
dependencies = [
'sphinx>=7.0',
]
[project.optional-dependencies]
dev = ['pre-commit']
test = [
'pytest',
'coverage',
'legacy-api-wrap',
'defusedxml', # sphinx[test] would also pull in cython
'sphinx>=8.1.0' # https://github.com/sphinx-doc/sphinx/pull/12743
]
doc = [
'scanpydoc[typehints,myst,theme]',
'sphinx',
'readthedocs-sphinx-search',
]
typehints = ['sphinx-autodoc-typehints>=1.15.2']
theme = ['sphinx-book-theme>=1.1.0']
myst = ['myst-parser']
[project.entry-points.'sphinx.html_themes']
scanpydoc = 'scanpydoc.theme'
[tool.ruff.lint]
select = ['ALL']
allowed-confusables = ['’', '×', 'l']
ignore = [
'ANN101', # No type annotating `self`
'E741', # Ambiguous variable name
'C408', # `dict` calls are useful
'D203', # No blank lines before class body
'D213', # Docstring summary on first line
'D407', # We’re not using Numpydoc style
'FIX002', # TODOs are OK
'PD', # False positives
'COM812', # Conflicts with formatting
'ISC001', # Conflicts with formatting
]
[tool.ruff.lint.per-file-ignores]
'example.py' = ['ALL']
'docs/conf.py' = [
'INP001', # `docs` is not a namespace package
]
'tests/**/*.py' = [
'INP001', # test directories are not namespace packages
'D103', # Test functions don’t need docstrings
'S101', # Pytest tests use `assert`
'RUF018', # Assignment expressions in assert are fine here
'PLR0913', # Tests should be able to use as many fixtures as they want
]
[tool.ruff.lint.flake8-type-checking]
strict = true
exempt-modules = []
[tool.ruff.lint.isort]
length-sort = true
lines-after-imports = 2
known-first-party = ['scanpydoc']
required-imports = ['from __future__ import annotations']
[tool.ruff.lint.pydocstyle]
convention = 'numpy'
[tool.mypy]
strict = true
explicit_package_bases = true
disallow_untyped_defs = false # handled by Ruff
mypy_path = ['$MYPY_CONFIG_FILE_DIR/src']
[tool.hatch.version]
source = 'vcs'
[tool.hatch.build.hooks.vcs]
version-file = 'src/scanpydoc/_version.py'
[tool.hatch.envs.default]
dependencies = ['types-docutils']
[tool.hatch.envs.docs]
python = '3.11'
features = ['doc']
[tool.hatch.envs.docs.scripts]
build = 'sphinx-build -M html docs docs/_build'
clean = 'git clean -fdX docs'
[tool.hatch.envs.hatch-test]
features = ['test', 'typehints', 'myst']
[tool.pytest.ini_options]
addopts = [
'--import-mode=importlib',
'-psphinx.testing.fixtures',
]
filterwarnings = [
'error',
'ignore:The frontend.Option:DeprecationWarning',
]
[tool.coverage.run]
source_pkgs = ['scanpydoc']
[tool.coverage.paths]
scanpydoc = ['src/scanpydoc']
[tool.coverage.report]
exclude_lines = [
'no cov',
'if __name__ == .__main__.:',
'if TYPE_CHECKING:',
]
[build-system]
requires = ['hatchling', 'hatch-vcs']
build-backend = 'hatchling.build'