-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
131 lines (103 loc) · 4.94 KB
/
justfile
File metadata and controls
131 lines (103 loc) · 4.94 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# GNN Pipeline — Developer Command Reference
# See: AGENTS.md, pyproject.toml, .github/workflows/ci.yml
#
# Install: brew install just (or: cargo install just)
# Usage: just <recipe> (or: just --list)
# Default recipe: show available commands
default:
@just --list --unsorted
# ─────────────────────────────────────────────
# Testing
# ─────────────────────────────────────────────
# Run fast test suite (default)
test:
uv run pytest src/tests/ -q --tb=short -x
# Run full test suite (with Ollama ignores)
test-full:
uv run pytest src/tests/ -q --tb=no \
--ignore=src/tests/llm/test_llm_ollama.py \
--ignore=src/tests/llm/test_llm_ollama_integration.py
# Run tests for a specific module (e.g., just test-mod render)
test-mod MODULE:
uv run pytest src/tests/test_{{ MODULE }}*.py -v
# Run tests with coverage report
test-cov:
uv run pytest src/tests/ --cov=src --cov-report=term-missing \
--ignore=src/tests/llm/test_llm_ollama.py \
--ignore=src/tests/llm/test_llm_ollama_integration.py
# ─────────────────────────────────────────────
# Linting & Formatting
# ─────────────────────────────────────────────
# Run ruff linter
lint:
uv run ruff check src/
# Run ruff linter with auto-fix
lint-fix:
uv run ruff check src/ --fix
# Format code with ruff
format:
uv run ruff format src/
uv run ruff check src/ --select I --fix
# Check formatting without modifying files
format-check:
uv run ruff format --check src/
# Run mypy type checking
typecheck:
uv run mypy src/ --ignore-missing-imports
# Run bandit security scan
security:
uv run bandit -r src/ -c pyproject.toml -q
# ─────────────────────────────────────────────
# Pipeline Execution
# ─────────────────────────────────────────────
# Run full pipeline
pipeline:
uv run python src/main.py --target-dir input/gnn_files --verbose
# Run specific pipeline steps (e.g., just pipeline-steps "3,5,7,8")
pipeline-steps STEPS:
uv run python src/main.py --only-steps "{{ STEPS }}" --target-dir input/gnn_files --verbose
# Run a single pipeline step (e.g., just step 3)
step N:
uv run python src/{{ N }}_*.py --target-dir input/gnn_files --output-dir output --verbose
# ─────────────────────────────────────────────
# Renderer Operations
# ─────────────────────────────────────────────
# Check renderer availability
render-health:
PYTHONPATH=src uv run python -c "from render.health import check_renderers; \
statuses = check_renderers(); \
[print(f' {\"✅\" if s.available else \"❌\"} {s.name}') for s in statuses.values()]"
# Render and execute for specific frameworks (e.g., just render-exec "pymdp,jax")
render-exec FRAMEWORKS:
uv run python src/main.py --only-steps "11,12" \
--frameworks "{{ FRAMEWORKS }}" \
--target-dir input/gnn_files --verbose
# ─────────────────────────────────────────────
# Documentation & Audit
# ─────────────────────────────────────────────
# Run documentation audit without mutating reports
audit:
uv run python doc/development/docs_audit.py --strict --check-anchors --no-write
# Run maintained-tree terminology audit
terminology:
uv run python scripts/check_repo_terminology.py --strict
# Count test files and items
test-count:
@echo "Test files:"
@find src/tests -maxdepth 1 -name 'test_*.py' | wc -l
@echo "Collected test items:"
@uv run pytest src/tests/ --collect-only -q 2>/dev/null | tail -1
# ─────────────────────────────────────────────
# Environment Setup
# ─────────────────────────────────────────────
# Install all dependencies (including dev extras)
setup:
uv sync --extra dev
# Recreate the virtual environment from scratch
setup-clean:
rm -rf .venv
uv sync --extra dev
# Validate the JAX + PyMDP stack
validate-stack:
uv run python -c "from utils.jax_stack_validation import verify_jax_pymdp_stack; \
verify_jax_pymdp_stack(); print('✅ JAX + PyMDP stack OK')"