-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathjustfile
61 lines (46 loc) · 1.62 KB
/
justfile
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
59
60
61
@_default:
just --list
# ------------------------------------------------------------------------------
# Recipes for the kornia rust project
# ------------------------------------------------------------------------------
# Check if the required binaries for the project are installed
check-environment:
@echo "Rust version." && cargo --version
# Run clippy with all features
clippy:
@echo "🚀 Running clippy"
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
# Run clippy with default features
clippy-default:
@echo "🚀 Running clippy"
cargo clippy --all-targets --locked -- -D warnings
# Run autoformatting and linting
fmt:
cargo fmt --all
# Clean up caches and build artifacts
clean:
@rm -rf .venv/
@rm -rf target/
@rm -f Cargo.lock
@cargo clean
# Test the code or a specific test
test name='':
@cargo test {{ name }}
# Test the code with all features
test-all:
@cargo test --all-features
# ------------------------------------------------------------------------------
# Recipes for the kornia-py project
# ------------------------------------------------------------------------------
# Create virtual environment, and install dev requirements
py-install py_version='3.9':
@cd kornia-py/ && just install {{ py_version }}
# Create virtual environment, and build kornia-py
py-build py_version='3.9':
@cd kornia-py/ && just build {{ py_version }}
# Create virtual environment, and build kornia-py for release
py-build-release py_version='3.9':
@cd kornia-py/ && just build {{ py_version }} "--release"
# Test the kornia-py code with pytest
py-test:
@cd kornia-py/ && just test