-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
58 lines (47 loc) · 1.7 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
53
54
55
56
57
58
# 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 pyronear/alert-api:latest
# Run the docker
run:
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker compose up -d --build --wait
# Run the docker
stop:
docker compose down
# Run tests for the library
# the "-" are used to launch the next command even if a command fail
test:
poetry export -f requirements.txt --without-hashes --with test --output requirements.txt
docker compose -f docker-compose.dev.yml up -d --build --wait
- docker compose -f docker-compose.dev.yml exec -T backend pytest --cov=app
docker compose -f docker-compose.dev.yml down
build-client:
pip install -e client/.
# Run tests for the Python client
# the "-" are used to launch the next command even if a command fail
test-client: build-client
poetry export -f requirements.txt --without-hashes --output requirements.txt
docker compose -f docker-compose.dev.yml up -d --build --wait
- cd client && pytest --cov=pyroclient tests/ && cd ..
docker compose -f docker-compose.dev.yml down
# Check that docs can build for client
docs-client:
sphinx-build client/docs/source client/docs/_build -a
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