-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
109 lines (85 loc) · 1.99 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.PHONY: test unit full-test clean setup stage deploy
SRC=olapy_web
PKG=$(SRC)
default: test lint
#
# testing
#
test:
pytest . --durations=10
test-with-coverage:
pytest --tb=short --cov $(PKG) --cov-report term-missing .
#
# setup
#
pip:
@echo "--> Installing / updating python dependencies for development"
pip install -q pip-tools
pip-sync requirements.txt
pip install -q -r requirements.txt -r dev-requirements.txt
pip install -e .
@echo ""
js:
cd front && yarn
develop: pip js
#
# Linting
#
lint: lint-python lint-js
lint-python:
@echo "--> Linting Python files"
flake8 $(SRC)
@echo "Checking Py3k (basic) compatibility"
-pylint --rcfile .pylint.rc --py3k *.py $(SRC)
@echo "Running pylint, some errors reported might be false positives"
-pylint -E --rcfile .pylint.rc $(SRC)
lint-js:
cd front && make lint
#
# Running web server
#
#init:
# olapy-web init
install:
cd front && yarn build
pip install -r requirements.txt
run:
python manage.py
clean:
find . -name "*.pyc" -delete
find . -name yaka.db -delete
find . -name .DS_Store -delete
find . -name cache -type d -delete
find . -type d -empty -delete
rm -f migration.log
rm -rf build dist
rm -rf tests/data tests/integration/data
rm -rf tmp tests/tmp tests/integration/tmp
rm -rf cache tests/cache tests/integration/cache
rm -rf *.egg .coverage
rm -rf doc/_build
rm -rf static/gen static/.webassets-cache instance/webassets
rm -rf htmlcov junit-*.xml
tidy: clean
rm -rf .tox
format: format-py format-js
format-py:
isort -rc $(SRC) *.py
yapf --style google -r -i $(SRC) *.py
isort -rc $(SRC) *.py
format-js:
cd front && make format
update-deps:
pip-compile -U > /dev/null
pip-compile > /dev/null
git --no-pager diff requirements.txt
sync-deps:
pip install -r requirements.txt -r dev-requirements.txt -e .
release:
git push --tags
rm -rf /tmp/olapy-web2.0
git clone . /tmp/olapy-web2.0
cd /tmp/olapy-web2.0 ; python setup.py sdist
cd /tmp/olapy-web2.0 ; python setup.py sdist upload
doc:
cd docs && make html