-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.32 KB
/
Makefile
File metadata and controls
45 lines (37 loc) · 1.32 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
.DEFAULT_GOAL := help
VENV := .venv
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
.PHONY: venv
venv: ## Create project virtualenv
@if [ ! -d "$(VENV)" ]; then \
echo "Creating virtualenv..." && \
python3 -m venv $(VENV) && \
$(PIP) install --upgrade pip; \
fi
install: venv ## Install project dependencies
@echo "Installing dependencies..." && \
$(PIP) install -e .
install-dev: venv ## Installs development tools
@echo "Installing development tools..." && \
$(PIP) install pre-commit black isort ruff
run: install ## Start Codeas application (installs dependencies first)
@echo "Starting Codeas..." && \
$(PYTHON) -m streamlit run src/codeas/ui/🏠_Home.py
pre-commit: install-dev ## Installs and configures pre-commit hooks
@echo "Installing pre-commit..." && \
$(PIP) install pre-commit && \
$(VENV)/bin/pre-commit install
style: venv ## Formats code with black, isort, and ruff
@echo "Installing style tools..." && \
$(PIP) install black isort ruff && \
@echo "Run black" && \
$(VENV)/bin/black . && \
@echo "Run isort" && \
$(VENV)/bin/isort . && \
@echo "Run ruff" && \
$(VENV)/bin/ruff check . --fix
help: ## Show this help
@echo "Usage: make [target]\n"
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'