-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (48 loc) · 1.65 KB
/
Makefile
File metadata and controls
66 lines (48 loc) · 1.65 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
all: setup-env-variables setup-git-hooks install check test build-watch
build-watch:
docker compose up --build --watch
check: check-format check-lint check-types
check-format:
uv run ruff format . --diff
check-lint:
uv run ruff check .
check-types:
uv run mypy .
index-documents:
mush-wikis-scrap > data/wikis.json
rm -rf chroma
uv run emush_rag/cli/index_documents.py
scp -P 49512 -r ./chroma askneron@cmnemoi.com:~/www/new_chroma
ssh askneron@cmnemoi.com -p 49512 "rm -rf ~/www/chroma && mv ~/www/new_chroma ~/www/chroma && rm -rf ~/www/new_chroma"
ssh askneron@cmnemoi.com -p 49512 "docker compose -f compose.prod.yml down && docker compose -f compose.prod.yml up -d --remove-orphans"
install:
uv lock
uv sync --locked --group dev --group lint --group test
lint:
uv run ruff format .
uv run ruff check . --fix
semantic-release:
uv run semantic-release version --no-changelog --no-push --no-vcs-release --skip-build --no-commit --no-tag
uv lock
git add pyproject.toml uv.lock
git commit --allow-empty --amend --no-edit
setup-env-variables:
cp .env.example .env
setup-git-hooks:
chmod +x hooks/pre-commit
chmod +x hooks/pre-push
chmod +x hooks/post-commit
git config core.hooksPath hooks
run:
docker compose up -d --watch
run-lite:
docker compose -f compose.dev.yml up --watch
test:
uv run python -m pytest -v --cov=emush_rag --cov-report=xml
test-fast:
uv run python -m pytest -v tests/unit tests/integration
upgrade-dependencies:
uv lock --upgrade
watch:
docker compose up --watch
.PHONY: all build-watch check check-format check-lint check-types install lint semantic-release setup-env-variables setup-git-hooks test upgrade-dependencies