-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (48 loc) · 1.64 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:
isort . -c
ruff check .
mypy
pydocstyle
black --check .
bandit -r . -c pyproject.toml
# this target runs checks on all files and potentially modifies some of them
style:
isort .
black .
ruff --fix .
# Pin the dependencies
lock:
poetry lock
# Build the docker
build:
poetry export -f requirements.txt --without-hashes --output src/app/requirements.txt
docker build src/. -t pyronear/storage-api:python3.8-alpine3.10
# Run the docker
run:
poetry export -f requirements.txt --without-hashes --output src/app/requirements.txt
docker-compose up -d --build
# Run the docker
stop:
docker-compose down
run-dev:
poetry export -f requirements.txt --without-hashes --output src/app/requirements.txt
poetry export -f requirements.txt --without-hashes --with dev --output src/requirements-dev.txt
docker build src/. -t pyronear/storage-api:python3.8-alpine3.10
docker-compose -f docker-compose-dev.yml up -d --build
stop-dev:
docker-compose -f docker-compose-dev.yml down
# Run tests for the library
test:
poetry export -f requirements.txt --without-hashes --output src/app/requirements.txt
poetry export -f requirements.txt --without-hashes --with dev --output src/requirements-dev.txt
docker build src/. -t pyronear/storage-api:python3.8-alpine3.10
docker-compose -f docker-compose-dev.yml up -d --build
docker-compose exec -T backend coverage run -m pytest tests/
docker-compose -f docker-compose-dev.yml down
# Run tests for the Python client
test-client:
cd client && coverage run -m pytest tests/
# Check that docs can build for client
docs:
sphinx-build client/docs/source client/docs/_build -a