-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
151 lines (131 loc) · 4.54 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "sphinx_polyversion"
version = "1.0.0"
description = "Build multiple versions of your sphinx docs and merge them into one website."
readme = "README.md"
authors = ["yfprojects <real-yfprojects@users.noreply.github.com>"]
license = "MIT"
repository = "https://github.com/real-yfprojects/sphinx-polyversion"
documentation = "https://real-yfprojects.github.io/sphinx-polyversion/"
keywords = ["utils", "documentation", "sphinx"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Typing :: Typed",
"Topic :: Documentation",
"Topic :: Documentation :: Sphinx",
"Topic :: Software Development :: Documentation",
"Topic :: Utilities",
]
[tool.poetry.dependencies]
python = ">=3.8"
virtualenv = { version = ">=20", optional = true }
jinja2 = { version = ">=3", optional = true }
[tool.poetry.extras]
virtualenv = ["virtualenv"]
jinja = ["jinja2"]
[tool.poetry.scripts]
sphinx-polyversion = "sphinx_polyversion.main:main"
[tool.poetry.group.lint.dependencies]
mypy = "^1.7.1"
ruff = "^0.8.4"
black = "^23.11.0"
[tool.poetry.group.test.dependencies]
pytest = "^8.3.4"
pytest-asyncio = { version = "^0.25.0", python = ">=3.9" }
pytest-cov = { version = "^6.0.0", python = ">=3.9" }
pytest-xdist = "^3.6.1"
[tool.poetry.group.docs.dependencies]
sphinx = { version = "^8.1.3", python = ">=3.10" }
sphinx-argparse = { version = "^0.5.2", python = ">=3.10" }
sphinx-rtd-theme-github-versions = { version = "^1.1", python = ">=3.9" }
sphinx-rtd-theme = { version = "^3.0.2", python = ">=3.9" }
myst-parser = { version = "^4.0.0", python = ">=3.10" }
sphinx-notfound-page = { version = "^1.0.2", python = ">=3.9" }
sphinx-copybutton = { version = "^0.5.2", python = ">=3.9" }
furo = { version = "^2024.5.6", python = ">=3.9" }
sphinxext-opengraph = { version = "^0.9.1", python = ">=3.9" }
sphinx-autobuild = { version = "^2024.4.16", python = ">=3.9" }
sphinx-design = { version = "^0.6", python = ">=3.9" }
jinja2 = { version = "^3.1.4", python = ">=3.9" }
[tool.black]
target-version = ['py38']
[tool.mypy]
files = "sphinx_polyversion/**.py"
python_version = "3.8"
strict = true
allow_redefinition = true
exclude = ["^(tests|docs)"]
[[tool.mypy.overrides]]
module = "virtualenv.*"
ignore_missing_imports = true
[tool.ruff]
target-version = "py38"
line-length = 88 # Same as Black.
[tool.ruff.lint]
select = [
"T", # flake8-print
"I", # isort
"F", # pyflakes
"D", # pydocstyle
"E", # pycodestyle
"W",
"FLY", # flynt
"RUF", # ruff
"PL", # pylint
"TCH", # flake8-type-checking
"ASYNC", # flake8-async
"A", # flake8-builtins
"C", # flake8-comprehensions
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"G", # flake8-implicit-str-concat
"INP", # flake8-no-pep420
"PT", # flake8-pytest-style
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"TD", # flake8-todos
"PYI", # flake8-pyi - lints .pyi type stubs
"ERA", # ERA
]
unfixable = ['ERA']
ignore = [
# pydocstyle
# "D202", # no-blank-line-after-function
"D203", # one-blank-line-before-class
# "D205", # blank-line-after-summary
"D212", # multi-line-summary-first-line
# "D401", # non-imperative-mood
# pycodestyle
"E501", # line-too-long
# pylint
"PLR0913", # too-many-arguments
# "PLR0912", # too-many-branches
# "PLR0915", # too-many-statements
# flake8-todos
"TD002", # missing author
]
# Allow unused variables when underscore-prefixed or of form `dummyN`.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?)|dummy\\d*)$"
# Less strict rules for docs/* and tests/*.
[tool.ruff.lint.per-file-ignores]
"docs/*" = ["PLR", "D1", "PTH", "INP"]
"tests/*" = ["PLR2004"]
[tool.ruff.lint.pylint]
# Allow more arguments for complexity check
max-args = 8
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
# "--cov=sphinx_polyversion",
# "--cov-report=lcov",
# "--cov-report=term-missing",
# "--numprocesses=auto",
]
testpaths = ["tests"]