-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjustfile
More file actions
90 lines (73 loc) · 2.2 KB
/
justfile
File metadata and controls
90 lines (73 loc) · 2.2 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
# klujax justfile
# List all available commands
list:
just --list
# Set up development environment (clones dependencies first)
dev: maybe-deps bver
uv venv --python 3.13 --clear
uv sync --all-extras --all-groups --upgrade
uv run python setup.py build_ext --inplace
# Build distribution
dist:
uv run python setup.py build sdist bdist_wheel
# Version bumping
[linux,macos]
bver:
curl -LsSf https://github.com/flaport/bver/releases/latest/download/install.sh | sh
# Version bumping
[windows]
bver:
powershell -ExecutionPolicy ByPass -c "irm https://github.com/flaport/bver/releases/latest/download/install.ps1 | iex"
# (Re-)initialize dependencies
deps: suitesparse xla pybind11
# Initialize missing dependencies only
maybe-deps:
@if [ ! -d "suitesparse" ]; then just suitesparse; fi
@if [ ! -d "xla" ]; then just xla; fi
@if [ ! -d "pybind11" ]; then just pybind11; fi
# Build extension in place
inplace:
uv run python setup.py build_ext --inplace
# Run tests
test:
uv run pytest tests.py
# Build docs
docs:
uv run mkdocs build
# Serve docs locally
serve:
uv run mkdocs serve -a localhost:8080
# Clone SuiteSparse
suitesparse:
rm -rf suitesparse
git clone --depth 1 --branch v7.5.0 https://github.com/DrTimothyAldenDavis/SuiteSparse suitesparse || true
cd suitesparse && rm -rf .git
# Clone XLA
xla:
rm -rf xla
git clone https://github.com/openxla/xla xla
cd xla && git checkout 05f004e8368c955b872126b1c978c60e33bbc5c8 && rm -rf .git
# Clone pybind11
pybind11:
rm -rf pybind11
git clone --depth 1 --branch v2.13.6 https://github.com/pybind/pybind11 pybind11
cd pybind11 && rm -rf .git
# Clean build artifacts
clean:
rm -rf .venv
find . -name "dist" | xargs rm -rf
find . -name "build" | xargs rm -rf
find . -name "builds" | xargs rm -rf
find . -name "__pycache__" | xargs rm -rf
find . -name "*.so" | xargs rm -rf
find . -name "*.egg-info" | xargs rm -rf
find . -name ".ipynb_checkpoints" | xargs rm -rf
find . -name ".pytest_cache" | xargs rm -rf
# Clean everything
clean-all: clean
rm -rf suitesparse
rm -rf xla
rm -rf pybind11
rm uv.lock
bump version="patch":
bver bump "{{ version }}"