-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (46 loc) · 1.65 KB
/
Copy pathMakefile
File metadata and controls
59 lines (46 loc) · 1.65 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
54
55
56
57
58
59
MD_FILES := $(shell git ls-files '*.md')
COLOR_CYAN := \033[36m
COLOR_RESET := \033[0m
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help message
@awk 'BEGIN {FS = ":.*##"; printf "Usage: make [options] $(COLOR_CYAN)[target] ...$(COLOR_RESET)\n\n"} \
/^[a-zA-Z_-]+:.*##/ {printf " $(COLOR_CYAN)%-16s$(COLOR_RESET) %s\n", $$1, $$2}' \
$(MAKEFILE_LIST)
.PHONY: sync
sync: ## Sync the development environment
uv sync
.PHONY: sync-llm
sync-llm: ## Sync the development environment with optional LLM dependencies
uv sync --extra llm
.PHONY: sync-cuda
sync-cuda: ## Sync the development environment and build pywhispercpp from source for CUDA
GGML_CUDA=1 uv sync \
--reinstall-package pywhispercpp \
--no-binary-package pywhispercpp
.PHONY: format
format: ## Format Markdown and Python sources
uv run mdformat $(MD_FILES)
uv run ruff format .
.PHONY: lint
lint: ## Run Markdown, Ruff, and type checks
uv run mdformat --check $(MD_FILES)
uv run pymarkdown scan $(MD_FILES)
uv run ruff format --check .
uv run ruff check .
uv run ty check webinar_transcriber
.PHONY: test
test: ## Run the fast pytest subset (skips slow tests, no coverage)
uv run pytest --no-cov -m "not slow"
.PHONY: test-all
test-all: ## Run the full pytest suite with coverage
uv run pytest
.PHONY: check
check: lint test-all ## Run lint and the full test suite
.PHONY: clean
clean: ## Remove caches and build artifacts
rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache coverage.xml dist build
find webinar_transcriber -type d -name __pycache__ -prune -exec rm -rf {} +
.PHONY: distclean
distclean: clean ## Remove caches, build artifacts, and the local environment
rm -rf .venv