forked from mkdocs/mkdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
236 lines (217 loc) · 6.29 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mkdocs"
description = "Project documentation with Markdown."
readme = "README.md"
license = "BSD-2-Clause"
authors = [
{name = "Tom Christie", email = "[email protected]"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Documentation",
"Topic :: Text Processing",
]
dynamic = ["version"]
requires-python = ">=3.7"
dependencies = [
"click >=7.0",
"Jinja2 >=2.11.1",
"markupsafe >=2.0.1",
"Markdown >=3.2.1",
"PyYAML >=5.1",
"watchdog >=2.0",
"ghp-import >=1.0",
"pyyaml_env_tag >=0.1",
"importlib-metadata >=4.3; python_version < '3.10'",
"typing-extensions >=3.10; python_version < '3.8'",
"packaging >=20.5",
"mergedeep >=1.3.4",
"pathspec >=0.11.1",
"platformdirs >=2.2.0",
"colorama >=0.4; platform_system == 'Windows'",
]
[project.optional-dependencies]
i18n = [
"babel >=2.9.0",
]
min-versions = [
"click ==7.0",
"Jinja2 ==2.11.1",
"markupsafe ==2.0.1",
"Markdown ==3.2.1",
"PyYAML ==5.1",
"watchdog ==2.0",
"ghp-import ==1.0",
"pyyaml_env_tag ==0.1",
"importlib-metadata ==4.3; python_version < '3.10'",
"typing-extensions ==3.10; python_version < '3.8'",
"packaging ==20.5",
"mergedeep ==1.3.4",
"pathspec ==0.11.1",
"platformdirs ==2.2.0",
"colorama ==0.4; platform_system == 'Windows'",
"babel ==2.9.0",
]
[project.urls]
Documentation = "https://www.mkdocs.org/"
Source = "https://github.com/mkdocs/mkdocs"
Issues = "https://github.com/mkdocs/mkdocs/issues"
History = "https://www.mkdocs.org/about/release-notes/"
[project.scripts]
mkdocs = "mkdocs.__main__:cli"
[project.entry-points."mkdocs.themes"]
mkdocs = "mkdocs.themes.mkdocs"
readthedocs = "mkdocs.themes.readthedocs"
[project.entry-points."mkdocs.plugins"]
search = "mkdocs.contrib.search:SearchPlugin"
[tool.hatch.version]
path = "mkdocs/__init__.py"
[tool.hatch.build]
artifacts = ["/mkdocs/**/*.mo"]
[tool.hatch.build.targets.sdist]
include = ["/mkdocs"]
[tool.hatch.build.targets.wheel]
exclude = ["/mkdocs/tests/integration", "*.po", "*.pot", "babel.cfg"]
[tool.hatch.build.hooks.custom]
dependencies = [
"babel",
]
[tool.hatch.envs.default.scripts]
all = [
"hatch run style:fix",
"hatch run types:check",
"hatch run test:test",
"hatch run lint:check",
"hatch run +type=default integration:test",
]
[tool.hatch.envs.test]
features = ["i18n"]
dependencies = [
"coverage",
]
[tool.hatch.envs.test.scripts]
test = "coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -p '*tests.py' mkdocs --top-level-directory ."
_coverage = ["test", "coverage xml", "coverage report --show-missing"]
with-coverage = "test"
[[tool.hatch.envs.test.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
type = ["default", "min-req"]
[tool.hatch.envs.test.overrides]
matrix.type.features = [
{ value = "min-versions", if = ["min-req"] },
]
matrix.type.scripts = [
{ key = "with-coverage", value = "_coverage", if = ["default"] },
]
[tool.hatch.envs.integration]
template = "docs"
[tool.hatch.envs.integration.scripts]
test = "python -m mkdocs.tests.integration"
[[tool.hatch.envs.integration.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
type = ["default", "no-babel"]
[tool.hatch.envs.integration.overrides]
matrix.type.features = [
{ value = "i18n", if = ["default"] },
]
[tool.hatch.envs.types]
dependencies = [
"mypy",
"types-Jinja2",
"types-Markdown",
"types-PyYAML",
"types-setuptools",
"typing-extensions",
]
[tool.hatch.envs.types.scripts]
check = "mypy mkdocs"
[tool.hatch.envs.style]
detached = true
dependencies = [
"black",
"isort",
"ruff",
]
[tool.hatch.envs.style.scripts]
check = [
"isort --check-only --diff mkdocs docs",
"black -q --check --diff mkdocs docs",
"lint",
]
lint = [
"ruff check mkdocs docs"
]
fix = [
"ruff check --fix mkdocs docs",
"format",
]
format = [
"isort -q mkdocs docs",
"black -q mkdocs docs",
]
[tool.hatch.envs.lint]
detached = true
dependencies = [
"codespell",
]
[tool.hatch.envs.lint.scripts]
spelling = "codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js"
markdown = "npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME"
js = "npm exec --yes -- jshint mkdocs/"
css = "npm exec --yes -- csslint --quiet mkdocs/"
check = ["markdown", "js", "css", "spelling"]
[tool.hatch.envs.docs]
dependencies = [
"Markdown >=3.3.3",
"mdx_gh_links >=0.2",
"markdown-callouts >=0.3.0",
"mkdocs-literate-nav >=0.5.0",
"mkdocs-redirects >=1.0.1",
"pymdown-extensions >=8.0.1",
"mkdocstrings-python >=0.7.1",
"mkdocs-click >=0.8.0",
]
[tool.black]
line-length = 100
target-version = ["py37"] # 3.7
skip-string-normalization = true
[tool.isort]
profile = "black"
line_length = 100
[tool.ruff]
select = [
"F", "W", "E", "UP", "YTT", "C4", "FA", "PIE", "T20", "RSE", "TCH", "DTZ",
"B002", "B003", "B005", "B007", "B009", "B012", "B013", "B014", "B015", "B018", "B020", "B021", "B023", "B026", "B033", "B034", "B905",
"COM818",
"PERF101",
"PGH002", "PGH004", "PGH005",
"PLE", "PLW0120", "PLW0127",
"RUF001", "RUF007", "RUF010", "RUF100", "RUF200",
"SIM101", "SIM107", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM300", "SIM401", "SIM910",
]
ignore = ["E501", "E731"]
[tool.ruff.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.mypy]
ignore_missing_imports = true
warn_unreachable = true
no_implicit_optional = true
show_error_codes = true