ewere / Makefile
andevs's picture
Create Makefile
798d286 verified
Raw
History Blame Contribute Delete
1.27 kB
.PHONY: help install dev test lint format clean docker-build docker-run deploy
help:
@echo "Available commands:"
@echo " install Install production dependencies"
@echo " dev Install development dependencies"
@echo " test Run tests"
@echo " lint Run linters"
@echo " format Format code"
@echo " clean Clean cache files"
@echo " docker-build Build Docker image"
@echo " docker-run Run Docker container"
@echo " deploy Deploy to Hugging Face"
install:
pip install -r requirements.txt
dev:
pip install -r requirements-dev.txt
test:
pytest tests/ -v --cov=app --cov-report=html
lint:
flake8 app/ tests/
mypy app/
format:
black app/ tests/
isort app/ tests/
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type f -name "*.pyd" -delete
find . -type f -name ".coverage" -delete
find . -type d -name "htmlcov" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
docker-build:
docker build -t glow-ai-backend .
docker-run:
docker run -p 7860:7860 --env-file .env glow-ai-backend
deploy:
huggingface-cli login
git push https://huggingface.co/spaces/glow-ai/backend main