-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
68 lines (55 loc) · 2.03 KB
/
Copy pathjustfile
File metadata and controls
68 lines (55 loc) · 2.03 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
build-frontend:
cd src/frontend && npm run build
install-frontend:
cd src/frontend && npm install
install-backend:
cd src/backend && uv sync
uv-add *args:
cd src/backend && uv add {{args}}
install:
just install-frontend
just install-backend
local *uvicorn-args:
chmod +x local.sh && \
./local.sh {{uvicorn-args}}
deploy:
chmod +x deploy.sh && \
./deploy.sh
build-index memory-limit="1024" max-docs="-1":
cd src/backend/search_engine/scripts/ && \
chmod +x build-index.sh && \
./build-index.sh {{memory-limit}} {{max-docs}}
remove-index-files:
rm -rf src/backend/search_engine/index/bin
rm -rf src/backend/search_engine/index_builder/data/docstore
rm -rf src/backend/search_engine/index_builder/data/index
rm -rf src/backend/search_engine/index_builder/data/partial_indices
# from installed package
# caution, will override existing stubs
generate-stubs:
cd src/backend/bindings/ && \
chmod +x generate-stubs.sh && \
./generate-stubs.sh
lint:
@echo "Linting Python code..."
cd src/backend && uv run ruff check api/ search_engine/ tests/
cd src/backend && uv run ruff format --check --diff api/ search_engine/ tests/
@echo "Linting C++ code..." # only format-check instead of linting to avoid dependency-related failures
clang-format --dry-run --Werror \
src/backend/bindings/utils.cpp \
src/backend/search_engine/index_builder/index_builder.cpp \
src/backend/search_engine/index_builder/merge_partial_indices.cpp
format:
@echo "Formatting Python code..."
cd src/backend && uv run ruff format api/ search_engine/ tests/
@echo "Formatting C++ code..."
clang-format -i \
src/backend/bindings/utils.cpp \
src/backend/search_engine/index_builder/index_builder.cpp \
src/backend/search_engine/index_builder/merge_partial_indices.cpp
mypy:
@echo "Type checking with MyPy..."
cd src/backend && uv run mypy api/
cd src/backend && uv run mypy search_engine/
test:
just -f src/backend/tests/justfile test