-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
55 lines (38 loc) · 1.26 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
.PHONY : develop check clean clean_pyc doc lint lint-diff black doc-references coverage tests
ELASTICSEARCH_URL="localhost:9200"
clean:
-python setup.py clean
clean_pyc:
-find ./tests -name "*.py[co]" -exec rm {} \;
-find ./pandagg -name "*.py[co]" -exec rm {} \;
lint-diff:
git diff upstream/master --name-only -- "*.py" | xargs flake8
lint:
# ignore "line break before binary operator", and "invalid escape sequence '\_'" useful for doc
flake8 --count --ignore=W503,W605 --show-source --statistics pandagg
# on tests, more laxist: allow "missing whitespace after ','" and "line too long"
flake8 --count --ignore=W503,W605,E231,E501 --show-source --statistics tests
black:
black examples docs pandagg tests setup.py
develop:
-python -m pip install -e ".[develop]"
doc-references:
-make -C docs api-doc
es-up:
docker compose up elasticsearch -d
es-down:
docker compose down elasticsearch
tests:
ELASTICSEARCH_URL=${ELASTICSEARCH_URL} pytest
mypy:
mypy --install-types pandagg
coverage:
coverage run --source=./pandagg -m pytest
coverage report
check: doc-references black lint
create_dist: check
python setup.py sdist bdist_wheel
test_dist: create_dist
twine upload --skip-existing -r testpypi dist/*
upload_dist:
twine upload --skip-existing dist/*