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:
- Add the
--remove-headerarg to.pre-commit-config.yaml - Run formatting (this will remove the license header entirely)
uv run tox -e format
- Remove the
--remove-headerarg from.pre-commit-config.yaml - Update
ci-tools/license-templates/LICENSE.txt - Run formatting
uv run tox -e format
Build a docker image
uv run tox -e docker-build