-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile
55 lines (42 loc) · 1011 Bytes
/
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
BIN := venv/bin
.PHONY: all
all: install lint test build docs
.PHONY: clean
clean:
rm -rf .ruff_cache .mypy_cache .pytest_cache
find . -name "*.pyc" -delete
rm -rf *.egg-info build
rm -rf coverage*.xml .coverage
rm -rf .benchmarks
.PHONY: install
install:
poetry install --sync --all-extras --with=dev
.PHONY: lint
lint: lint/ruff lint/mypy
.PHONY: lint/ruff
lint/ruff:
poetry run ruff check pure_protobuf tests
.PHONY: lint/mypy
lint/mypy:
poetry run mypy pure_protobuf tests
.PHONY: format
format: format/ruff
.PHONY: format/ruff
format/ruff:
poetry run ruff check --fix pure_protobuf tests
poetry run ruff format pure_protobuf tests
.PHONY: test
test:
poetry run pytest tests --benchmark-disable
.PHONY: benchmark
benchmark:
poetry run pytest tests --benchmark-only --benchmark-columns=mean,stddev,median,ops --benchmark-warmup=on
.PHONY: build
build:
poetry build
.PHONY: docs
docs:
poetry run mkdocs build --site-dir _site
.PHONY: docs/serve
docs/serve:
poetry run mkdocs serve