forked from miguelsimon/site2graph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 693 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 693 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
py_dirs := site2graph
py_files = $(wildcard site2graph/*.py) $(wildcard site2graph/spiders/*.py)
.PHONY: fmt
fmt: env_ok
env/bin/isort -sp .isort.cfg $(py_dirs)
env/bin/black $(py_files)
.PHONY: check
check: env_ok
env/bin/python -m mypy \
--check-untyped-defs \
--ignore-missing-imports \
$(py_dirs)
env/bin/python -m flake8 --select F $(py_dirs)
env/bin/isort -sp .isort.cfg $(py_dirs) --check
env/bin/black --check $(py_files)
.PHONY: test
test: check
env/bin/python -m unittest discover $(py_dirs) -p "*.py"
env_ok: requirements.txt
rm -rf env env_ok
python3 -m venv env
env/bin/pip install -r requirements.txt
touch env_ok
.PHONY: clean
clean:
rm -rf env env_ok