-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
107 lines (70 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
.PHONY: compile release test annotate buildext check-isort check-black
cyt:
cython shuttleasgi/url.pyx
cython shuttleasgi/exceptions.pyx
cython shuttleasgi/headers.pyx
cython shuttleasgi/cookies.pyx
cython shuttleasgi/contents.pyx
cython shuttleasgi/messages.pyx
cython shuttleasgi/scribe.pyx
cython shuttleasgi/baseapp.pyx
compile: cyt
python3 setup.py build_ext --inplace
clean:
rm -rf dist/
rm -rf build/
rm -f shuttleasgi/*.c
rm -f shuttleasgi/*.so
buildext:
python3 setup.py build_ext --inplace
annotate:
cython shuttleasgi/url.pyx -a
cython shuttleasgi/exceptions.pyx -a
cython shuttleasgi/headers.pyx -a
cython shuttleasgi/cookies.pyx -a
cython shuttleasgi/contents.pyx -a
cython shuttleasgi/messages.pyx -a
cython shuttleasgi/scribe.pyx -a
cython shuttleasgi/baseapp.pyx -a
build: test
python3 -m build
prepforbuild:
pip install --upgrade build
testrelease:
twine upload -r testpypi dist/*
release: clean compile artifacts
twine upload -r pypi dist/*
test:
pytest tests/
itest:
pytest itests/
init:
pip install -r requirements.txt
test-v:
pytest -v
test-cov-unit:
pytest --cov-report html --cov=shuttleasgi tests
test-cov:
pytest --cov-report html --cov=shuttleasgi --disable-warnings
lint: check-flake8 check-isort check-black
format:
@isort shuttleasgi 2>&1
@isort tests 2>&1
@isort itests 2>&1
@black shuttleasgi 2>&1
@black tests 2>&1
@black itests 2>&1
check-flake8:
@echo "$(BOLD)Checking flake8$(RESET)"
@flake8 shuttleasgi 2>&1
@flake8 tests 2>&1
check-isort:
@echo "$(BOLD)Checking isort$(RESET)"
@isort --check-only shuttleasgi 2>&1
@isort --check-only tests 2>&1
@isort --check-only itests 2>&1
check-black: ## Run the black tool in check mode only (won't modify files)
@echo "$(BOLD)Checking black$(RESET)"
@black --check shuttleasgi 2>&1
@black --check tests 2>&1
@black --check itests 2>&1