-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 1.06 KB
/
Makefile
File metadata and controls
34 lines (26 loc) · 1.06 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
PYTHON=./.venv/bin/python
PHONY = help install format test migrations migrate run
help:
@echo "---------------HELP-----------------"
@echo "To install the project type -> make install"
@echo "To format code type -> make format"
@echo "To test the project type -> make test"
@echo "To create database migrations type -> make migrations"
@echo "To run database migrations type -> make migrate"
@echo "To run the project type -> make run"
@echo "------------------------------------"
install:
${PYTHON} -m pip install -r requirements.txt
format:
${PYTHON} -m isort src tests --force-single-line-imports
${PYTHON} -m autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place src --exclude=__init__.py
${PYTHON} -m black src tests --config pyproject.toml
${PYTHON} -m isort src tests
test:
TEST_RUN="TRUE" ${PYTHON} -m pytest tests
migrations:
alembic -c alembic.ini revision --autogenerate
migrate:
alembic -c alembic.ini upgrade head
run:
${PYTHON} -m uvicorn src.sms.adapters.entry_points.api.app:app --host 0.0.0.0 --port 8000 --reload