fix: polish the makefile to provide help command (#518)

This commit is contained in:
Willem Jiang
2025-08-20 09:51:42 +08:00
committed by GitHub
parent 3b4e993531
commit 44d328f696
2 changed files with 17 additions and 9 deletions

1
.gitignore vendored
View File

@@ -22,6 +22,7 @@ conf.yaml
.idea/
.langgraph_api/
.DS_Store
# coverage report
coverage.xml

View File

@@ -1,22 +1,29 @@
.PHONY: lint format install-dev serve test coverage
.PHONY: help lint format install-dev serve test coverage langgraph-dev
install-dev:
help: ## Show this help message
@echo "Deer Flow - Available Make Targets:"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Usage: make <target>"
install-dev: ## Install development dependencies
uv pip install -e ".[dev]" && uv pip install -e ".[test]"
format:
format: ## Format code using ruff
uv run ruff format --config pyproject.toml .
lint:
lint: ## Lint and fix code using ruff
uv run ruff check --fix --select I --config pyproject.toml .
serve:
serve: ## Start development server with reload
uv run server.py --reload
test:
test: ## Run tests with pytest
uv run pytest tests/
langgraph-dev:
langgraph-dev: ## Start langgraph development server
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.12 langgraph dev --allow-blocking
coverage:
uv run pytest --cov=src tests/ --cov-report=term-missing --cov-report=xml
coverage: ## Run tests with coverage report
uv run pytest --cov=src tests/ --cov-report=term-missing --cov-report=xml