This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
52 lines (43 loc) · 1.76 KB
/
Makefile
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
# this target runs checks on all files
quality:
ruff format --check .
ruff check .
mypy
# this target runs checks on all files and potentially modifies some of them
style:
ruff format .
ruff check --fix .
# Pin the dependencies
lock:
poetry lock --no-update
# Build the docker
build:
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker build -f src/Dockerfile . -t quackai/companion:latest
poetry export -f requirements.txt --without-hashes --only demo --output demo/requirements.txt
docker build -f demo/Dockerfile . -t quackai/gradio:latest
# Run the docker
run:
poetry export -f requirements.txt --without-hashes --output requirements.txt
poetry export -f requirements.txt --without-hashes --only demo --output demo/requirements.txt
docker compose up -d --build --wait
# Run the docker
stop:
docker compose down
run-dev:
poetry export -f requirements.txt --without-hashes --with test --output requirements.txt
docker compose -f docker-compose.dev.yml -f docker-compose.override.yml up -d --build --wait
stop-dev:
docker compose -f docker-compose.dev.yml -f docker-compose.override.yml down
# Run tests for the library
test:
poetry export -f requirements.txt --without-hashes --with test --output requirements.txt
docker compose -f docker-compose.dev.yml -f docker-compose.override.yml up -d --build --wait
docker compose -f docker-compose.dev.yml -f docker-compose.override.yml exec -T backend pytest --cov=app
docker compose -f docker-compose.dev.yml -f docker-compose.override.yml down
# Run tests for the library
e2e:
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker compose -f docker-compose.dev.yml up -d --build --wait
python scripts/test_e2e.py
docker compose -f docker-compose.dev.yml down