-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
119 lines (99 loc) · 1.85 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.PHONY: docs build gh-pages
black-check:
black --check --diff --target-version=py38 .
black-reformat:
black --target-version=py38 .
build:
python setup.py sdist
clean:
find . -name '*.pyc' | xargs rm
rm -Rif *.egg-info/
rm -Rif .cache
rm -Rif .tox
rm -Rif __pycache__
#rm -Rif build
rm -Rif dist
rm -Rif htmlcov
rm -Rif prof
docs:
make -C docs/ html
flake_ignore = --ignore=E203,E266,E501,W503
flake_options = --isolated --max-line-length=88
flake8:
flake8 ${flake_ignore} ${flake_options}
isort-check:
isort \
--case-sensitive \
--check-only \
--diff \
--line-width=88 \
--multi-line=3 \
--project=abjad \
--project=abjadext \
--project=pang \
--thirdparty=ply \
--thirdparty=roman \
--thirdparty=uqbar \
--trailing-comma \
--use-parentheses \
.
isort-reformat:
isort \
--case-sensitive \
--line-width=88 \
--multi-line=3 \
--project=abjad \
--project=abjadext \
--project=pang \
--thirdparty=ply \
--thirdparty=roman \
--thirdparty=uqbar \
--trailing-comma \
--use-parentheses \
.
jupyter-test:
jupyter nbconvert --to=html --ExecutePreprocessor.enabled=True tests/test.ipynb
mypy:
mypy .
# fix mypy errors and then run mypy over tests/ directory
# mypy tests
project = utsu
pytest:
pytest .
pytest-coverage:
rm -Rf htmlcov/
pytest \
--cov-config=.coveragerc \
--cov-report=html \
--cov=${project} \
.
pytest-x:
pytest -x .
reformat:
make black-reformat
make isort-reformat
release:
make -C docs/ clean html
make clean
make build
pip install -U twine
twine upload dist/*.tar.gz
make gh-pages
check:
make black-check
make flake8
make isort-check
#make mypy
test:
make black-check
make flake8
make isort-check
#make mypy
make pytest
segments:
cd utsu; \
python tools/SegmentIllustrator.py a b c; \
python tools/SegmentRenderer.py a b c; \
cd builds/score; \
lilypond score.ly; \
open score.pdf