Development#

Install from Source#

Prerequisite tools/libraries

  1. maturin

  2. Rust

  3. CMake

  4. CLang

If you are inside a virtual environment, you can install it to directly

maturin develop -r  # -r to compile in release mode, it's optional

Otherwise, you can build a wheel and install it

maturin build -r -o dist
pip install dist/hugedict-*.whl

You can also consult the containers/manylinux2014_x86_64/Dockerfile for guidance to install from scratch.

Running Tests#

  1. Rust tests

cargo test --no-default-features --features pyo3/auto-initialize

Note

If you encounter libpython not found, set LD_LIBRARY_PATH environment variable to point to <ANACONDA_HOME>/lib

  1. Python tests

python -m pytests -x tests

Setup Documentation#

  1. Installing dependencies & copying required files

pip install .
pip install -r docs/requirements.txt
cp CHANGELOG.md docs/source/changelog.md
  1. Run sphinx-autobuild

sphinx-autobuild docs/source docs/build/html