forked from langchain-ai/deepagents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (25 loc) · 1.14 KB
/
Makefile
File metadata and controls
29 lines (25 loc) · 1.14 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
PYTHON_FILES=.
MYPY_CACHE=.mypy_cache
lint format: PYTHON_FILES=.
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/deepagents --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
lint_package: PYTHON_FILES=libs/deepagents
lint_tests: PYTHON_FILES=libs/deepagents/tests
lint lint_diff lint_package lint_tests:
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES) --diff
@if [ "$(LINT)" != "minimal" ]; then \
if [ "$(PYTHON_FILES)" != "" ]; then \
uv run --all-groups ruff check $(PYTHON_FILES); \
fi; \
fi
@if [ "$(LINT)" != "minimal" ]; then \
if [ "$(PYTHON_FILES)" != "" ]; then \
mkdir -p $(MYPY_CACHE) && uv run --all-groups mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE); \
fi; \
fi
format format_diff:
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
test:
uv run pytest libs/deepagents/tests/unit_tests --cov=deepagents --cov-report=term-missing
integration_test:
uv run pytest libs/deepagents/tests/integration_tests --cov=deepagents --cov-report=term-missing