-
Notifications
You must be signed in to change notification settings - Fork 5
/
hatch.toml
76 lines (65 loc) · 1.93 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
[env]
requires = ["hatch-pip-compile"]
[version]
path = "xcompact3d_toolbox/_version.py"
pattern = '__version__ = "(?P<version>[^"]+)"'
[envs.default]
description = "Base development environment"
installer = "uv"
dependencies = [
"coverage[toml]",
"hypothesis>=4.53",
"pre-commit",
"pytest-cov",
"pytest",
]
[envs.default.scripts]
pre-commit-install = "pre-commit install {args}"
pre-commit-uninstall = "pre-commit uninstall {args}"
check = "pre-commit run {args} --all-files"
type = "check mypy {args}"
lint = "check ruff {args}"
format = "check ruff-format {args}"
test = "pytest --cov --cov-report=term --cov=xcompact3d_toolbox --cov=tests {args}"
test-no-cov = "test --no-cov {args}"
qa = ["check", "test", "echo '✅ QA passed'"]
[envs.test]
description = "Extended test environment"
extra-dependencies = ["pytest-randomly", "pytest-rerunfailures", "pytest-xdist"]
[envs.test.scripts]
extended = "test -n auto --reruns 7 --reruns-delay 1 {args}"
[[envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[envs.docs]
description = "Documentation environment"
features = ["visu"]
template = "docs"
install = true
dependencies = [
"docutils",
"ipykernel",
"jupyter-book",
"nbsphinx",
"pooch",
"sphinx-autobuild",
"sphinx-rtd-theme",
"sphinx>=1.4",
]
type = "pip-compile"
lock-filename = "docs/requirements.txt"
[envs.docs.scripts]
config = "jupyter-book config sphinx docs {args}"
build = ["config", "jupyter-book build docs --path-output build {args}"]
serve = ["config", "sphinx-autobuild docs build/_build/html --ignore='**/data/*' --open-browser {args}"]
[envs.changelog]
description = "Changelog handler"
template = "changelog"
install = true
dependencies = ["towncrier"]
[envs.changelog.scripts]
build = "towncrier build {args}"
draft = "build --draft {args}"
create = "towncrier create {args}"
check = "towncrier check {args}"
[envs.hatch-static-analysis]
config-path = "ruff_defaults.toml"