-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (30 loc) · 893 Bytes
/
Makefile
File metadata and controls
41 lines (30 loc) · 893 Bytes
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
UVX ?= uvx
VENV ?= env
VENV_PYTHON ?= python3
PROMPT ?= Hello from simple-agent!
VENV_BIN := $(VENV)/bin
VENV_ACTIVATE := source $(VENV_BIN)/activate
DEFAULT_PYTHON := $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,)
PYTHON ?= $(if $(DEFAULT_PYTHON),$(DEFAULT_PYTHON),python3)
PIP ?= $(PYTHON) -m pip
RUFF ?= $(UVX) ruff
PYTEST ?= $(PYTHON) -m pytest
PYTEST_ARGS ?= -vv --cov=simple_agent --cov-report=term-missing
.PHONY: venv run lint tools install clean test coverage
venv:
$(VENV_PYTHON) -m venv $(VENV)
@echo "Activate with: $(VENV_ACTIVATE)"
install:
$(PIP) install -r requirements.txt
run:
$(PYTHON) main.py "$(PROMPT)"
tools:
$(PYTHON) main.py --list-tools
test:
$(PYTEST) $(PYTEST_ARGS)
coverage:
$(PYTEST) --cov-report=xml --cov-report=term-missing --cov=simple_agent
lint:
$(RUFF) check simple_agent main.py
clean:
rm -rf $(VENV) __pycache__ .ruff_cache