generated from marcieltorres/python-boilerplate-project
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
51 lines (35 loc) · 1.04 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
APP_NAME="iec-api"
################################
# COMMANDS TO RUN LOCALLY
################################
local/install:
poetry install
local/tests:
poetry run pytest --cov-report=html --cov-report=term --cov .
local/lint:
poetry run ruff check .
poetry run ruff . --fix --exit-non-zero-on-fix
local/lint/fix:
poetry run black .
local/run:
poetry run python src/main.py
############################################
# COMMANDS TO RUN USING DOCKER (RECOMMENDED)
############################################
docker/install:
docker compose build ${APP_NAME}
docker/up:
docker compose up -d
docker/down:
docker compose down --remove-orphans
docker/test:
docker compose run ${APP_NAME} poetry run pytest --cov-report=html --cov-report=term --cov .
docker/lint:
docker compose run ${APP_NAME} poetry run ruff check .
docker/lint/fix:
docker compose run ${APP_NAME} poetry run ruff . --fix --exit-non-zero-on-fix
docker/run:
docker compose run ${APP_NAME} poetry run python src/main.py
##################
# HEPFUL COMMANDS
##################