Skip to content

Development

Building

Python package

Build local python wheel file, from the project root

maturin build --release --manifest-path crates/imgddpy/Cargo.toml

Rust Crates

Build all rust crates, from the project root

cargo build

Running Tests

Python (integration) Tests

Navigate to imgddpy directory

cd crates/imgddpy/

Install dependencies

pip install .[test]

Run tests

pytest

Rust Tests

Run local tests, from the project root

cargo test --features testing

Running Benchmarks

Rust Benchmarks

Run rust benchmarks, from the project root

cargo bench --features benchmark

Python Benchmarks

Navigate to imgddpy directory

cd crates/imgddpy/

Install dependencies

pip install .[test]

Run python benchmarks, from the project root

pytest -m benchmark --codspeed -v

Imgdd vs Imagehash Comparison

Navigate to comparison directory

cd crates/imgddpy/comparison/

Install dependencies

pip install -r requirements.txt

Run the compare script

python compare.py

Docs

Python Docs

Navigate to imgddpy directory

cd crates/imgddpy/

Install dependencies

pip install .[dev]

Build docs

mkdocs build

Serve docs

mkdocs serve

Rust Docs

Build docs

cargo doc --no-deps