-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathhatch.toml
79 lines (71 loc) · 2.04 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[envs.default]
dependencies = [
"coverage[toml]>=6.5",
"pytest",
"commitizen"
]
[envs.default.scripts]
test = "pytest {args:tests}"
test-cov = 'coverage run -m pytest -m "conda or poetry or pipenv" {args:tests}'
cov-report = [
"coverage combine",
"coverage report --show-missing",
]
cov = [
"test-cov",
"cov-report",
]
bump = "cz bump --check-consistency --yes && cz changelog --merge-prerelease"
beta-bump = "cz bump -pr beta --check-consistency --yes && cz changelog --merge-prerelease"
dev-bump = "cz bump --devrelease {args} --check-consistency --yes"
local-bump = "cz bump {args} --changelog --files-only --yes"
[envs.test]
features = [
"all"
]
[envs.test.scripts]
test = 'pytest -m "conda or poetry or pipenv" {args:tests}'
test-cov = 'coverage run -m pytest -m "conda or poetry or pipenv" {args:tests}'
[envs.all]
type = "container"
[envs.all.overrides]
matrix.optionals.features = [
{ value = "all", if = ["all-extras"] },
{ value = "conda", if = ["conda"] },
{ value = "pipenv", if = ["pipenv"] },
{ value = "poetry", if = ["poetry"] },
]
matrix.optionals.scripts = [
{key = "test", value = 'pytest -m "conda" {args:tests}', if = ["conda"] },
{key = "test", value = 'pytest -m "pipenv" {args:tests}', if = ["pipenv"] },
{key = "test", value = 'pytest -m "poetry" {args:tests}', if = ["poetry"] },
{key = "test", value = 'pytest -m "not conda and not poetry and not pipenv" {args:tests}', if = ["no-extras"] },
{key = "test", value = 'pytest -m "conda or poetry or pipenv" {args:tests}', if = ["all-extras"] },
]
[[envs.all.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
optionals = ["conda", "pipenv", "poetry", "all-extras", "no-extras"]
[envs.lint]
detached = true
dependencies = [
"black",
"mypy",
"ruff",
]
[envs.lint.scripts]
typing = "mypy --install-types --non-interactive {args:dparse tests}"
style = [
"ruff {args:.}",
"black --check --diff {args:.}",
]
fmt = [
"black {args:.}",
"ruff --fix {args:.}",
"style",
]
all = [
"style",
"typing",
]
[build.targets.wheel]
packages = ["dparse"]