-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
105 lines (81 loc) · 2.13 KB
/
Copy pathjustfile
File metadata and controls
105 lines (81 loc) · 2.13 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Justfile for squeeze development
# Run `just` to see available commands
# Default recipe - show help
default:
@just --list
# Install dependencies and build the Rust extension
install:
uv sync --extra dev --extra benchmark
uv run maturin develop --release
# Build the Rust extension in release mode
build:
uv run maturin develop --release
# Build the Rust extension in debug mode (faster compilation)
build-debug:
uv run maturin develop
# Run the Python k-NN benchmark (compares PyNNDescent vs HNSW backends)
benchmark:
uv sync --extra benchmark
uv run python benchmark_optimizations.py
# Run Rust benchmarks with Criterion
benchmark-rust:
cargo bench
# Run all tests
test:
uv run pytest squeeze/tests/ -v
# Run tests with testmon (only changed tests)
test-fast:
uv run pytest squeeze/tests/ --testmon
# Run a specific test file
test-file FILE:
uv run pytest {{FILE}} -v
# Run linting with ruff
lint:
uv run ruff check .
# Fix linting issues automatically
lint-fix:
uv run ruff check --fix .
# Format code with ruff
format:
uv run ruff format .
# Check formatting without making changes
format-check:
uv run ruff format --check .
# Run both linting and formatting
check: lint format-check
# Fix all linting and formatting issues
fix: lint-fix format
# Clean build artifacts
clean:
rm -rf target/
rm -rf *.egg-info/
rm -rf dist/
rm -rf build/
rm -rf .pytest_cache/
rm -rf __pycache__/
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
# Watch tests and re-run on changes
test-watch:
uv run pytest-watch -- squeeze/tests/ -v
# Run pre-commit hooks on all files
pre-commit:
uv run pre-commit run --all-files
# Install pre-commit hooks
pre-commit-install:
uv run pre-commit install
# Build documentation
docs:
uv run mkdocs build
# Serve documentation locally
docs-serve:
uv run mkdocs serve
# Run cargo tests for Rust code
test-rust:
cargo test
# Check Rust code
check-rust:
cargo check
cargo clippy
# Full CI check (lint, format, test)
ci: check test test-rust