-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (44 loc) · 1.55 KB
/
Makefile
File metadata and controls
54 lines (44 loc) · 1.55 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
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TESTPATH := $(ROOT_DIR)/tests/
.PHONY: install
install: # Install virtual environment with uv
@echo "🚀 Creating virtual environment using uv"
@uv sync
.PHONY: check
check: # Check lock file consistency and run static code analysis
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
@uv lock --locked
@echo "🚀 Linting code: Running ruff"
@uvx ruff check --fix
@echo "🚀 Static type checking: Running mypy"
@uv run mypy
@echo "🚀 Checking for obsolete dependencies: Running deptry"
@uv run deptry bq_agent_app
.PHONY: test
test: # Run all tests
@echo "🚀 Testing code: Running pytest"
@uv run python -m pytest $(TESTPATH) \
--cov \
--cov-config=pyproject.toml \
--cov-report=xml:coverage.xml \
--cov-report=term-missing \
--junitxml=junit.xml
.PHONY: web
web: # Run the ADK web demo server
@uv run adk web --reload
.PHONY: api_server
api_server: # Run the ADK FastAPI server
@uv run adk api_server
.PHONY: help
help:
@uv run python -c "import re; \
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
.PHONY: evaluation_prep
evaluation_prep:
@echo "Populating evaluation dataset with new BigQuery job IDs..."
@bash eval_resources/populate_evaluation_dataset.sh
.PHONY: evaluate
evaluate: install # Run the evaluation script
@echo "📊 Running evaluation agent"
@uv run python evaluate_agent.py
.DEFAULT_GOAL := help11