-
Notifications
You must be signed in to change notification settings - Fork 0
/
hatch.toml
65 lines (50 loc) · 1.85 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
mode = "local"
project = "poufdb"
[shell]
name = "pipenv"
args = ["shell"]
[dirs]
data = ".hatch"
cache = ".hatch/cache"
python = ".venv/Scripts"
[envs.default]
type = "virtual"
description = "hatch + pipenv = FTW!"
detached = true
dev-mode = true
skip-install = false
pre-install-commands = [
"echo prepare...",
"python -mpip -U pip pipenv",
"pipenv install --dev hatchling hatch-requirements-txt setuptools build wheel black isort mypy pylint",
"echo end"
]
[envs.default.env-vars]
HATCH_CONFIG = "./hatch.toml"
HATCH_ENV_TYPE_VIRTUAL_PATH = ".venv"
PIPENV_VENV_IN_PROJECT = "1"
PIPENV_IGNORE_VIRTUALENVS = "1" # to force pipenv to create its own virtualenv
PIP_IGNORE_INSTALLED = "1" # pipenv ignore global installed
[envs.default.scripts]
init = "python -mpip install -U pip pipenv && pipenv install --dev hatchling setuptools hatch-requirements-txt"
install = "pipenv install {args} & hatch run req-env"
add = "pipenv install {args} & hatch run req-env"
uninstall = "pipenv uninstall {args} & hatch run req-env"
remove = "pipenv uninstall {args} & hatch run req-env"
req = "pipenv -q requirements > requirements.txt && echo Ok"
req-dev = "pipenv -q requirements --dev > requirements-dev.txt && echo Ok"
req-env = "pipenv -q requirements {args} > requirements-{env_name}.txt && echo Ok"
sync = "pipenv --quiet update && hatch run req-env"
resync = "pip freeze > tmp.txt && pip uninstall -q -y -r tmp.txt & rm tmp.txt && pipenv -q install --dev && hatch run req-env"
renew = "rm -i Pipfile.lock & hatch run resync"
#renew = "rm -i Pipfile.lock & pipenv -q install --dev && hatch run req-env"
a = "hatch version alpha && git commit -am \"{args}\""
v = "hatch version alpha && isort src && black src/**/*.py"
[terminal.styles]
info = "bold"
success = "bold cyan"
error = "bold red"
warning = "bold yellow"
waiting = "bold magenta"
debug = "bold"
spinner = "simpleDotsScrolling"