-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (24 loc) · 983 Bytes
/
Makefile
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
SHELL :=/bin/bash
.PHONY: clean check setup
.DEFAULT_GOAL=help
VENV_DIR = .venv
PYTHON_VERSION=python3.11
check: # Ruff check
@ruff check .
@echo "✅ Check complete!"
fix: # Fix auto-fixable linting issues
@ruff check app.py --fix
clean: # Clean temporary files
@rm -rf __pycache__ .pytest_cache
@find . -name '*.pyc' -exec rm -r {} +
@find . -name '__pycache__' -exec rm -r {} +
@rm -rf build dist
@find . -name '*.egg-info' -type d -exec rm -r {} +
setup: # Initial project setup
@echo "Creating virtual env at: $(VENV_DIR)"
@$(PYTHON_VERSION) -m venv $(VENV_DIR)
@echo "Installing dependencies..."
@source $(VENV_DIR)/bin/activate && pip install -e .
@echo -e "\n✅ Done.\n🎉 Run the following commands to activate the virtual environment and run the app:\n\n ➡️ source $(VENV_DIR)/bin/activate\n ➡️ olm"
help: # Show this help
@egrep -h '\s#\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'