-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (36 loc) · 1.01 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
# Unit test configuration (pytest)
# config goes to pytest.ini (pyproject.toml to be supported)
test:
@pytest test/unit
# runs only integration tests
testint:
@pytest test/integration
# finds all tests with test discovery
testall:
@pytest test
# run specific unit test
test_%:
@pytest test/unit/[email protected] --rootdir=./
# Generate documentation
doc:
@$(MAKE) -C docs html
servedoc:
@cd docs && python3.6 watch.py
initial-python-setup:
python3.6 -m venv .venv
. .venv/bin/activate; pip install .[dev]
# Utililies
PROJECT := cryptle
CLASS_DIAG := classes_$(PROJECT)
PACK_DIAG := packages_$(PROJECT)
# pyreverse comes with pylint, dot needs to separately installed
uml:
@pyreverse -k cryptle -p $(PROJECT)
@dot -Tpng $(CLASS_DIAG).dot > $(CLASS_DIAG).png
@dot -Tpng $(PACK_DIAG).dot > $(PACK_DIAG).png
@rm $(CLASS_DIAG).dot $(PACK_DIAG).dot
clean:
rm -rf **/__pycache__
rm -f $(CLASS_DIAG).png $(PACK_DIAG).png
$(MAKE) -C docs clean
.PHONY: install doc test testall testslow testpluging clean lint uml format