-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.57 KB
/
Copy pathMakefile
File metadata and controls
53 lines (40 loc) · 1.57 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
48
49
50
51
52
53
.PHONY: help install format lint type test smoke clean run
# Virtual environment configuration
VENV := .venv
PYTHON := $(VENV)/bin/python
UV := ~/.local/bin/uv
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Create venv and install all dependencies
@if [ ! -d "$(VENV)" ]; then \
echo "Creating virtual environment..."; \
$(UV) venv $(VENV); \
fi
@echo "Installing dependencies..."
$(UV) sync --all-extras
@echo ""
@echo "✓ Installation complete!"
@echo ""
@echo "To activate the virtual environment, run:"
@echo " source $(VENV)/bin/activate"
format: install ## Format code with ruff
$(UV) run ruff format .
lint: install ## Lint code with ruff
$(UV) run ruff check . --fix
type: install ## Type check with mypy
$(UV) run mypy src/streamfox
test: install ## Run tests with pytest
$(UV) run pytest -v --cov=src/streamfox --cov-report=term-missing
smoke: install ## Run all checks in parallel with tox (format, lint, type, test)
$(UV) run tox run-parallel
clean: ## Clean all build artifacts, cache, logs, venv per .gitignore
git clean -fXd
@echo "✓ Cleaned all artifacts"
run: install ## Run streamfox CLI
$(UV) run streamfox
run-debug: install ## Run streamfox with debug logging
$(UV) run streamfox --debug
run-url: install ## Run streamfox with a specific URL (usage: make run-url URL=https://example.com/stream)
$(UV) run streamfox --url $(URL)
monitor: install ## Run in monitor mode
$(UV) run streamfox --monitor