Acoular 24.10 documentation

Setting up a development environment

«  Contributing   ::   Contributing   ::   Code Quality Standards  »

Setting up a development environment

Prerequisites

Before you can start contributing to Acoular

  • Create a fork of the Acoular repository on GitHub

  • Clone your fork to your local machine via

git clone <https://your_fork/acoular>
cd acoular

If you don’t already have an existing virtual environment, you have the choice to create one with a package distribution of your choice. The Acoular development team had good experience with the following distributions:

Create a fresh environment

We recommend using the latest compatible version of Python, which is currently 3.12. If you are using the anaconda distribution, you can create a new environment, for example named dev, with

conda create -n dev python=3.12
conda activate dev

The same command can be used with mamba or micromamba by simply replacing conda with mamba or micromamba.

Equally, you can create a new environment with virtualenv:

virtualenv -p python3.12 dev
source dev/bin/activate

Install dependencies

Then, make an editable installation of Acoular with:

pip install -e ".[dev]"

The editable installation allows you to make changes to the source code and see the effects immediately without having to reinstall the package.

The ".[dev]" argument is responsible for installing the right dependencies as defined in pyproject.toml:

If not included, the dependencies have to be installed manually.

System dependencies

Some of the Acoular dependencies require system packages to be installed. On Ubuntu, we frequently encounter that the portaudio library is missing, which is required by the sounddevice package. In addition, the graphviz package is required for the documentation. You can install both with:

sudo apt install graphviz libportaudio2

«  Contributing   ::   Contributing   ::   Code Quality Standards  »