-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (37 loc) · 1.28 KB
/
Makefile
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
.PHONY: clean venv docker-rm docker-build docker test test-rebuild test-env build upload
TESTS = "tests/"
N = 1
clean:
@rm -rf dist/*
@rm -rf build/*
@find . -path '*/.*' -prune -o -name '__pycache__' -exec rm -fr {} +
@find . -path '*/.*' -prune -o -name '*.egg-info' -exec rm -fr {} +
@find . -path '*/.*' -prune -o -name '*.py[co]' -exec rm -fr {} +
@find . -path '*/.*' -prune -o -name '*.build' -exec rm -fr {} +
@find . -path '*/.*' -prune -o -name '*.so' -exec rm -fr {} +
@find . -path '*/.*' -prune -o -name '*.c' -exec rm -fr {} +
@find . -path '*/.*' -prune -o -name '*~' -exec rm -fr {} +
venv:
@rm -rf venv
@python3 -m venv ~/venv/y-hat
docker-rm:
@cd docker && docker-compose -f dev.compose.yaml rm -s -v -f;
docker-build: docker-rm
@cd docker && docker-compose -f dev.compose.yaml build --no-cache;
docker:
@cd docker && docker-compose -f dev.compose.yaml run y-hat-dev;
api:
@cd docker && docker-compose -f dev.compose.yaml run y-hat-api;
test: clean
python3 -m tox --skip-missing-interpreters -- ${TESTS} -n ${N}
@make clean
test-rebuild: clean
rm -rf .tox
python3 -m tox --skip-missing-interpreters --recreate --notest
@make clean
test-env: clean
python3 -m tox -e ${ENV} -- ${TESTS} -n ${N}
build: clean
@python3 -m build
upload: build
@twine upload dist/*