forked from mlenzen/collections-extended
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (60 loc) · 1.39 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
PACKAGE = collections_extended
VENV = $(shell poetry env info --path)
.PHONY: default
default: clean deps tests
.PHONY: deps
deps:
poetry install --remove-untracked
.PHONY: tests
tests:
poetry run py.test
.PHONY: testall
testall:
poetry run tox
.PHONY: clean
clean:
rm --recursive --force build
rm --recursive --force dist
rm --recursive --force *.egg-info
find . -name *.py[co] -delete
find . -name *~ -delete
find . -name __pycache__ -delete
find . -name *,cover -delete
.PHONY: deep-clean
deep-clean: clean clean-docs
rm --recursive --force $(VENV)
rm --recursive --force .eggs
rm --recursive --force .pytest_cache
rm --recursive --force .tox
# Linting
.PHONY: lint
lint:
poetry run flake8 --statistics --count
poetry check
.PHONY: fixme-check
fixme-check:
! git grep FIXME | grep "^Makefile" --invert-match
.PHONY: coverage
coverage:
poetry run coverage run --source $(PACKAGE) --module pytest
poetry run coverage report --show-missing
poetry run coverage html
# Publishing
.PHONY: publish
publish: fixme-check lint testall publish-force
.PHONY: publish-force
publish-force:
poetry build
poetry publish
git push
git push --tags
# Docs
DOCS_BUILD = docs/_build
.PHONY: clean-docs
clean-docs:
rm --force --recursive $(DOCS_BUILD)
# rm --force docs/$(PACKAGE).rst
# rm --force docs/modules.rst
.PHONY: docs
docs: clean-docs
poetry run sphinx-build -b dirhtml docs $(DOCS_BUILD)/html