ml_pipeline_cookiecutter/{{cookiecutter.project_name}}/Makefile

37 lines
893 B
Makefile
Raw Normal View History

APP_NAME={{cookiecutter.module_name}}
2024-04-06 13:02:31 -07:00
PYTHON=.venv/bin/python3
INTERPRETER=/usr/bin/python3
.PHONY: help test
all: help
2024-04-06 13:02:31 -07:00
init: ## create a venv
$(INTERPRETER) -m venv .venv
cp .env.example .env
2024-04-06 13:02:31 -07:00
install:
$(PYTHON) -m pip install -r requirements.txt
2024-04-06 13:02:31 -07:00
data: ## download the mnist data
$(PYTHON) -m $(APP_NAME) data:download
run: ## run the pipeline (train)
$(PYTHON) -m $(APP_NAME) pipeline:train
2024-04-06 13:02:31 -07:00
serve: ## start fastapi uvicorn server
2024-04-06 13:02:31 -07:00
$(PYTHON) -m $(APP_NAME) app:serve
docs: ## serve the mdbook docs directory
mdbook serve docs
test: ## run pytest tests
$(PYTHON) -m pytest
test-watch: ## run pytest on .py changes
find . -iname "*.py" | entr -c $(PYTHON) -m pytest
2024-04-06 13:02:31 -07:00
help: ## display this help message
@echo "available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36mmake %-30s\033[0m %s\n", $$1, $$2}'