-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (27 loc) · 802 Bytes
/
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
.PHONY: install
install:
@if ! command -v pyenv &> /dev/null; then \
echo "Error: pyenv is not installed. Visit https://github.com/pyenv/pyenv#installation for installation instructions."; \
exit 1; \
fi
@if ! command -v poetry &> /dev/null; then \
echo "Error: poetry is not installed. Visit https://python-poetry.org/docs/#installation for installation instructions."; \
exit 1; \
fi
@if [ -z "$$(pyenv versions | grep '3\.10\..*')" ]; then \
pyenv install 3.10; \
else \
echo "Python 3.10 is already installed."; \
fi
poetry env use 3.10
poetry install
poetry run pre-commit install
.PHONY: run
run:
python src/main.py
.PHONY: pre-commit
pre-commit:
poetry run pre-commit run --all-files
.PHONY: test
test:
poetry run pytest -s -vv --cov=. --cov-branch --cov-report=html