-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (35 loc) · 972 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
.DEFAULT_GOAL := build
VERSION := $(shell poetry version -s)
init:
poetry self add poetry-plugin-export
poetry config warnings.export false
poetry config virtualenvs.in-project true
poetry install --no-root
update:
poetry update
clean:
cargo clean
find . | grep -E "(__pycache__|.pytest_cache|.mypy_cache|\.pyc|\.pyo$$)" | xargs rm -rf
format:
cargo fmt
poetry run isort ./examples ./tests
poetry run black ./examples ./tests
lint:
cargo clippy --all-features
poetry run isort --check-only --diff ./examples ./tests
poetry run black --check ./examples ./tests
poetry run flake8 ./examples ./tests
typecheck:
poetry run mypy ./examples ./tests
.PHONY: tests
test:
cargo test --all-features
poetry maturin develop --all-features
poetry run pytest -v ./tests
maturin-develop:
poetry run maturin develop --all-features
maturin-build:
poetry maturin build -i python --release --all-features
tag:
git tag v$(VERSION)
git push origin v$(VERSION)