-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
65 lines (55 loc) · 1.9 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mkdocs-macros-includex"
dynamic = ["version"]
description = "Provides the `includex` macro for more flexible includes."
readme = "README.md"
license = "MIT"
authors = [{ name = "Jannis Mainczyk", email = "[email protected]" }]
requires-python = ">=3.7"
[project.optional-dependencies]
pygments = ["pygments"]
[tool.hatch.version]
path = "includex.py"
[tool.hatch.envs.default]
dependencies = ["coverage[toml]", "black", "pytest", "pytest-cov", "ruff"]
[tool.hatch.envs.default.scripts]
test = "hatch run test:test"
docs = "hatch run docs:serve"
release = """\
hatch run test:test
git tag -m 'bump version to '`hatch version` v`hatch version` --sign
git push --tags
echo "Forgot anything? Press CTRL+C to abort..."
sleep 5
hatch build --clean
hatch publish
gh release create v`hatch version` \
--title `hatch version` \
--notes '*[see changes](https://github.com/jannismain/mkdocs-macros-includex/blob/main/CHANGELOG.md#'`hatch version | tr -d .`'---'`date -Idate`')*'
gh release upload v`hatch version` dist/*.tar.gz dist/*.whl
"""
[tool.hatch.envs.test]
dependencies = ["pytest", "pytest-cov", "pygments"]
scripts = { "test" = "pytest --cov-config=pyproject.toml --cov-report=term-missing --cov-report html:build/coverage --cov=includex --cov=test_includex --cov-report xml" }
[tool.coverage.report]
omit = ["**/setup.py", "**/__init__.py", "**/__main__.py"]
exclude_lines = ["if __name__ == .__main__.", "pragma: no cover"]
[[tool.hatch.envs.test.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11"]
[tool.hatch.envs.docs]
dependencies = [
"mkdocs-material",
"mkdocs-macros-plugin",
"mkdocstrings[python]",
"mkdocs-autorefs",
]
[tool.hatch.envs.docs.scripts]
serve = "mkdocs serve --watch includex.py --dev-addr localhost:54321"
build = "mkdocs build"
[tool.ruff]
line-length = 100
[tool.black]
line-length = 100