forked from abilian/olapy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (57 loc) · 1.2 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
.PHONY: all default run test test-with-coverage clean develop lint tidy format
PKG=olapy
default: test lint
all: default
run:
flask runserver
#
# 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"
poetry install
@echo "--> Activating pre-commit hook"
pre-commit install
@echo ""
#
# Linting
#
lint: lint-python
lint-ci: lint
lint-python:
@echo "--> Linting Python files"
@make lint-flake8
@make lint-mypy
lint-flake8:
flake8 src tests
lint-pylint:
@echo "Running pylint, some errors reported might be false positives"
-pylint -E --rcfile .pylint.rc src
lint-mypy:
mypy src tests
#
# Cleanup
#
clean:
rm -rf **/*.pyc **/.DS_Store
find . -name cache -type d -delete
find . -type d -empty -delete
rm -rf .mypy_cache migration.log build dist *.egg .coverage htmlcov
rm -rf doc/_build static/gen static/.webassets-cache instance/webassets
tidy: clean
rm -rf .tox .nox
format:
black src tests micro_bench demos *.py
isort src tests micro_bench demos *.py
update-deps:
poetry update
publish: clean
poetry build
twine upload dist/*