-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
81 lines (62 loc) · 1.87 KB
/
justfile
File metadata and controls
81 lines (62 loc) · 1.87 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
# blocksd — ROLI Blocks Linux Daemon
# Default: show available recipes
default:
@just --list
# Install all dependencies (including dev)
install:
uv sync
# Run the daemon
run *ARGS:
uv run blocksd {{ ARGS }}
# Run the full test suite
test *ARGS:
uv run pytest {{ ARGS }}
# Run tests with verbose output
test-v *ARGS:
uv run pytest -v {{ ARGS }}
# Run a specific test module (e.g., just test-mod protocol)
test-mod MODULE *ARGS:
uv run pytest tests/{{ MODULE }} {{ ARGS }}
# Lint with ruff
lint:
uv run ruff check src tests
# Auto-fix lint issues
lint-fix:
uv run ruff check --fix src tests
# Format Python code
fmt:
uv run ruff format src tests
# Format markdown, yaml, and json files
fmt-docs:
npx prettier --write "**/*.md" "**/*.yml" "**/*.yaml" "**/*.json" "!uv.lock"
# Check formatting without changes
fmt-check:
uv run ruff format --check src tests
npx prettier --check "**/*.md" "**/*.yml" "**/*.yaml" "**/*.json" "!uv.lock"
# Type check with ty
typecheck:
uv run ty check src
# Run all checks (lint + format check + typecheck + tests)
check: lint fmt-check typecheck test
# Fix everything auto-fixable (lint + format)
fix: lint-fix fmt fmt-docs
# Clean build artifacts and caches
clean:
rm -rf dist build .pytest_cache .ruff_cache
find src tests -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
# Build the package
build:
uv build
# Install systemd service (requires sudo)
install-service:
sudo cp systemd/blocksd.service /etc/systemd/system/
sudo cp systemd/99-roli-blocks.rules /etc/udev/rules.d/
sudo systemctl daemon-reload
sudo udevadm control --reload-rules
@echo "Service installed. Enable with: sudo systemctl enable --now blocksd"
# Build AUR package locally (requires makepkg)
aur-build:
cd packaging/aur/blocksd && makepkg -si
# Show dependency tree
deps:
uv tree