-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 1.09 KB
/
Copy pathMakefile
File metadata and controls
42 lines (30 loc) · 1.09 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
.PHONY: install test lint format clean sync search api setup rebuild install-test-deps
PYTHON = .venv/Scripts/python.exe
PYTEST = .venv/Scripts/pytest.exe
RUFF = .venv/Scripts/ruff.exe
MYPY = .venv/Scripts/mypy.exe
install:
$(PYTHON) -m pip install -e ".[dev]"
.venv/Scripts/pre-commit.exe install
install-test-deps:
$(PYTHON) -m pip install tree-sitter-python tree-sitter-javascript types-aiofiles
test: install-test-deps
$(PYTHON) -m pytest --verbose --cov --cov-branch --cov-report=xml --cov-report=term-missing --cov-fail-under=90
lint: install-test-deps
$(PYTHON) -m prospector code_rag --profile .prospector.yaml --with-tool mypy --with-tool bandit
format:
$(RUFF) format .
$(RUFF) check --fix .
clean:
rm -rf build/ dist/ *.egg-info .pytest_cache .coverage .ruff_cache .mypy_cache
find . -name "__pycache__" -type d -exec rm -rf {} +
sync:
$(PYTHON) -m code_rag.entry.cli sync --all
search:
$(PYTHON) -m code_rag.entry.cli search "$(query)"
api:
$(PYTHON) -m code_rag.entry.cli api "$(lib)"
setup:
$(PYTHON) -m code_rag.entry.cli setup
rebuild:
$(PYTHON) -m code_rag.entry.cli rebuild