Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 919 Bytes

CONTRIBUTING.md

File metadata and controls

61 lines (45 loc) · 919 Bytes

Contributing

Rust library

Setup

pip install -U pre-commit
pre-commit install

Run tests

cd rust
cargo test

Run benchmarks

cd rust
cargo bench

Open documentation

cd rust
cargo doc --open

Code coverage

cd rust
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='coverage-%p-%m.profraw' cargo test
mkdir -p ../target/coverage
grcov . --binary-path ../target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o ../target/coverage/html
python3 -m http.server -d ../target/coverage/html

Python bindings

Setup

pip install -U pre-commit
pre-commit install
cd python
python3 -m virtualenv venv
source venv/bin/activate
pip install -r dev-requirements.txt

Run benchmarks and tests

cd python
maturin develop --release && python3 test.py