-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (24 loc) · 792 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
31
POETRY_HOME := ${HOME}/.local/bin
export PATH := ${POETRY_HOME}:$(PATH)
.PHONY: help install ensure-poetry install-poetry install-precommits test
help:
@echo "Relevant targets are 'install' and 'test'."
install:
@$(MAKE) ensure-poetry
@$(MAKE) install-precommits
ensure-poetry:
@if [ "$(shell which poetry)" = "" ]; then \
$(MAKE) install-poetry; \
else \
echo "Found existing Poetry installation at $(shell which poetry)."; \
fi
@poetry install
install-poetry:
@echo "Installing Poetry..."
curl -sSL https://install.python-poetry.org | python3 -
# TODO verify installation
install-precommits:
@poetry run pre-commit autoupdate
@poetry run pre-commit install --overwrite --install-hooks
test:
@poetry run pytest --cov=src --cov-fail-under 80 --cov-report term-missing