forked from langchain-ai/open-swe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (52 loc) · 1.59 KB
/
Makefile
File metadata and controls
68 lines (52 loc) · 1.59 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
59
60
61
62
63
64
65
66
67
68
.PHONY: all format format-check lint test tests integration_tests help run dev
# Default target executed when no arguments are given to make.
all: help
######################
# DEVELOPMENT
######################
dev:
langgraph dev
run:
uvicorn agent.webapp:app --reload --port 8000
install:
uv pip install -e .
######################
# TESTING
######################
TEST_FILE ?= tests/
test tests:
@if [ -d "$(TEST_FILE)" ] || [ -f "$(TEST_FILE)" ]; then \
uv run pytest -vvv $(TEST_FILE); \
else \
echo "Skipping tests: path not found: $(TEST_FILE)"; \
fi
integration_tests:
@if [ -d "tests/integration_tests/" ] || [ -f "tests/integration_tests/" ]; then \
uv run pytest -vvv tests/integration_tests/; \
else \
echo "Skipping integration tests: path not found: tests/integration_tests/"; \
fi
######################
# LINTING AND FORMATTING
######################
PYTHON_FILES=.
lint:
uv run ruff check $(PYTHON_FILES)
uv run ruff format $(PYTHON_FILES) --diff
format:
uv run ruff format $(PYTHON_FILES)
uv run ruff check --fix $(PYTHON_FILES)
format-check:
uv run ruff format $(PYTHON_FILES) --check
######################
# HELP
######################
help:
@echo '----'
@echo 'dev - run LangGraph dev server'
@echo 'run - run webhook server'
@echo 'install - install dependencies'
@echo 'format - run code formatters'
@echo 'lint - run linters'
@echo 'test - run unit tests'
@echo 'integration_tests - run integration tests'