forked from miki725/django-url-filter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (43 loc) · 1.86 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
50
51
52
53
54
55
56
57
58
59
.PHONY: clean-pyc clean-build docs clean
help: ## show help
@grep -E '^[a-zA-Z_\-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
cut -d':' -f1- | \
sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## install all requirements including for testing
pip install -r requirements-dev.txt
install-quite: ## same as install but pipes all output to /dev/null
pip install -r requirements-dev.txt > /dev/null
clean: clean-build clean-pyc ## remove all artifacts
clean-build: ## remove build artifacts
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info
clean-pyc: ## remove Python file artifacts
-@find . -name '*.pyc' -not -path "./.tox/*" -follow -print0 | xargs -0 rm -f
-@find . -name '*.pyo' -not -path "./.tox/*" -follow -print0 | xargs -0 rm -f
-@find . -name '__pycache__' -type d -not -path "./.tox/*" -follow -print0 | xargs -0 rm -rf
clean-test: ## remove test and coverage artifacts
rm -rf .coverage coverage*
rm -rf htmlcov/
clean-test-all: clean-test ## remove all test-related artifacts including tox
rm -rf .tox/
importanize:
importanize --ci
lint: ## check style with flake8
flake8 .
python --version | grep "Python 3" && make importanize || true
test: ## run tests quickly with the default Python
py.test -sv --cov=url_filter --cov-report=term-missing --doctest-modules tests/ url_filter/
test-all: ## run tests on every Python version with tox
tox
check: lint clean-build clean-pyc clean-test test ## run all necessary steps to check validity of project
release: clean ## package and upload a release
python setup.py sdist bdist_wheel upload
dist: clean ## build python package ditribution
python setup.py sdist bdist_wheel
ls -l dist
syncdb: ## apply all migrations and load fixtures
python manage.py migrate
python manage.py migrate --run-syncdb
python manage.py loaddata one_to_one many_to_one many_to_many