forked from alexzhang13/rlm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (45 loc) · 1.58 KB
/
Makefile
File metadata and controls
58 lines (45 loc) · 1.58 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
55
56
57
58
.PHONY: help install install-dev install-modal run-all \
quickstart docker-repl lm-repl modal-repl \
lint format test check
help:
@echo "RLM Examples Makefile"
@echo ""
@echo "Usage:"
@echo " make install - Install base dependencies with uv"
@echo " make install-dev - Install dev dependencies with uv"
@echo " make install-modal - Install modal dependencies with uv"
@echo " make run-all - Run all examples (requires all deps and API keys)"
@echo ""
@echo "Examples:"
@echo " make quickstart - Run quickstart.py (needs OPENAI_API_KEY)"
@echo " make docker-repl - Run docker_repl_example.py (needs Docker)"
@echo " make lm-repl - Run lm_in_repl.py (needs PORTKEY_API_KEY)"
@echo " make modal-repl - Run modal_repl_example.py (needs Modal)"
@echo ""
@echo "Development:"
@echo " make lint - Run ruff linter"
@echo " make format - Run ruff formatter"
@echo " make test - Run tests"
@echo " make check - Run lint + format + tests"
install:
uv sync
install-dev:
uv sync --group dev --group test
install-modal:
uv pip install -e ".[modal]"
run-all: quickstart docker-repl lm-repl modal-repl
quickstart: install
uv run python -m examples.quickstart
docker-repl: install
uv run python -m examples.docker_repl_example
lm-repl: install
uv run python -m examples.lm_in_repl
modal-repl: install-modal
uv run python -m examples.modal_repl_example
lint: install-dev
uv run ruff check .
format: install-dev
uv run ruff format .
test: install-dev
uv run pytest
check: lint format test