-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (46 loc) · 1009 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# Settings
#
SOURCE_FILES = *.py
LINTER_CONFIGS = https://git.confirm.ch/confirm/development-guidelines/raw/master/configs
PYPI_INDEX = https://pypi.confirm.ch/
#
# Cleanup
#
clean: clean-cache clean-test clean-venv
clean-cache:
find . -name '__pycache__' -delete
clean-test:
rm -vf .coverage coveragerc .isort.cfg .pylintrc tox.ini
clean-venv:
rm -vrf .venv
#
# Install
#
venv:
python3 -m venv .venv
develop: install
pip3 install -i $(PYPI_INDEX) -r requirements-dev.txt
install:
pip3 install -r requirements.txt
#
# Development
#
isort:
curl -sSfLo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
isort $(SOURCE_FILES)
#
# Test
#
test-commits:
git tools validate
test-isort:
curl -sSfLo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
isort -c --diff $(SOURCE_FILES)
test-pycodestyle:
curl -sSfLo tox.ini $(LINTER_CONFIGS)/tox.ini
pycodestyle $(SOURCE_FILES)
test-pylint:
curl -sSfLo .pylintrc $(LINTER_CONFIGS)/pylintrc
pylint $(SOURCE_FILES)
test: test-isort test-pycodestyle test-pylint