-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 1.53 KB
/
Copy pathMakefile
File metadata and controls
48 lines (37 loc) · 1.53 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
# Makefile for common development tasks
.PHONY: all setup clean test lint docs build deploy
all: setup lint test
setup: ## Setup the project environment
@echo "Setting up virtual environment and installing dependencies..."
@if [ ! -d "venv" ]; then python3 -m venv venv; fi
@./venv/bin/activate && pip install --upgrade pip
@./venv/bin/activate && pip install -r requirements.txt
@echo "Setup complete."
clean: ## Clean up build artifacts and temporary files
@echo "Cleaning up..."
@find . -name "__pycache__" -exec rm -rf {} +
@find . -name "*.pyc" -exec rm -f {} +
@find . -name "*.egg-info" -exec rm -rf {} +
@rm -rf build/ dist/ .pytest_cache/ htmlcov/ .mypy_cache/
@echo "Clean complete."
test: ## Run all tests
@echo "Running tests..."
@./venv/bin/activate && pytest
@echo "Tests complete."
lint: ## Run linters (flake8)
@echo "Running linting..."
@./venv/bin/activate && flake8 src/ tests/ scripts/
@echo "Linting complete."
docs: ## Build documentation
@echo "Building documentation (requires Sphinx and make in docs/)..."
@cd docs && make html
@echo "Documentation built to docs/_build/html."
build: ## Build the Python package
@echo "Building package..."
@./venv/bin/activate && python3 -m build
@echo "Package built to dist/."
deploy: ## Deploy the application (placeholder)
@echo "Deploying application..."
@echo "Deployment logic goes here."
help: ## Display this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "[36m%-20s[0m %s\n", $$1, $$2}'