Development#

Setting up the Environment#

Abracudabra uses the uv package manager for dependency management and packaging.

First, install uv by following the official installation guide.

Once uv is installed, set up the project dependencies by running:

uv sync -extra cuda124 --all-groups --no-install-project

This will install all dependencies, including development dependencies, inside a virtual environment located at .venv.

A cpu extra is also available for development without CUDA dependencies.

Running Tests#

Abracudabra uses tox for testing, with uv handling the virtual environments.

Before running tests, install tox along with the tox-uv plugin:

uv tool install tox --with tox-uv

The following commands are available

Command

Description

tox

Run all tests

tox -e cov

Run tests with coverage

tox -e lintcheck

Run ruff linter and formatter in check mode

tox -e lintfix

Run ruff linter and formatter in fix mode

tox -e typecheck

Run mypy type checker

tox -e spellcheck

Run codespell in check mode

tox -e spellfix

Run codespell in fix mode

tox -e docbuild

Run sphinx to build the documentation

These commands are automatically run in the gitlab CI pipeline.