-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (44 loc) · 1.03 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
.PHONY: all
all: install bindings lint check_types test build_release
.PHONY: install
install:
@uv sync --all-packages
.PHONY: bindings
bindings: install
@uv run maturin develop --uv
.PHONY: build_release
build_release: build_py_release build_rs_release
.PHONY: build_py_release
build_py_release: install
@uv run maturin build --release
.PHONY: build_rs_release
build_rs_release:
@cargo build --release
.PHONY: test
test: test_unit test_cli
.PHONY: test_unit
test_unit:
@uv run pytest
.PHONY: test_cli
test_cli:
@bash tests/test_cli.sh
.PHONY: check_types
check_types:
uv run mypy python/pyrust tests
.PHONY: lint
lint:
@cargo clippy --all-targets --all-features -- -D warnings
@uv run ruff check python/pyrust tests
.PHONY: format
format:
@cargo fmt --all -- --check
@uv run ruff format python/pyrust tests
.PHONY: clean_cache
clean_cache:
@find . | grep -E "(__pycache__|\.pyc$$)" | xargs rm -rf
@find . -type f -name "*.pyd" -delete
.PHONY: clean_venv
clean_venv:
@rm -rf .venv
.PHONY: clean
clean: clean_cache clean_venv