generated from techservicesillinois/secdev-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 726 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 726 Bytes
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
VENV_PYTHON:=venv/bin/python
SRCS:=$(shell find src tests -name '*.py')
all: test
venv: requirements-test.in requirements.in
rm -rf $@
python -m venv venv
$(VENV_PYTHON) -m pip install -r $^
# Install dependencies from pyproject.toml
$(VENV_PYTHON) -m pip install -e .
lint: venv .lint
.lint: $(SRCS) $(TSCS)
$(VENV_PYTHON) -m flake8 $?
touch $@
static: venv .static
.static: $(SRCS) $(TSCS)
echo "Code: $(SRCS)"
echo "Test: $(TSCS)"
$(VENV_PYTHON) -m mypy $^
touch $@
autopep8:
autopep8 --in-place $(SRCS)
unit: venv
$(VENV_PYTHON) -m pytest
test: lint static unit
clean:
rm -rf .lint .static
rm -rf .mypy_cache
-find src -type d -name __pycache__ -exec rm -fr "{}" \;
force-clean: clean
rm -rf venv