-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (58 loc) · 1.37 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
VENV_DIR=venv
venv:
python -m venv $(VENV_DIR)
@echo "\nUse '. $(VENV_DIR)/bin/activate' to activate"
deps-pre:
pip install --upgrade pip==24.1.2 pip-tools==7.4.1
deps-compile:
pip-compile requirements.in --output-file requirements.txt
deps-install:
pip-sync
deps: deps-pre deps-compile deps-install
install: deps-pre deps-install
seed:
APP_ENV=development python -m app.seed
server-dev:
APP_ENV=development uvicorn app:create_app --reload
# Linting
format-isort:
isort .
check-isort:
isort . --check-only
format-black:
black .
check-black:
black . --check
check-flake8:
flake8 .
check-types:
python -m mypy .
lint-all: check-types check-flake8 check-isort check-black
# Formatting
format-autoflake:
autoflake --in-place --recursive \
--remove-all-unused-imports \
--remove-unused-variables \
app tests
format-yesqa:
yesqa app/**/*.py tests/**/*.py
format: format-yesqa format-autoflake format-isort format-black
# Testing
test:
APP_ENV=test pytest app
test-cov:
APP_ENV=test pytest app --verbose \
--cov-config=.coveragerc \
--cov=app \
--cov-report=term:skip-covered \
--cov-report=html \
--cov-report=xml \
--cov-branch \
--cov-fail-under=60
test-watch:
APP_ENV=test ptw app
test-integration:
APP_ENV=test pytest tests/integration
test-end-to-end:
APP_ENV=test pytest tests/end-to-end
test-all: test test-integration test-end-to-end