-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
73 lines (60 loc) · 1.18 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
.PHONY: build
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
find . -name __pycache__ | xargs rm -Rf
rm -Rif *.egg-info/
rm -Rif .cache/
rm -Rif .tox/
rm -Rif build/
rm -Rif dist/
rm -Rif prof/
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 \
--thirdparty=uqbar \
--trailing-comma \
--use-parentheses \
abjadext/ tests/ *.py
isort-reformat:
isort \
--case-sensitive \
--line-width=88 \
--multi-line=3 \
--project=abjad \
--thirdparty=uqbar \
--trailing-comma \
--use-parentheses \
abjadext/ tests/ *.py
jupyter-test:
jupyter nbconvert --to=html --ExecutePreprocessor.enabled=True tests/test.ipynb
mypy:
mypy .
reformat:
black-reformat
isort-reformat
release: clean build
pip install -U twine
twine upload dist/*.tar.gz
check:
make black-check
make flake8
make isort-check
make mypy
test:
make check
make jupyter-test