Debian Codegraph @

pyproject.toml

raw
1 [build-system]
2 requires = ["hatchling"]
3 build-backend = "hatchling.build"
4
5 [project]
6 name = "mkdocs"
7 description = "Project documentation with Markdown."
8 readme = "README.md"
9 license = "BSD-2-Clause"
10 authors = [
11 {name = "Tom Christie", email = "[email protected]"},
12 ]
13 classifiers = [
14 "Development Status :: 5 - Production/Stable",
15 "Environment :: Console",
16 "Environment :: Web Environment",
17 "Intended Audience :: Developers",
18 "License :: OSI Approved :: BSD License",
19 "Operating System :: OS Independent",
20 "Programming Language :: Python",
21 "Programming Language :: Python :: 3",
22 "Programming Language :: Python :: 3.8",
23 "Programming Language :: Python :: 3.9",
24 "Programming Language :: Python :: 3.10",
25 "Programming Language :: Python :: 3.11",
26 "Programming Language :: Python :: 3.12",
27 "Programming Language :: Python :: 3 :: Only",
28 "Programming Language :: Python :: Implementation :: CPython",
29 "Programming Language :: Python :: Implementation :: PyPy",
30 "Topic :: Documentation",
31 "Topic :: Text Processing",
32 ]
33 dynamic = ["version"]
34 requires-python = ">=3.8"
35 dependencies = [
36 "click >=7.0",
37 "Jinja2 >=2.11.1",
38 "markupsafe >=2.0.1",
39 "Markdown >=3.3.6",
40 "PyYAML >=5.1",
41 "watchdog >=2.0",
42 "ghp-import >=1.0",
43 "pyyaml_env_tag >=0.1",
44 "importlib-metadata >=4.4; python_version < '3.10'",
45 "packaging >=20.5",
46 "mergedeep >=1.3.4",
47 "pathspec >=0.11.1",
48 "mkdocs-get-deps >=0.2.0",
49 "colorama >=0.4; platform_system == 'Windows'",
50 ]
51 [project.optional-dependencies]
52 i18n = [
53 "babel >=2.9.0",
54 ]
55 min-versions = [
56 "click ==7.0",
57 "Jinja2 ==2.11.1",
58 "markupsafe ==2.0.1",
59 "Markdown ==3.3.6",
60 "PyYAML ==5.1",
61 "watchdog ==2.0",
62 "ghp-import ==1.0",
63 "pyyaml_env_tag ==0.1",
64 "importlib-metadata ==4.4; python_version < '3.10'",
65 "packaging ==20.5",
66 "mergedeep ==1.3.4",
67 "pathspec ==0.11.1",
68 "mkdocs-get-deps ==0.2.0",
69 "colorama ==0.4; platform_system == 'Windows'",
70 "babel ==2.9.0",
71 ]
72
73 [project.urls]
74 Documentation = "https://www.mkdocs.org/"
75 Source = "https://github.com/mkdocs/mkdocs"
76 Issues = "https://github.com/mkdocs/mkdocs/issues"
77 History = "https://www.mkdocs.org/about/release-notes/"
78
79 [project.scripts]
80 mkdocs = "mkdocs.__main__:cli"
81
82 [project.entry-points."mkdocs.themes"]
83 mkdocs = "mkdocs.themes.mkdocs"
84 readthedocs = "mkdocs.themes.readthedocs"
85
86 [project.entry-points."mkdocs.plugins"]
87 search = "mkdocs.contrib.search:SearchPlugin"
88
89 [tool.hatch.version]
90 path = "mkdocs/__init__.py"
91
92 [tool.hatch.build]
93 artifacts = ["/mkdocs/**/*.mo"]
94 [tool.hatch.build.targets.sdist]
95 include = ["/mkdocs"]
96 [tool.hatch.build.targets.wheel]
97 exclude = ["/mkdocs/tests", "*.po", "*.pot", "babel.cfg"]
98 [tool.hatch.build.hooks.custom]
99 dependencies = [
100 "babel",
101 "setuptools; python_version >= '3.12'",
102 ]
103
104 [tool.hatch.env]
105 requires = ["hatch-mkdocs", "hatch-pip-compile"]
106
107 [tool.hatch.envs.default.scripts]
108 all = [
109 "hatch run style:fix",
110 "hatch run types:check",
111 "hatch run test:test",
112 "hatch run lint:check",
113 "hatch run +type=default integration:test",
114 ]
115
116 [tool.hatch.envs.test]
117 features = ["i18n"]
118 dependencies = [
119 "coverage",
120 ]
121 [tool.hatch.envs.test.scripts]
122 test = 'python -m unittest discover -s mkdocs -p "*tests.py"'
123 _coverage = [
124 'coverage run --source=mkdocs --omit "mkdocs/tests/*" -m unittest discover -s mkdocs -p "*tests.py"',
125 "coverage xml",
126 "coverage report --show-missing"
127 ]
128 with-coverage = "test"
129 [[tool.hatch.envs.test.matrix]]
130 python = ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3"]
131 type = ["default", "min-req"]
132 [tool.hatch.envs.test.overrides]
133 matrix.type.features = [
134 { value = "min-versions", if = ["min-req"] },
135 ]
136 matrix.type.scripts = [
137 { key = "with-coverage", value = "_coverage", if = ["default"] },
138 ]
139
140 [tool.hatch.env.collectors.mkdocs.integration]
141 path = "mkdocs.yml"
142 [tool.hatch.envs.integration]
143 detached = false
144 [tool.hatch.envs.integration.scripts]
145 test = "python -m mkdocs.tests.integration"
146 [[tool.hatch.envs.integration.matrix]]
147 python = ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3"]
148 type = ["default", "no-babel"]
149 [tool.hatch.envs.integration.overrides]
150 matrix.type.features = [
151 { value = "i18n", if = ["default"] },
152 ]
153
154 [tool.hatch.envs.types]
155 dependencies = [
156 "mypy",
157 "babel",
158 "types-Markdown",
159 "types-pytz",
160 "types-PyYAML",
161 "types-setuptools",
162 "typing-extensions",
163 ]
164 [tool.hatch.envs.types.scripts]
165 check = "mypy mkdocs"
166
167 [tool.hatch.envs.style]
168 type = "pip-compile"
169 detached = true
170 dependencies = [
171 "black",
172 "isort",
173 "ruff",
174 ]
175 [tool.hatch.envs.style.scripts]
176 check = [
177 "isort --check-only --diff mkdocs docs",
178 "black -q --check --diff mkdocs docs",
179 "lint",
180 ]
181 lint = [
182 "ruff check mkdocs docs {args}"
183 ]
184 fix = [
185 "lint --fix",
186 "format",
187 ]
188 format = [
189 "isort -q mkdocs docs",
190 "black -q mkdocs docs",
191 ]
192
193 [tool.hatch.envs.lint]
194 detached = true
195 dependencies = [
196 "codespell==2.2.6",
197 ]
198 [tool.hatch.envs.lint.scripts]
199 spelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S "*.min.js" -S "lunr*.js" -S fontawesome-webfont.svg -S tinyseg.js -S "*.map"'
200 markdown = "npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME"
201 js = "npm exec --yes -- jshint mkdocs/"
202 check = ["markdown", "js", "css", "spelling"]
203
204 [tool.hatch.env.collectors.mkdocs.docs]
205 path = "mkdocs.yml"
206 [tool.hatch.envs.docs]
207 type = "pip-compile"
208 detached = false
209
210 [tool.black]
211 line-length = 100
212 skip-string-normalization = true
213
214 [tool.isort]
215 profile = "black"
216 line_length = 100
217
218 [tool.ruff]
219 select = [
220 "F", "W", "E", "UP", "YTT", "C4", "DTZ", "FA", "ISC", "PIE", "T20", "RSE", "TCH",
221 "B002", "B003", "B005", "B007", "B009", "B012", "B013", "B014", "B015", "B018", "B020", "B021", "B023", "B026", "B033", "B034", "B905",
222 "COM818",
223 "D200", "D201", "D202", "D204", "D207", "D208", "D209", "D210", "D211", "D213", "D214", "D300", "D301", "D400", "D402", "D403", "D405", "D412", "D414", "D415", "D416", "D417", "D419",
224 "PERF101",
225 "PGH002", "PGH004", "PGH005",
226 "FLY002",
227 "PLC", "PLE", "PLR0124", "PLR0133", "PLR0206", "PLR0402", "PLR1701", "PLR1722", "PLW0120", "PLW0127", "PLW0129", "PLW0131", "PLW0406", "PLW0602", "PLW0603", "PLW0711",
228 "RUF001", "RUF005", "RUF007", "RUF010", "RUF013", "RUF100", "RUF200",
229 "SIM101", "SIM107", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM300", "SIM401", "SIM910",
230 ]
231 ignore = ["E501", "E731"]
232
233 [tool.ruff.flake8-comprehensions]
234 allow-dict-calls-with-keyword-arguments = true
235
236 [tool.mypy]
237 warn_unreachable = true
238 no_implicit_optional = true
239 show_error_codes = true