-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (30 loc) · 837 Bytes
/
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
.PHONY : develop clean clean_pyc lint-diff black test coverage
# Trick to get the args right after the target
ARGS = $(filter-out $@,$(MAKECMDGOALS))
clean:
-python setup.py clean
clean_pyc:
-find ./tests -name "*.py[co]" -exec rm {} \;
-find ./lighttree -name "*.py[co]" -exec rm {} \;
lint-diff:
git diff upstream/master --name-only -- "*.py" | xargs flake8
lint:
python -m flake8 lighttree
black:
black lighttree tests setup.py
mypy:
mypy lighttree --disallow-untyped-defs
check: mypy black lint
develop:
-python -m pip install -e ".[develop]"
test:
-python -m pytest
coverage:
-coverage run --source=./lighttree -m pytest
coverage report
create_dist:
python setup.py sdist bdist_wheel
test_dist: create_dist
twine upload --skip-existing -r testpypi dist/*
upload_dist:
twine upload --skip-existing dist/*