Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (69 loc) · 3.25 KB
/
Copy pathMakefile
File metadata and controls
89 lines (69 loc) · 3.25 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
install-dependencies-dev:
uv sync --no-install-project --only-group dev
install-dependencies-examples:
uv sync --no-install-project --only-group examples
install-dependencies-main:
uv sync --no-install-project --no-default-groups
install-dependencies-all:
uv sync --no-install-project --group examples
install-pre-commit:
uv run pre-commit install --install-hooks
install:
uv sync --no-install-project
make install-pre-commit
prepare:
uv run pre-commit run --all-files
lint: prepare
lock:
uv lock
lock-upgrade:
uv lock --upgrade
test-integration:
uv run pytest tests/integration
# These tests spend nearly all their wall time blocked on provider APIs, so they parallelize well past
# the core count. `loadfile` rather than `worksteal` because several files own shared external state for
# their whole duration (the Neo4j graph wipes, the `test_user_facts` pgvector table, the `default`
# Pinecone index written by one test and read by the next) and must not be split across workers.
test-integration-with-creds:
uv run pytest tests/integration_with_creds -m "not smoke" -n auto --dist loadfile
# Smoke tests: slow, paid end-to-end production scenarios. Excluded from every default target and
# run ONLY here (gated behind the `run-smoke-tests` PR label in CI). -n auto parallelizes the
# matrix; if E2B quota / provider 429s appear, dial back to `-n 4` or group same-provider cases.
test-smoke:
uv run pytest tests -m smoke -n auto --dist worksteal
test-exclude-integration-with-creds:
uv run pytest tests --ignore=tests/integration_with_creds -m "not smoke"
test-unit:
uv run pytest tests/unit
test:
uv run pytest tests -m "not smoke"
# `pytest --cov` rather than `coverage run -m pytest`: xdist runs the tests in worker subprocesses that
# `coverage run` does not trace, which silently reports ~31% instead of ~84%. pytest-cov starts coverage
# inside each worker and combines the data. `--cov-report=` suppresses its own reporting so the three
# commands below still produce exactly the reports the coverage job consumes.
# This target includes tests/integration_with_creds, so it distributes by file for the reason given on
# test-integration-with-creds above; the exclude variant below has no such files and can split per test.
test-cov:
mkdir -p ./reports
uv run pytest --junitxml=./reports/test-results.xml -m "not smoke" tests -n auto --dist loadfile --cov --cov-report=
uv run coverage report --skip-empty --skip-covered
uv run coverage html -d ./reports/htmlcov --omit="*/test_*,*/tests.py"
uv run coverage xml -o ./reports/coverage.xml --omit="*/test_*,*/tests.py"
test-cov-exclude-integration-with-creds:
mkdir -p ./reports
uv run pytest --junitxml=./reports/test-results.xml -m "not smoke" tests --ignore=tests/integration_with_creds -n auto --dist worksteal --cov --cov-report=
uv run coverage report --skip-empty --skip-covered
uv run coverage html -d ./reports/htmlcov --omit="*/test_*,*/tests.py"
uv run coverage xml -o ./reports/coverage.xml --omit="*/test_*,*/tests.py"
build-mkdocs:
rm -rf mkdocs/
uv run python scripts/generate_mkdocs.py
cp README.md mkdocs/index.md
cp -rf docs/tutorials/ mkdocs/tutorials/
uv run mkdocs build
publish-mkdocs:
make build-mkdocs
uv run mkdocs gh-deploy --force
run-mkdocs-locally:
make build-mkdocs
uv run mkdocs serve