@@ -74,8 +74,8 @@ list-deps: check-cli
7474[group (' build' )]
7575build profile = " debug": check-cli setup-quiet sync-deps build-selene
7676 {{ pecos}} python build --profile {{ profile}}
77- @ command -v julia >/ dev/ null 2 >&1 && {{ pecos }} julia build --profile {{ profile}} || true
78- @ command -v go >/ dev/ null 2 >&1 && {{ pecos }} go build --profile {{ profile}} || true
77+ @ command -v julia >/ dev/ null 2 >&1 && just julia-build {{ profile}} || true
78+ @ command -v go >/ dev/ null 2 >&1 && just go-build {{ profile}} || true
7979
8080# Build PECOS without dependency setup or sync
8181[group (' build' )]
@@ -93,9 +93,15 @@ build-cuda profile="debug": check-cli setup-quiet
9393
9494# Run Python tests (core)
9595[group (' test' )]
96- pytest :
97- uv run pytest python/ pecos-rslib/ tests -m " not performance and not numpy"
98- uv run pytest python/ quantum-pecos/ tests -m " not optional_dependency and not numpy"
96+ pytest * args :
97+ #!/usr/bin/env bash
98+ set -euo pipefail
99+ if [ -n " {{args}}" ]; then
100+ uv run pytest {{args}}
101+ else
102+ uv run pytest python/pecos-rslib/tests -m " not performance and not numpy"
103+ uv run pytest python/quantum-pecos/tests -m " not optional_dependency and not numpy"
104+ fi
99105
100106# Run Rust tests (CUDA-aware, release mode)
101107[group (' test' )]
@@ -109,13 +115,13 @@ test: rstest-all pytest-all
109115 set -euo pipefail
110116 if command -v julia > /dev/null 2>&1 ; then
111117 echo " Julia detected, running Julia tests..."
112- {{pecos}} julia test
118+ just julia- test
113119 else
114120 echo " Julia not detected, skipping Julia tests"
115121 fi
116122 if command -v go > /dev/null 2>&1 ; then
117123 echo " Go detected, running Go tests..."
118- {{pecos}} go test
124+ just go- test
119125 else
120126 echo " Go not detected, skipping Go tests"
121127 fi
@@ -139,16 +145,16 @@ lint: fmt clippy
139145
140146 if command -v julia > /dev/null 2>&1 ; then
141147 echo " Julia detected, running Julia formatting check and linting..."
142- {{pecos}} julia fmt - -check
143- {{pecos}} julia lint
148+ just julia-fmt -check
149+ just julia- lint
144150 else
145151 echo " Julia not detected, skipping Julia linting"
146152 fi
147153
148154 if command -v go > /dev/null 2>&1 ; then
149155 echo " Go detected, running Go formatting check and linting..."
150- test -z " $( gofmt -l go/pecos ) " || (gofmt -l go/pecos && exit 1)
151- cd go/pecos && go vet ./...
156+ just go-fmt-check
157+ just go-lint
152158 else
153159 echo " Go not detected, skipping Go linting"
154160 fi
@@ -167,13 +173,13 @@ lint-fix:
167173 echo " "
168174 if command -v julia > /dev/null 2>&1 ; then
169175 echo " Fixing Julia formatting..."
170- {{pecos}} julia fmt
176+ just julia- fmt
171177 else
172178 echo " Julia not detected, skipping Julia formatting"
173179 fi
174180 if command -v go > /dev/null 2>&1 ; then
175181 echo " Fixing Go formatting..."
176- gofmt -w go/pecos
182+ just go-fmt
177183 else
178184 echo " Go not detected, skipping Go formatting"
179185 fi
@@ -281,42 +287,71 @@ check-cuda: check-cli
281287
282288# Build Julia FFI library
283289[group (' julia' )]
284- julia-build profile = " release": check-cli
285- {{ pecos}} julia build --profile {{ profile}}
290+ julia-build profile = " release" rustflags = " ":
291+ #!/usr/bin/env bash
292+ set -euo pipefail
293+ if [ -n " {{rustflags}}" ]; then
294+ export RUSTFLAGS=" ${RUSTFLAGS:- } {{rustflags}}"
295+ fi
296+ case " {{profile}}" in
297+ native) cargo build --profile native -p pecos-julia-ffi ;;
298+ release) cargo build --release -p pecos-julia-ffi ;;
299+ dev|debug) cargo build -p pecos-julia-ffi ;;
300+ * ) echo " Unknown profile: {{profile}}" ; exit 1 ;;
301+ esac
286302
287303# Run Julia tests
288304[group (' julia' )]
289- julia-test : check-cli
290- {{ pecos }} julia test
305+ julia-test : ( julia-build " release" )
306+ cd julia/ PECOS.jl && julia --project=. -e ' using Pkg; Pkg.instantiate(); include(" test/runtests.jl")'
291307
292308# Format Julia code
293309[group (' julia' )]
294- julia-format : check-cli
295- {{ pecos}} julia fmt
310+ julia-fmt :
311+ #!/usr/bin/env bash
312+ set -euo pipefail
313+ julia -e ' using Pkg; Pkg.activate(); haskey(Pkg.project().dependencies, "JuliaFormatter") || Pkg.add("JuliaFormatter")'
314+ cd julia/PECOS.jl && julia -e ' using JuliaFormatter; format("."; verbose=true)'
296315
297316# Check Julia code formatting
298317[group (' julia' )]
299- julia-format-check : check-cli
300- {{ pecos}} julia fmt --check
318+ julia-fmt-check :
319+ #!/usr/bin/env bash
320+ set -euo pipefail
321+ julia -e ' using Pkg; Pkg.activate(); haskey(Pkg.project().dependencies, "JuliaFormatter") || Pkg.add("JuliaFormatter")'
322+ cd julia/PECOS.jl && julia -e ' using JuliaFormatter; format("."; verbose=false, overwrite=false) || (println("Run just julia-fmt to fix."); exit(1))'
301323
302324# Run Aqua.jl quality checks
303325[group (' julia' )]
304- julia-lint : check-cli
305- {{ pecos }} julia lint
326+ julia-lint : ( julia-build " release" )
327+ cd julia/ PECOS.jl && julia --project=. test / aqua_tests.jl
306328
307329# =============================================================================
308330# Go Bindings
309331# =============================================================================
310332
311333# Build Go FFI library
312334[group (' go' )]
313- go-build profile = " release": check-cli
314- {{ pecos}} go build --profile {{ profile}}
335+ go-build profile = " release" rustflags = " ":
336+ #!/usr/bin/env bash
337+ set -euo pipefail
338+ if [ -n " {{rustflags}}" ]; then
339+ export RUSTFLAGS=" ${RUSTFLAGS:- } {{rustflags}}"
340+ fi
341+ case " {{profile}}" in
342+ native) cargo build --profile native -p pecos-go-ffi ;;
343+ release) cargo build --release -p pecos-go-ffi ;;
344+ dev|debug) cargo build -p pecos-go-ffi ;;
345+ * ) echo " Unknown profile: {{profile}}" ; exit 1 ;;
346+ esac
315347
316348# Run Go tests
317349[group (' go' )]
318- go-test : check-cli
319- {{ pecos}} go test
350+ go-test : (go-build " release" )
351+ #!/usr/bin/env bash
352+ set -euo pipefail
353+ export LD_LIBRARY_PATH=" $( pwd) /target/release:${LD_LIBRARY_PATH:- } "
354+ cd go/pecos && go test -v
320355
321356# Format Go code
322357[group (' go' )]
@@ -394,7 +429,7 @@ test-all: rstest-all pytest-all
394429 set -euo pipefail
395430 if command -v julia > /dev/null 2>&1 ; then
396431 echo " Julia detected, running Julia tests..."
397- {{pecos}} julia test
432+ just julia- test
398433 else
399434 echo " "
400435 echo " WARNING: Julia is not installed. Skipping Julia tests."
@@ -403,7 +438,7 @@ test-all: rstest-all pytest-all
403438 fi
404439 if command -v go > /dev/null 2>&1 ; then
405440 echo " Go detected, running Go tests..."
406- {{pecos}} go test
441+ just go- test
407442 else
408443 echo " "
409444 echo " WARNING: Go is not installed. Skipping Go tests."
@@ -610,11 +645,7 @@ docs-test-legacy:
610645
611646# Julia/Go extras
612647[private ]
613- julia-build-debug :
614- {{ pecos}} julia build --profile debug
615-
616- [private ]
617- julia-examples : julia-build-debug
648+ julia-examples : (julia-build " debug" )
618649 #!/usr/bin/env bash
619650 set -euo pipefail
620651 if command -v julia > /dev/null 2>&1 ; then
@@ -633,8 +664,7 @@ julia-clean:
633664 rm -f julia/ PECOS.jl/ Manifest.toml julia/ PECOS.jl/ dev/ PECOS_julia_jll/ Manifest.toml || true
634665
635666[private ]
636- go-build-debug :
637- {{ pecos}} go build --profile debug
667+ go-build-debug : (go-build " debug" )
638668
639669[private ]
640670go-info :
0 commit comments