Files

48 lines
1.1 KiB
Makefile

PYTHON := .venv/bin/python
.PHONY: install bootstrap run test check l1 l2 l3 l3-all pipeline prepare-data docker-up docker-down docker-logs
install:
python3 -m venv .venv
$(PYTHON) -m pip install -r requirements.txt
bootstrap:
$(PYTHON) -m database.bootstrap
run:
$(PYTHON) -m web.app
test:
$(PYTHON) -m unittest discover -v
check:
$(PYTHON) -m compileall -q web database tests wsgi.py
$(PYTHON) -m unittest discover -v
l1:
$(PYTHON) database/L1/L1_Builder.py
l2:
$(PYTHON) database/L2/L2_Builder.py
l3:
$(PYTHON) database/L3/L3_Builder.py
l3-all:
$(PYTHON) database/L3/L3_Builder.py --force
pipeline:
$(PYTHON) -c "from web.app import create_app; create_app(); from database.job_store import JobStore; from database.pipeline import run_pipeline; job_id = JobStore().create_job('manual_pipeline', created_by='cli'); print('job_id=', job_id); raise SystemExit(0 if run_pipeline(job_id) else 1)"
prepare-data:
$(PYTHON) -m database.migrate_data --target runtime-data --include-imports
docker-up:
docker compose up -d --build
docker-down:
docker compose down
docker-logs:
docker compose logs -f yrtv