-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (50 loc) · 1.96 KB
/
Copy pathMakefile
File metadata and controls
66 lines (50 loc) · 1.96 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
64
65
66
PYTHON ?= .venv/bin/python
PIP ?= $(PYTHON) -m pip
UVICORN ?= $(PYTHON) -m uvicorn
STREAMLIT ?= .venv/bin/streamlit
COMPETITION ?= E0
SEASON ?= 2425
.DEFAULT_GOAL := help
.PHONY: help venv install migrate seed-demo sync-public test lint typecheck api dashboard smoke smoke-public clean-db
help:
@printf "Available targets:\n"
@printf " make venv # create local virtualenv\n"
@printf " make install # install project in editable mode\n"
@printf " make migrate # run alembic migrations\n"
@printf " make seed-demo # insert demo fixture/odds\n"
@printf " make sync-public # ingest public football-data.co.uk dataset\n"
@printf " make test # run pytest\n"
@printf " make lint # run ruff on src/tests\n"
@printf " make typecheck # run mypy on src\n"
@printf " make api # start FastAPI locally\n"
@printf " make dashboard # start Streamlit dashboard\n"
@printf " make smoke # full local smoke test with demo seed\n"
@printf " make smoke-public # full local smoke test with public ingestion\n"
@printf " make clean-db # remove local SQLite db\n"
venv:
python3 -m venv .venv
install:
$(PIP) install --upgrade pip setuptools wheel
$(PIP) install -e '.[dev,dashboard]'
migrate:
$(PYTHON) -m alembic upgrade head
seed-demo:
$(PYTHON) -m value_bet_scanner.scripts.seed_demo_data
sync-public:
$(PYTHON) -m value_bet_scanner.scripts.sync_public_football_data_uk --season $(SEASON) --competition $(COMPETITION)
test:
$(PYTHON) -m pytest -q
lint:
$(PYTHON) -m ruff check src tests
typecheck:
$(PYTHON) -m mypy src
api:
$(UVICORN) value_bet_scanner.main:app --host 127.0.0.1 --port 8000 --reload
dashboard:
API_BASE_URL=$${API_BASE_URL:-http://127.0.0.1:8000} $(STREAMLIT) run apps/dashboard/streamlit_app.py
smoke:
bash scripts/local_smoke_test.sh
smoke-public:
bash scripts/local_smoke_test.sh --public-data --competition $(COMPETITION) --season $(SEASON)
clean-db:
rm -f value_bet_scanner.db