-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (25 loc) · 819 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
32
33
34
35
36
37
# Makefile for poetry-torch
VENV_NAME := .venv
.PHONY: all install clean realclean test testclean lock lockclean lint
all: lint install
install: $(VENV_NAME)
@echo "\nTo start, please run\npoetry shell\n"
$(VENV_NAME):
poetry install
clean: testclean
find python -type f -name '*.py[co]' -exec rm -fv {} +
find python -type d -name __pycache__ -exec rm -rfv {} +
realclean: clean
poetry env remove --all
test:
cd tests && pytest && cd ..
testclean:
find tests -type f -name '*.py[co]' -exec rm -fv {} +
find tests -type d -name __pycache__ -exec rm -rfv {} +
find tests -type d -name .pytest_cache -exec rm -rfv {} +
lock:
poetry lock
lockclean:
find . -maxdepth 1 -type f -name poetry.lock -exec rm -fv {} +
lint:
flake8 python tests --count --select=E9,F63,F7,F82 --show-source --statistics