mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix: polish the makefile to provide help command (#518)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,6 +22,7 @@ conf.yaml
|
||||
|
||||
.idea/
|
||||
.langgraph_api/
|
||||
.DS_Store
|
||||
|
||||
# coverage report
|
||||
coverage.xml
|
||||
|
||||
25
Makefile
25
Makefile
@@ -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
|
||||
Reference in New Issue
Block a user