-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 2 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 2 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
.PHONY: lint-docs format-docs build-docs serve-docs serve-clean-docs clean-docs codespell build-typedoc doctest
build-docs:
uv run --group docs --with-editable . python -m mkdocs build --clean -f docs/mkdocs.yml --strict
serve-clean-docs: clean-docs
uv run --group docs --with-editable . python -m mkdocs serve -c -f docs/mkdocs.yml --strict -w ./src/langmem
serve-docs: build-typedoc
uv run --group docs --with-editable . python -m mkdocs serve -f docs/mkdocs.yml -w ./src/langmem -w README.md
## Run format against the project documentation.
format-docs:
uv run ruff format docs/docs
uv run ruff check --fix docs/docs
doctest:
@echo "Starting langgraph server..."
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev --no-browser > /dev/null 2>&1 & echo $$! > .langgraph.pid
@echo "Waiting for server to start..."
@sleep 2
@echo "Running tests..."
uv run --with-editable . python -m pytest --capture=no tests/test_docstring_examples.py -vvv -n auto $(if $(k),-k "$(k)",) || (kill `cat .langgraph.pid` && rm .langgraph.pid && exit 1)
@echo "Cleaning up server..."
@kill `cat .langgraph.pid` && rm .langgraph.pid
doctest-watch:
@echo "Starting langgraph server..."
uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev --no-browser > /dev/null 2>&1 & echo $$! > .langgraph.pid
@echo "Waiting for server to start..."
@sleep 2
@echo "Starting test watcher..."
PYTHONPATH=src uv run --with-editable . ptw tests/test_docstring_examples.py -- -vvv --last-failed --new-first $(if $(k),-k='$(k)',) || (kill `cat .langgraph.pid` && rm .langgraph.pid && exit 1)
@echo "Cleaning up server..."
@kill `cat .langgraph.pid` && rm .langgraph.pid
format:
uv run ruff format ./src
uv run ruff check --fix ./src
lint:
uv run ruff format --check ./src
uv run ruff check ./src
# Check the docs for linting violations
lint-docs:
uv run ruff format --check docs/docs
uv run ruff check docs/docs
uv run ruff format --check docs/docs
uv run ruff check docs/docs