-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhatch.toml
63 lines (58 loc) · 1.35 KB
/
hatch.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
[version]
path = "src/pyright_polite/__about__.py"
[build.targets.sdist]
exclude = [
"/.changelog.d",
"/.github",
"/package-lock.json",
"/package.json",
"/tests",
]
# Local tests
[envs.default]
python = "3.11"
dependencies = [
"black >= 23.1.0",
"coverage ~= 7.2",
"pre-commit ~= 3.2",
"pylint ~= 2.17",
"pytest ~= 7.2",
"pytest-asyncio ~= 0.21",
"ruff >= 0.0.257",
"scriv >= 1.2.1",
"ssort >= 0.11.6",
]
[envs.default.scripts]
cov = ["coverage run {args}", "coverage report -m"]
lint = [
"- ruff check .",
"- pylint src",
"- black --quiet --check --diff .",
"- pyright-polite src tests/test_*.py",
"- ssort --check --diff src",
]
# Templates
[envs.base]
dependencies = [
"coverage ~= 7.2",
"pytest ~= 7.2",
"pytest-asyncio ~= 0.21",
]
# pyenv
[envs.pyenv]
template = "base"
platforms = ["linux"]
[envs.pyenv.scripts]
cov = ["coverage run {args}", "coverage report -m"]
test = ["pytest {args}"]
[[envs.pyenv.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11"]
# GitHub Workflow: CI
[envs.ci]
template = "base"
platforms = ["linux", "macos", "windows"]
[envs.ci.scripts]
cov = ["coverage run {args}", "coverage combine -q --keep", "coverage report -m"]
cov-combine = ["coverage combine -q", "coverage json -q -o coverage.json"]
[[envs.ci.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8", "pypy3.9"]