forked from 0b01001001/spectree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 924 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
check: lint test
SOURCE_FILES=spectree tests examples setup.py
install:
pip install -e .[email,flask,falcon,starlette,dev]
test:
pip install -U -e .[email,flask,falcon,starlette]
pytest tests -vv -rs
doc:
cd docs && make html
opendoc:
cd docs/build/html && python -m http.server
clean:
rm -rf build/ dist/ *.egg-info .pytest_cache
find . -name '*.pyc' -type f -exec rm -rf {} +
find . -name '__pycache__' -exec rm -rf {} +
package: clean
python -m build
publish: package
twine upload dist/*
format:
autoflake --in-place --recursive --remove-all-unused-imports --ignore-init-module-imports ${SOURCE_FILES}
isort --project=spectree ${SOURCE_FILES}
black ${SOURCE_FILES}
lint:
isort --check --diff --project=spectree ${SOURCE_FILES}
black --check --diff ${SOURCE_FILES}
flake8 ${SOURCE_FILES} --count --show-source --statistics
mypy --install-types --non-interactive ${SOURCE_FILES}
.PHONY: test doc