build(py): add justfile recipes for formatting and checking

This commit is contained in:
Anand Balakrishnan 2023-05-03 16:39:01 -07:00
parent 9f674bd385
commit c3d4bad161
No known key found for this signature in database

View file

@ -4,6 +4,13 @@ build *ARGS:
test *ARGS: test *ARGS:
cargo test {{ARGS}} cargo test {{ARGS}}
check:
cargo +nightly clippy
cd pyargus && mypy .
cd pyargus && flake8
cd pyargus && ruff .
test-coverage $CARGO_INCREMENTAL="0" $RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" $RUSTDOCFLAGS="-Cpanic=abort" $LLVM_PROFILE_FILE="argus-%p-%m.profraw": test-coverage $CARGO_INCREMENTAL="0" $RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" $RUSTDOCFLAGS="-Cpanic=abort" $LLVM_PROFILE_FILE="argus-%p-%m.profraw":
fd -e gcda -e profraw --no-ignore -x rm fd -e gcda -e profraw --no-ignore -x rm
cargo +nightly build cargo +nightly build
@ -14,6 +21,9 @@ html-cov: test-coverage
fmt: fmt:
fd -e rs -x rustfmt +nightly {} fd -e rs -x rustfmt +nightly {}
cd pyargus && ruff --fix --exit-non-zero-on-fix .
cd pyargus && isort .
cd pyargus && black .
doc: doc:
cargo doc cargo doc