-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 1.33 KB
/
Makefile
File metadata and controls
36 lines (26 loc) · 1.33 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
.PHONY: generate install test lint fmt typecheck docs clean help
PYTHON ?= python3.10
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
generate: ## Regenerate client code from OpenAPI specs
bash generate.sh
install: ## Install the package in editable mode with dev extras
$(PYTHON) -m pip install -e ".[dev]"
test: ## Run tests
pytest tests/ -v --tb=short
lint: ## Lint and check formatting (ruff)
ruff check src/kb_cloud_client/*.py tests/ examples/
ruff format --check src/kb_cloud_client/*.py tests/ examples/
fmt: ## Auto-format and fix code with ruff
ruff format src/kb_cloud_client/*.py tests/ examples/
ruff check --fix src/kb_cloud_client/*.py tests/ examples/
typecheck: ## Run mypy type checks
mypy src/kb_cloud_client/ --ignore-missing-imports
docs: ## Build API reference docs locally (open site/kb_cloud_client/index.html)
pdoc --output-directory site --no-show-source kb_cloud_client
@echo "Docs built → open site/kb_cloud_client/index.html"
clean: ## Remove build artifacts and caches
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
rm -rf build/ dist/ *.egg-info/ src/*.egg-info/ .mypy_cache/ .pytest_cache/ htmlcov/ .coverage site/