Python Development

Install Rust prior to completing items below.

Install Python

Install a Python version supported by automesh.

Create a Virtual Environment

Note: If a virtual environment folder automesh/.venv already exists from previous installs, then remove it as follows:

cd automesh                     # from the automesh directory
(.venv) deactivate              # if the virtual environment is currently active
rm -rf .venv                    # remove the virtual environment folder
                                # with `rm -rf .venv/`.

python -m venv .venv            # create the virtual environment

# activate the venv with one of the following:
source .venv/bin/activate       # for bash shell
source .venv/bin/activate.csh   # for c shell
source .venv/bin/activate.fish  # for fish shell
.\.venv\Scripts/activate        # for powershell

pip install --upgrade pip

pip install maturin

Build and Test the Source Code

maturin develop --features python --extras dev

pytest

Lint the Source Code

cargo clippy --features python

pycodestyle --exclude=.venv,book,docs .

Build and Open the API Documentation

pdoc automesh --math --no-show-source --template-directory docs/