-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
93 lines (77 loc) · 1.71 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.PHONY: build clean docs-html docs-release flake8 pydocstyle release-webpage \
isort-check isort-reformat pytest reformat release check test
build:
python3.9 setup.py sdist
clean:
find . -name '*.pyc' | xargs rm
rm -Rif *.egg-info/
rm -Rif .cache
rm -Rif __pycache__
rm -Rif build
rm -Rif dist
docs-html:
make -C docs/ html
docs-release:
make -C docs/ release
flake_ignore = --ignore=E203,E266,W503
flake_exclude = --exclude=./sandbox.py,./docs/conf.py
flake8:
python3.9 -m flake8 ${flake_ignore} ${flake_exclude}
pydocstyle_select = --select=D101,D102,D103,D105,D107,D300,D301
pydocstyle:
python3.9 -m pydocstyle ${pydocstyle_select}
release-webpage:
rm -Rf auxjad-docs/
git clone https://github.com/gilbertohasnofb/auxjad-docs auxjad-docs
rsync -rtv --del --exclude=.git --exclude=README.rst \
docs/_build/html/ auxjad-docs/
cd auxjad-docs && \
touch .nojekyll && \
git add -A && \
git commit -m "Update docs" && \
git push -u origin master
rm -Rf auxjad-docs/
isort-check:
python3.9 -m isort \
--case-sensitive \
--check-only \
--diff \
--line-width=79 \
--multi-line=3 \
--project=auxjad \
--skip=auxjad/__init__.py \
--skip=sandbox.py \
--trailing-comma \
--use-parentheses \
.
isort-reformat:
python3.9 -m isort \
--case-sensitive \
--line-width=79 \
--multi-line=3 \
--project=auxjad \
--skip=auxjad/__init__.py \
--skip=sandbox.py \
--trailing-comma \
--use-parentheses \
.
pytest:
python3.9 -m pytest
reformat:
make isort-reformat
release:
make test
make docs-release
make clean
make build
pip install -U twine
twine upload dist/*.tar.gz
make release-webpage
check:
make flake8
make isort-check
test:
make flake8
make pydocstyle
make isort-check
make pytest