-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (36 loc) · 1.19 KB
/
Copy pathMakefile
File metadata and controls
51 lines (36 loc) · 1.19 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
.PHONY: install data poc test lint format api batch-forecast notebook-check notebooks \
docker-build docker-test docker-batch docker-api
install:
poetry install
data:
poetry run python scripts/generate_data.py
poc:
poetry run python scripts/run_poc.py
batch-forecast:
poetry run python scripts/run_batch_forecast.py --horizon 28
test:
poetry run pytest
lint:
poetry run ruff check src tests scripts
poetry run mypy src
format:
poetry run ruff format src tests scripts
poetry run ruff check --fix src tests scripts
api:
poetry run uvicorn clinic_forecast.api.main:app --reload
notebook-check:
poetry run python scripts/run_notebook.py
notebooks:
poetry run jupyter lab
# --- Docker demo ---
IMAGE ?= clinic-forecast
docker-build:
docker build -t $(IMAGE) .
# The demo image is main-only; install dev tools + tests at run time.
docker-test: docker-build
docker run --rm $(IMAGE) sh -c "poetry install --only dev --no-interaction && pytest -q"
docker-batch: docker-build
docker run --rm -v "$(CURDIR)/outputs:/app/outputs" $(IMAGE) \
python scripts/run_batch_forecast.py --horizon 28
docker-api: docker-build
docker run --rm -p 8000:8000 -v "$(CURDIR)/outputs:/app/outputs" $(IMAGE)