- Install pyenv and poetry globally
- Install python3.12 python globally using pyenv
- Inside the app directory, run
poetry env use /path/to/python312 - Run
poetry install - Run
poetry shellto activate virtual environment - Run
autohooks activateto activate git hooks
- Run
cp .env.tests.local.example .env.tests.local - Put your dev aidbox license key into
AIDBOX_LICENSE_TESTin.env.tests.local - Run
make build-testat the first time and every time once dependencies are updated/added - Run
make run-test - You can kill the containers when complete to work with tests by run:
make down-test
Strongly recommended to use ruff and mypy plugins for IDE
The project uses GitHub Actions for continuous integration and deployment:
-
Linting and Type Checking: On every push and pull request, the workflow runs:
ruff checkfor code lintingruff format --checkfor code formatting verificationmypyfor static type checking
-
Docker Image Release: On push to the
mainbranch, after successful linting and type checking:- Builds a Docker image from
backend/Dockerfile - Publishes the image to GitHub Packages (ghcr.io)
- Tags the image with:
latest(for main branch)- Branch name
- Git SHA
- Builds a Docker image from
The workflow is defined in .github/workflows/backend-ci-cd.yml