-
Notifications
You must be signed in to change notification settings - Fork 6
/
hatch.toml
79 lines (69 loc) · 1.64 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
# based on https://github.com/pypa/hatch/blob/master/hatch.toml
[envs.default]
dependencies = [
"coverage[toml]",
"pytest-cov",
"pytest-randomly",
"pytest-rerunfailures",
"pytest-xdist",
]
[envs.default.scripts]
# --cov must not come before an argument in order to use the sources defined by config
_cov = "pytest --cov --cov-report=term-missing --cov-config=pyproject.toml"
dev = "pytest -p no:randomly --no-cov {args:tests}"
cov = "_cov -p no:randomly {args:tests}"
full = "_cov -n auto --reruns 5 --reruns-delay 3 -r aR {args:tests}"
[envs.dev]
template = "default"
dependencies = [
"jupyterlab",
"torch>=1.0.0",
"torchvision",
"tqdm",
"scikit-learn>=0.23.0",
]
[envs.dev.env-vars]
PIP_INDEX_URL = "https://download.pytorch.org/whl/cpu"
PIP_EXTRA_INDEX_URL = "https://pypi.org/simple/"
[envs.docs]
template = "dev"
dependencies = [
"pdoc3",
"nbconvert",
]
[envs.docs.scripts]
build = [
"pdoc --html vflow --output-dir docs --template-dir docs",
"cp -rf docs/vflow/* docs/",
"rm -rf docs/vflow",
"cd notebooks && jupyter nbconvert --to html *.ipynb && cd ..",
"mv notebooks/*.html docs/notebooks/",
"cd docs && python style_docs.py && cd ..",
]
[envs.style]
detached = true
dependencies = [
"ruff",
"black",
"isort",
]
[envs.style.scripts]
check = [
"ruff vflow tests",
"black --check --diff vflow tests",
"isort --check --diff --profile black vflow tests",
]
fmt = [
"isort --profile black ./vflow ./tests",
"black ./vflow ./tests",
"check",
]
[envs.coverage]
detached = true
dependencies = [
"coverage[toml]",
"lxml",
]
[envs.coverage.scripts]
combine = "coverage combine {args}"
report-xml = "coverage xml -i"