Skip to content

mtaa-project/mtaa-backend

Repository files navigation

MTAA Project - Backend

Requirements

  • uv for Python package and environment management.

General Workflow

By default, the dependencies are managed with uv, go there and install it.

From ./mtaa-backend/ you can install all the dependencies with:

uv sync

Then you can activate the virtual environment with:

source .venv/bin/activate

Run project with:

fastapi dev app/api/main.py

Running Seeders

Seeders are used to populate the database with initial data. You can run seeders individually or all at once.

Run a Single Seeder

To run a single seeder, use the following command, replacing module_name with the specific seeder module you want to run:

python -m app.seeders.module_name

For example, to run the 1_users seeder:

python -m app.seeders.1_users

Run All Seeders

To run all seeders in the predefined order, use the following command:

python app/seeders/run_all_seeders.py

This will execute all seeders in sequence, stopping if any seeder fails.

Running Tests

Automated tests are located in the app/tests/ directory. They are written using pytest and pytest-asyncio.

Run Tests with uv (recommended)

uv run pytest

CI Integration

Tests are automatically executed on push and pull requests to the main branch via GitHub Actions. You can find the workflow definition in .github/workflows.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages