Use hatch-mkdocs and hatch-pip-compile for docs deps

This commit is contained in:
Oleh Prypin
2023-11-24 21:25:44 +01:00
parent 646987da45
commit 4ad0dd16b2
2 changed files with 107 additions and 12 deletions

View File

@@ -102,6 +102,9 @@ dependencies = [
"setuptools; python_version >= '3.12'" # Workaround: babel doesn't declare its dependency
]
[tool.hatch.env]
requires = ["hatch-mkdocs", "hatch-pip-compile"]
[tool.hatch.envs.default.scripts]
all = [
"hatch run style:fix",
@@ -135,8 +138,8 @@ matrix.type.scripts = [
{ key = "with-coverage", value = "_coverage", if = ["default"] },
]
[tool.hatch.envs.integration]
template = "docs"
[tool.hatch.env.collectors.mkdocs.integration]
path = "mkdocs.yml"
[tool.hatch.envs.integration.scripts]
test = "python -m mkdocs.tests.integration"
[[tool.hatch.envs.integration.matrix]]
@@ -197,17 +200,11 @@ js = "npm exec --yes -- jshint mkdocs/"
css = "npm exec --yes -- csslint --quiet mkdocs/"
check = ["markdown", "js", "css", "spelling"]
[tool.hatch.env.collectors.mkdocs.docs]
path = "mkdocs.yml"
[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",
]
type = "pip-compile"
pip-compile-hashes = false
[tool.black]
line-length = 100