-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (44 loc) · 1.17 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ve:
python3 -m venv .ve; \
. .ve/bin/activate; \
pip install -r requirements.txt
clean:
test -d .ve && rm -rf .ve
docker_build:
docker-compose up -d --build
docker_up:
docker-compose up -d
docker_start:
docker-compose start
docker_down:
docker-compose down --rmi all
docker_stop:
docker-compose stop
docker_restart:
docker-compose stop
docker-compose up -d
docker_logs:
docker-compose logs --tail=100 -f
runserver-prod:
uvicorn main.app:app --host 0.0.0.0 --port 5000 --reload
runserver-dev:
export APP_ENV=dev && uvicorn main.app:app --host 0.0.0.0 --port 5000 --reload
runserver-test:
export APP_ENV=test && uvicorn main.app:app --host 0.0.0.0 --port 5000 --reload
test:
export APP_ENV=test && python -m pytest -v ./tests
test-cov:
export APP_ENV=test && python -m pytest --cov=./main ./tests
install_hooks:
pip install -r requirements-ci.txt; \
pre-commit install
run_hooks_on_all_files:
pre-commit run --all-files
style:
flake8 main
types:
mypy --namespace-packages -p "main" --config-file setup.cfg
format:
black main --check
lint:
flake8 main && isort main --diff && black main --check && mypy --namespace-packages -p "main" --config-file setup.cfg