-
Notifications
You must be signed in to change notification settings - Fork 106
/
Makefile
52 lines (40 loc) · 1.22 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
.PHONY: dev info clean docs lint test
help:
@echo " dev install all dev and production dependencies (virtualenv is assumed)"
@echo " clean remove unwanted stuff"
@echo " lint check style with flake8"
@echo " test run tests"
@echo " build generate source and wheel dist files"
@echo " upload generate source and wheel dist files and upload them"
info:
@pipenv --version
@pipenv run python --version
env: info
pipenv install --dev --python 3.9
pipenv install black --pre --dev
dev: info
pipenv install --dev
clean:
rm -fr build
rm -fr dist
find . -name '*.pyc' -exec rm -f {} \;
find . -name '*.pyo' -exec rm -f {} \;
find . -name '*~' -exec rm -f {} \;
docs:
pipenv run epydoc --html --config epydoc.conf
lint: clean
pipenv run flake8 parsedatetime > violations.txt
pipenv run mypy parsedatetime >> violations.txt
test: clean
pipenv run pytest
coverage: clean
@pipenv run coverage run --source=parsedatetime setup.py test
@pipenv run coverage html
@pipenv run coverage report
check: clean lint
pipenv run python setup.py check
build: check
pipenv run python setup.py sdist bdist_wheel
# requires PyPI Twine - brew install pypi-twine
upload: build
twine upload dist/*