-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (39 loc) · 925 Bytes
/
Makefile
File metadata and controls
45 lines (39 loc) · 925 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
39
40
41
42
43
44
45
help:
@echo "Commands:"
@echo -e "\tbuild-dev build source"
@echo -e "\tbuild-prod build source (release mode)"
@echo -e "\ttest-rs clippy and test rust code"
@echo -e "\ttest-py build and test python code"
@echo -e "\tformat format rust and python code"
@echo -e "\tclean clean all the unneeded files"
.PHONY: build-dev
build-dev:
maturin develop
.PHONY: build-prod
build-prod:
maturin develop --release
.PHONY: test-rs
test-rs:
cargo clippy
cargo test -- --nocapture
.PHONY: test-py
test-py: build-dev
coverage run -m pytest -s -vv
-rm -rf .pytest_cache
-ruff check .
ruff clean
coverage html
.PHONY: format
format:
ruff format --line-length=100 .
ruff clean
cargo fmt
.PHONY: clean
clean:
-rm -rf `find . -name __pycache__`
-rm -rf python/cachebox/*.so
-rm -rf target/release
-rm -rf .pytest_cache
-rm -rf .coverage
-rm -rf htmlcov
-ruff clean