-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 1.29 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
56
57
58
59
60
61
62
63
64
65
66
67
68
# ******************************************************************************
#
# vocutil, educational vocabulary utilities.
#
# Copyright 2022-2024 Jeremy A Gray <gray@flyquackswim.com>.
#
# All rights reserved.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# ******************************************************************************
python-modules = vocutil
python-files =
.PHONY : test-all
test-all:
pytest -vv --cov vocutil --cov-report term --cov-report html
.PHONY : build
build : docs
pip install -q build
python -m build
.PHONY : clean
clean :
rm -rf build
rm -rf dist
rm -rf *.egg-info
cd docs && make clean
.PHONY : dist
dist : clean build
.PHONY : docs
docs :
cd docs && make html
.PHONY : commit
commit :
pre-commit run --all-files
.PHONY : lint
lint :
flake8 --exit-zero $(python-modules) $(python-files)
isort --check $(python-modules) $(python-files) || exit 0
black --check $(python-modules) $(python-files)
.PHONY : lint-fix
lint-fix :
isort $(python-modules) $(python-files)
black $(python-modules) $(python-files)
.PHONY : pip
pip :
pip install -r requirements.txt
.PHONY : test
test :
pytest
.PHONY : upload
upload :
python3 -m twine upload --verbose dist/*
.PHONY : upload-test
upload-test :
python3 -m twine upload --verbose --repository testpypi dist/*