Skip to content

Commit b534f59

Browse files
committed
🐛 pyproject.toml example
1 parent 64a5ce1 commit b534f59

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

pyproject.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ python = "3.11"
2929
type = "virtual"
3030

3131
[tool.hatch.envs.default.scripts]
32+
cov = [
33+
"test-cov",
34+
"cov-report"
35+
]
36+
cov-report = [
37+
"- coverage combine",
38+
"coverage report -m"
39+
]
3240
test = "pytest {args:tests}"
41+
test-cov = "coverage run -m pytest {args:tests}"
3342

3443
[tool.hatch.envs.docs]
3544
dependencies = [
@@ -45,6 +54,46 @@ build = ["mkdocs build --clean --strict"]
4554
deploy = ["mkdocs gh-deploy {args:}"]
4655
serve = ["mkdocs serve --dev-addr localhost:8080 --livereload"]
4756

57+
[tool.hatch.envs.gen]
58+
dependencies = [
59+
"pip-tools~=7.1.0"
60+
]
61+
detached = false
62+
63+
[tool.hatch.envs.gen.scripts]
64+
release = [
65+
"npm install --prefix .github/semantic_release/",
66+
"npx --prefix .github/semantic_release/ semantic-release {args:}"
67+
]
68+
reqs = "pip-compile {args:} --generate-hashes --output-file requirements.txt"
69+
reqs-update = "pip-compile {args:} --upgrade --generate-hashes --output-file requirements.txt"
70+
71+
[tool.hatch.envs.lint]
72+
dependencies = [
73+
"mypy>=1.0.0",
74+
"ruff>=0.0.243"
75+
]
76+
detached = true
77+
78+
[tool.hatch.envs.lint.scripts]
79+
all = [
80+
"style",
81+
"typing"
82+
]
83+
fmt = [
84+
"ruff format {args:.}",
85+
"ruff --fix {args:.}",
86+
"style"
87+
]
88+
precommit = [
89+
"pre-commit run --all-files"
90+
]
91+
style = [
92+
"ruff {args:.}",
93+
"ruff format --check --diff {args:.}"
94+
]
95+
typing = "mypy --install-types --non-interactive {args:example_project tests}"
96+
4897
[tool.ruff]
4998
ignore = [
5099
# Allow non-abstract empty methods in abstract base classes

0 commit comments

Comments
 (0)