-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
31 lines (24 loc) · 871 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
python_version := `python -c 'import sys; print(sys.version_info.major)'`
python_files := find . -path '*/.*' -prune -o -name '*.py' -print0
all: install test lint
clean:
find . \( -name '*.pyc' -o -name '*.pyo' -o -name '*~' \) -print -delete >/dev/null
find . -name '__pycache__' -exec rm -rvf '{}' + >/dev/null
rm -fr *.egg-info
install:
pip install -e .
@if [ "$(python_version)" = "2" ]; then pip install -r python27_requirements.txt; fi
pip install -r dev_requirements.txt
test: clean install
py.test -vv --cov=important tests/
important -v
coverage:
py.test -vv --cov=important --cov-report html tests/
autopep8:
@echo 'Auto Formatting...'
@$(python_files) | xargs -0 autopep8 --max-line-length 120 --jobs 0 --in-place --aggressive
lint:
flake8 --ignore D .
@echo 'Linting...'
@pylint --rcfile=pylintrc important tests
@flake8