-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
42 lines (34 loc) · 974 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
PYTHON?=python
SOURCES=honesty setup.py
.PHONY: venv
venv:
$(PYTHON) -m venv .venv
source .venv/bin/activate && make setup
@echo 'run `source .venv/bin/activate` to use virtualenv'
# The rest of these are intended to be run within the venv, where python points
# to whatever was used to set up the venv.
.PHONY: setup
setup:
python -m pip install -Ue .[dev,test]
.PHONY: test
test:
python -m coverage run -m honesty.tests $(TESTOPTS)
python -m coverage report
.PHONY: format
format:
python -m ufmt format $(SOURCES)
.PHONY: lint
lint:
touch honesty/__version__.py
python -m ufmt check $(SOURCES)
python -m flake8 $(SOURCES)
python -m checkdeps --allow-names honesty --metadata-extras orjson honesty
mypy --strict --install-types --non-interactive honesty
.PHONY: pessimist
pessimist:
python -m pessimist --fast --requirements= -c 'python -m honesty --help' .
.PHONY: release
release:
rm -rf dist
python setup.py sdist bdist_wheel
twine upload dist/*