-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 733 Bytes
/
Makefile
File metadata and controls
38 lines (26 loc) · 733 Bytes
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
.PHONY: all proto clean
VENV := .venv/bin
all: proto
proto:
@echo "Generating Python files from proto..."
$(VENV)/python ./proto/generate-proto.py
clean:
@echo "Cleaning up generated files..."
rm -rf .tox
rm -rf .pytest_cache
rm -rf dist
-rm .DS_Store
find . \( -name '*.pyc' -o -name '__pycache__' \) -exec rm -rf {} +
test: proto
$(VENV)/pytest tests/
lint: proto
@echo "Running linter..."
$(VENV)/flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
$(VENV)/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
check: clean lint test
$(VENV)/tox
@echo "\nAll checks passed!"
publish: check
@echo "Publishing to PyPI..."
python -m build
twine upload dist/*