-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
103 lines (81 loc) · 2.81 KB
/
Justfile
File metadata and controls
103 lines (81 loc) · 2.81 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
# Justfile for aria-testing
# Requires: just, uv, Python 3.14t (free-threaded build)
# All tasks use uv to ensure isolated, reproducible runs.
# Default recipe shows help
default:
@just --list
# Print environment info
info:
@echo "Python: $(python --version)"
@uv --version
# Install project and dev dependencies
install:
uv sync --all-groups
# Alias for install (better discoverability)
setup: install
# Run tests (sequential)
test *ARGS:
uv run pytest {{ ARGS }}
# Run tests (parallel)
test-parallel *ARGS:
uv run pytest -n auto {{ ARGS }}
# Run tests with free-threading safety checks (parallel threads + iterations)
test-freethreaded *ARGS:
uv run pytest --threads=8 --iterations=10 --require-gil-disabled {{ ARGS }}
# Lint code (check for issues)
lint *ARGS:
uv run ruff check {{ ARGS }} .
# Format code (auto-format)
fmt *ARGS:
uv run ruff format {{ ARGS }} .
# Check formatting without modifying files (for CI)
fmt-check *ARGS:
uv run ruff format --check {{ ARGS }} .
# Lint and auto-fix
lint-fix:
uv run ruff check --fix .
# Type checking
typecheck *ARGS:
uv run ty check {{ ARGS }}
# Build docs
docs:
uv run sphinx-build -b html docs docs/_build/html
# Build sdist/wheel
build:
uv build
# Clean build and cache artifacts
clean:
rm -rf .pytest_cache .ruff_cache .pyright .mypy_cache build dist
find docs/_build -mindepth 1 -maxdepth 1 -not -name ".gitkeep" -exec rm -rf {} + || true
# Run all quality checks with fail-fast behavior
ci-checks:
just install && just lint && just fmt-check && just typecheck && just test-parallel
# Run all checks + free-threading safety tests
ci-checks-ft:
just ci-checks && just test-freethreaded
# Enable pre-push hook to run ci-checks before pushing
enable-pre-push:
@echo "Installing pre-push hook..."
@echo '#!/bin/sh' > .git/hooks/pre-push
@echo '' >> .git/hooks/pre-push
@echo '# Run quality checks before push' >> .git/hooks/pre-push
@echo 'echo "Running quality checks before push..."' >> .git/hooks/pre-push
@echo 'if ! just ci-checks; then' >> .git/hooks/pre-push
@echo ' echo "Pre-push check failed! Push aborted."' >> .git/hooks/pre-push
@echo ' exit 1' >> .git/hooks/pre-push
@echo 'fi' >> .git/hooks/pre-push
@chmod +x .git/hooks/pre-push
@echo "Pre-push hook installed! Use 'just disable-pre-push' to disable."
# Disable pre-push hook
disable-pre-push:
@chmod -x .git/hooks/pre-push 2>/dev/null || true
@echo "Pre-push hook disabled. Use 'just enable-pre-push' to re-enable."
# Run performance benchmark
benchmark:
uv run python -m aria_testing.profiling.benchmark
# Profile query operations
profile-queries:
uv run python -m aria_testing.profiling.profiler_queries
# Profile test suite
profile-tests:
uv run python -m aria_testing.profiling.profiler_tests