-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (75 loc) · 2.18 KB
/
Copy pathMakefile
File metadata and controls
97 lines (75 loc) · 2.18 KB
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
PROJECT_VERSION=$(shell python setup.py --version)
PACKAGE_NAME=escapy
# Workaround for targets with the same name as a directory
.PHONY: doc tests
# Tests
tests:
pytest tests
coverage:
pytest --cov=$(PACKAGE_NAME) --cov-report term-missing -vv
@-coverage-badge -f -o images/coverage.svg
p_cov:
# Parallelisation of tests
pytest --cov=$(PACKAGE_NAME) --cov-report term-missing -vv -n 8
branch_coverage:
pytest --cov=$(PACKAGE_NAME) --cov-report term-missing --cov-branch -vv
docstring_coverage:
interrogate -v $(PACKAGE_NAME)/ \
-e $(PACKAGE_NAME)/__init__.py \
-e $(PACKAGE_NAME)/encodings/__init__.py \
-e $(PACKAGE_NAME)/handlers/__init__.py \
--badge-style flat --generate-badge images/
# Code formatting
black:
black $(PACKAGE_NAME)
# Run the service locally
run:
python -m $(PACKAGE_NAME)
clean:
rm -rf *.egg-info
python setup.py clean --all
-$(MAKE) -C ./doc clean
doc:
$(MAKE) -C ./doc html
# development & release cycle
fullrelease:
@# From zest.releaser
@echo "\033[5;1;31m*** DO NOT forget to update debian/changelog version before! ***\033[0m"
fullrelease
install:
@# Install a project in editable mode.
pip install -e .[dev]
uninstall:
pip uninstall pyscape
sdist: clean
@echo Building the distribution package...
python -m build --sdist
wheel: clean
@echo Building the wheel package...
python -m build --wheel
upload:
@echo Building the distribution + wheel packages...
python -m build
twine upload dist/* -r pypi
check_setups:
pyroma .
check_code:
prospector $(PACKAGE_NAME)/
check-manifest
missing_doc:
# Remove D213 antagonist of D212
prospector $(PACKAGE_NAME)/ | grep "$(PACKAGE_NAME)/\|Line\|Missing docstring"
archive:
# Create upstream src archive
git archive HEAD --prefix='$(PACKAGE_NAME)-$(PROJECT_VERSION).orig/' | gzip > ../$(PACKAGE_NAME)-$(PROJECT_VERSION).orig.tar.gz
reset_patches:
# Force the removal of the current patches
-quilt pop -af
sync_manpage:
-help2man -o debian/$(PACKAGE_NAME).1 \
--name="Interpreter for ESC/P and ESC/P2 commands, converting files into PDFs" \
$(PACKAGE_NAME)
debianize: archive reset_patches
dpkg-buildpackage -us -uc -b -d
debcheck:
lintian -EvIL +pedantic ../$(PACKAGE_NAME)_*.deb