Contributing

Everyone is invited to contribute to this project. Feel free to create a pull request . If you find errors, omissions, inconsistencies, or other things that need improvement, please create an issue.

Development Installation

Instead of installing the latest release from PyPI, you should get the newest development version from Github:

git clone https://github.com/audeering/audbackend/
cd audbackend
uv sync

This way, your installation always stays up-to-date, even if you pull new changes from the Github repository.

Coding Convention

We follow the PEP8 convention for Python code and use ruff as a linter and code formatter. In addition, we check for common spelling errors with codespell. Both tools and possible exceptions are defined in pyproject.toml.

The checks are executed in the CI using pre-commit. You can enable those checks locally by executing:

uvx pre-commit install
uvx pre-commit run --all-files

Afterwards ruff and codespell are executed every time you create a commit.

Alternatively, you can run ruff and codespell directly using uvx:

uvx ruff check --fix .  # lint all Python files, and fix any fixable errors
uvx ruff format .  # format code of all Python files
uvx codespell

It can be restricted to specific folders:

uvx ruff check audbackend/ tests/
uvx codespell audbackend/ tests/

Building the Documentation

If you make changes to the documentation, you can re-create the HTML pages using Sphinx:

uv run python -m sphinx docs/ build/html -b html

The generated files will be available in the directory build/html/.

It is also possible to automatically check if all links are still valid:

uv run python -m sphinx docs/ build/html -b linkcheck

Running the Tests

Some of the tests need a MinIO server. MinIO has archived its community server and shut down its public playground at play.min.io, so start the last community release on your own machine:

docker compose up -d

Docker Compose and podman-compose both read the provided compose.yaml. The server listens on 127.0.0.1:9000 and needs a moment to come up; docker compose ps reports it as healthy. The test fixtures default to that address and to its minioadmin credentials, so no further configuration is needed.

You can then run tests with pytest:

uv run pytest

When you are done, stop and remove the server again:

docker compose down

To use a different server, point AUDBACKEND_TEST_MINIO_HOST at it and set MINIO_ACCESS_KEY and MINIO_SECRET_KEY. A server without TLS needs a config file as well, as secure can only be set there, see audbackend.backend.Minio.get_config():

export MINIO_CONFIG_FILE=~/my-minio.cfg
[my-server:9000]
secure = False

Creating a New Release

New releases are made using the following steps:

  1. Update CHANGELOG.rst

  2. Commit those changes as “Release X.Y.Z”

  3. Create an (annotated) tag with git tag -a X.Y.Z

  4. Push the commit and the tag to Github