-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (51 loc) · 1.88 KB
/
Copy pathMakefile
File metadata and controls
63 lines (51 loc) · 1.88 KB
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
# ___ _ ____ _
# | _ \ ___ _ _ _ __ __| |/ ___|__ _| | _____
# | |_) / _ \| | | | '_ \ / _` | | / _` | |/ / _ \
# | __/ (_) | |_| | | | | (_| | |__| (_| | < __/
# |_| \___/ \__,_|_| |_|\__,_|\____\__,_|_|\_\___|
#
.PHONY: help install dev-install install-hooks test testall lint format clean run-api run-worker db-init
help:
@echo "Available commands:"
@echo " make install - Install production dependencies"
@echo " make dev-install - Install development dependencies and git hooks"
@echo " make install-hooks - Install local pre-commit and pre-push hooks"
@echo " make test - Run Bakery tests"
@echo " make testall - Run the local pre-push test suite"
@echo " make lint - Run linters (ruff, mypy)"
@echo " make format - Format code with black"
@echo " make clean - Clean generated files"
@echo " make run-api - Run the Bakery API locally"
@echo " make run-worker - Run the Bakery worker locally"
@echo " make db-init - Run Bakery database migrations"
install:
pip install .
dev-install:
pip install -e ".[dev]"
pre-commit install
pre-commit install --hook-type pre-push
install-hooks:
pre-commit install
pre-commit install --hook-type pre-push
test:
pytest -m "not integration" tests/ -v --cov=bakery --cov-report=html
testall:
./bin/testall.sh
lint:
ruff check bakery shared tests
mypy bakery shared
format:
black bakery shared tests
ruff check --fix bakery shared tests
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf build dist .pytest_cache .coverage htmlcov .mypy_cache .ruff_cache
run-api:
uvicorn bakery.main:app --reload --host 0.0.0.0 --port 8000
run-worker:
python -m bakery.worker
db-init:
python -m bakery.db_init