forked from abilian/olapy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (65 loc) · 1.67 KB
/
Makefile
File metadata and controls
82 lines (65 loc) · 1.67 KB
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
.PHONY: test unit full-test clean setup stage deploy
SRC=olapy
PKG=$(SRC)
default: test
#
# testing
#
test:
pytest . --durations=10
test-with-coverage:
pytest --tb=short --cov $(PKG) --cov-report term-missing .
#
# setup
#
develop:
@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 ""
#
# Linting
#
lint: lint-python
lint-python:
@echo "--> Linting Python files"
-flake8 $(SRC) tests
@echo "Checking Py3k (basic) compatibility"
-pylint --rcfile .pylint.rc --py3k *.py $(SRC) tests
@echo "Running pylint, some errors reported might be false positives"
-pylint -E --rcfile .pylint.rc $(SRC)
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:
isort -rc $(SRC) tests *.py
yapf --style google -r -i $(SRC) tests *.py
isort -rc $(SRC) tests *.py
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
git clone . /tmp/olapy
cd /tmp/olapy ; python setup.py sdist
cd /tmp/olapy ; python setup.py sdist upload