Skip to main content

Setting up for development

  • The project uses uv for dependency management and tox for testing environments.

  • Install dependencies using uv:

uv sync --all-extras --dev
  • Run the development version of otava using uv:
uv run otava ...

See the uv docs for more.

Running tests

uv run pytest

...or using tox:

uv run tox

Linting and formatting

Code-style is enforced using ruff and flake8; import optimisation is handled by isort and autoflake. Linting is automatically applied when tox runs tests; if linting fails, you can fix trivial problems with:

uv run tox -e format

Changing the LICENSE header

To change the license header:

  1. Add the --remove-header arg to .pre-commit-config.yaml
  2. Run formatting (this will remove the license header entirely)
uv run tox -e format
  1. Remove the --remove-header arg from .pre-commit-config.yaml
  2. Update ci-tools/license-templates/LICENSE.txt
  3. Run formatting
uv run tox -e format

Build a docker image

uv run tox -e docker-build