forked from pypa/hatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hatch.toml
103 lines (98 loc) · 2.62 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[envs.default]
dependencies = [
"coverage[toml]>=6.2",
"filelock>=3.7.1",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-randomly",
"pytest-rerunfailures",
"pytest-xdist",
"trustme",
]
post-install-commands = [
"python -m pip install --disable-pip-version-check {verbosity:flag:-1} -e ./backend",
]
[envs.default.scripts]
full = "pytest -n auto --reruns 5 --reruns-delay 3 -r aR --cov-report=term-missing --cov-config=pyproject.toml --cov=src/hatch --cov=backend/src/hatchling --cov=tests {args:tests}"
dev = "pytest -p no:randomly --no-cov {args:tests}"
[envs.test.overrides]
env.HERMETIC_TESTS.type = [
{ value = "container", if = ["true"] },
"virtual",
]
[[envs.test.matrix]]
python = ["37", "38", "39", "310"]
[envs.lint]
detached = true
dependencies = [
"bandit>=1.7.4",
"black>=22.6.0",
"flake8>=5.0.0",
"flake8-bugbear>=22.7.1",
"flake8-quotes>=3.3.1",
"flake8-tidy-imports>=4.8.0",
"isort>=5.10.1",
"mypy>=0.971",
]
[envs.lint.scripts]
typing = "mypy --install-types --non-interactive {args:backend/src/hatchling src/hatch tests}"
security = "bandit --quiet --recursive --skip B101,B102,B105,B110,B112,B301,B307,B324,B403,B404,B603,B604,B606,B607 {args:.}"
style = [
"flake8 {args:.}",
"black --check --diff {args:.}",
"isort --check-only --diff {args:.}",
]
fmt = [
"isort {args:.}",
"black {args:.}",
"style",
]
all = [
"style",
"typing",
"security",
]
[envs.docs]
dependencies = [
"mkdocs~=1.3.1",
"mkdocs-material~=8.4.2",
# Plugins
"mkdocs-minify-plugin~=0.5.0",
"mkdocs-git-revision-date-localized-plugin~=1.1.0",
"mkdocstrings-python~=0.7.1",
"mkdocs-redirects~=1.1.0",
# https://github.com/jimporter/mike/issues/82#issuecomment-1172913929
"mike @ https://github.com/jimporter/mike/archive/392d57b8bb9d14bcedf2451a0dc302709f8055eb.zip",
# Extensions
"mkdocs-click~=0.8.0",
"pymdown-extensions~=9.5.0",
# Necessary for syntax highlighting in code blocks
"pygments~=2.13.0",
]
[envs.docs.env-vars]
SOURCE_DATE_EPOCH = "1580601600"
[envs.docs.scripts]
build = "mkdocs build --clean --strict {args}"
serve = "mkdocs serve --dev-addr localhost:8000 {args}"
ci-build = "mike deploy --update-aliases {args}"
[envs.backend]
detached = true
dependencies = [
"build~=0.7.0",
"httpx",
]
[envs.backend.env-vars]
HATCH_BUILD_CLEAN = "true"
[envs.backend.scripts]
build = "python -m build backend"
publish = "hatch publish backend/dist"
update-data = [
"update-classifiers",
"update-licenses",
]
update-licenses = "python backend/scripts/update_licenses.py"
update-classifiers = [
"pip install --upgrade trove-classifiers",
"python backend/scripts/update_classifiers.py",
]