-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (24 loc) · 704 Bytes
/
Makefile
File metadata and controls
36 lines (24 loc) · 704 Bytes
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
.PHONY: ensure_in_venv venv test test-update lint
# ----- Checks -----
check_in_venv:
@test "$$VIRTUAL_ENV" != "" || (echo "Not in virtual env. Run: make venv" && exit 1)
# ----- Virtual Env -----
venv:
@echo "Creating virtual environment..."
@python3.13 -m venv .venv
@echo "Installing dependencies..."
@.venv/bin/pip install -r requirements.txt
@echo "Done. Now run: source .venv/bin/activate"
@echo "To leave the environment run: deactivate"
# ----- Api -----
api: check_in_venv
fastapi dev main.py
# ----- Testing -----
TEST = pytest -s -vv *_test.py
test: check_in_venv
$(TEST)
test-update: check_in_venv
UPDATE=true $(TEST)
# ----- Linting -----
lint: check_in_venv
mypy *.py