-
Notifications
You must be signed in to change notification settings - Fork 17
/
pyproject.toml
124 lines (108 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "autodoc2"
[project]
name = "sphinx-autodoc2"
dynamic = ["version", "description"]
authors = [{name = "Chris Sewell", email = "[email protected]"}]
license = {file = "LICENSE"}
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Framework :: Sphinx :: Extension",
]
readme = "README.md"
keywords = ["sphinx", "autodoc", "extension", "documentation"]
urls = {Home = "https://github.com/chrisjsewell/sphinx-autodoc2"}
requires-python = ">=3.8"
dependencies = [
"astroid>=2.7,<4",
"tomli; python_version<'3.11'",
"typing-extensions"
]
[project.optional-dependencies]
cli = ["typer[all]"]
# we don't put a hard dependency on sphinx,
# because anyway the core can be run without it
sphinx = ["sphinx>=4.0.0"]
testing = [
"pytest",
"pytest-regressions",
"pytest-cov",
"sphinx>=4.0.0,<7",
]
docs = [
"sphinx>=4.0.0",
"furo",
"myst-parser"
]
[project.scripts]
autodoc2 = "autodoc2.cli:app_main"
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PERF", # perflint (performance anti-patterns)
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PTH", # flake8-use-pathlib
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
"T20", # flake8-print
]
extend-ignore = ["ISC001", "PERF203", "PGH003"]
[tool.ruff.lint.per-file-ignores]
# ignore: Do not perform function call `typer.Option` in argument defaults
"src/autodoc2/cli.py" = ["B008"]
"tests/test_analyse_module.py" = ["E501"]
[tool.ruff.lint.isort]
force-sort-within-sections = true
[tool.mypy]
show_error_codes = true
strict = true
exclude = ['^tests/.*']
[[tool.mypy.overrides]]
module = [
"astroid.*", # https://github.com/PyCQA/astroid/issues/1287
"docutils.*",
"tomllib.*",
"tomli.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["autodoc2.sphinx.autodoc"]
# the try/except for tomllib/tomli causes different behaviour
# on different python versions
warn_unused_ignores = false
[tool.pytest.ini_options]
testpaths = [
"tests",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py38
[testenv]
usedevelop = true
[testenv:py{38,39,310,311}]
extras =
testing
commands = pytest {posargs}
[testenv:cli-py{38,39,310,311}]
extras = cli
commands = autodoc2 {posargs}
[testenv:docs]
extras = docs
passenv =
TERM
allowlist_externals = echo
commands = sphinx-build {posargs} -nW --keep-going -b html -d docs/_build/doctrees docs docs/_build/html
commands_post = echo "Documentation available at: docs/_build/html/index.html"
"""